pyreqif icon indicating copy to clipboard operation
pyreqif copied to clipboard

Support of `DATE` format

Open lojonas opened this issue 5 years ago • 3 comments

I plan to read in a reqif file with your parser and then edit it accordingly with additional information. The issue I came across is that the `ATTRIBUTE-DEFINITION-DATE' and its datatype conter parts are not defined, e.g; https://github.com/ebroecker/pyreqif/blob/ce9dd62859c089b99555482dec7ddfa2adbc453c/src/pyreqif/rif.py#L180 https://github.com/ebroecker/pyreqif/blob/ce9dd62859c089b99555482dec7ddfa2adbc453c/src/pyreqif/rif.py#L219

Do you plan to integrate them? Or can you give me a hint where I need to work to integrate them? I have tried to just adapt the if statements where the checks are conducted (see above) and have changed the dicts https://github.com/ebroecker/pyreqif/blob/ce9dd62859c089b99555482dec7ddfa2adbc453c/src/pyreqif/rif.py#L42 to include the DATE attributes and map them to a string? Maybe there is a better datatype in python, but for me it is not necessary, as I do not plan to edit the dates.

lojonas avatar Mar 27 '20 13:03 lojonas

hi @lojonas could you try current branch? I fixed the date-format. I guess this would NOT help you here with this issue, but I'll take some attention to this project the next days, thus I can fix this issue here also

ebroecker avatar Feb 13 '21 11:02 ebroecker

Hello ! I plan to convert the reqif files into xlsx and or html files to extract information from them but I am running into this same issue, the error I am getting is:

Not supported datatype: {http://www.omg.org/spec/ReqIF/20110401/reqif.xsd}DATATYPE-DEFINITION-DATE Not supported Attribute: {http://www.omg.org/spec/ReqIF/20110401/reqif.xsd}ATTRIBUTE-DEFINITION-DATE Not supported Attribute: {http://www.omg.org/spec/ReqIF/20110401/reqif.xsd}ATTRIBUTE-DEFINITION-DATE valueType not supported yet: ATTRIBUTE-VALUE-DATE Traceback (most recent call last): File "REQIF_to_Xlsx.py", line 10, in <module> main() File "REQIF_to_Xlsx.py", line 7, in main doc = pyreqif.rif.load(sys.argv[1]) File "C:\app\Python37\lib\site-packages\pyreqif\rif.py", line 336, in load values[value['attributeRef']] = reqif2py(value) KeyError: 'attributeRef'

Is there any plans to add the date format to other parts of the library in the future? Is there any other way I can go about extracting information from a reqif file into a more digestible format.

Al1enxD avatar Mar 06 '21 04:03 Al1enxD

startet implementing it: https://github.com/ebroecker/pyreqif/tree/issue_24

ebroecker avatar Mar 08 '21 21:03 ebroecker