ebroecker / pyreqif

should be a python implementation of reqif-format (import/export)
BSD 2-Clause "Simplified" License
32 stars 15 forks source link

Support of `DATE` format #24

Open lojonas opened 4 years ago

lojonas commented 4 years ago

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.

ebroecker commented 3 years ago

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

Al1enxD commented 3 years ago

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.

ebroecker commented 3 years ago

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