Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of DATE format #24

Open
lojonas opened this issue Mar 27, 2020 · 3 comments
Open

Support of DATE format #24

lojonas opened this issue Mar 27, 2020 · 3 comments
Assignees

Comments

@lojonas
Copy link

lojonas commented Mar 27, 2020

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;

if child.tag == ns + "DATATYPE-DEFINITION-DOCUMENT" or child.tag == ns + 'DATATYPE-DEFINITION-STRING' or child.tag == ns + 'DATATYPE-DEFINITION-XHTML'\

if attribute.tag == ns +"ATTRIBUTE-DEFINITION-COMPLEX" or attribute.tag == ns +"ATTRIBUTE-DEFINITION-STRING" or attribute.tag == ns +"ATTRIBUTE-DEFINITION-XHTML"\

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

mapReqifAttributeValue = {"default": "embeddedDoc",

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
Copy link
Owner

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
Copy link

Al1enxD commented Mar 6, 2021

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
Copy link
Owner

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

ebroecker added a commit that referenced this issue Mar 9, 2021
@olbermann olbermann mentioned this issue Oct 15, 2021
ebroecker added a commit that referenced this issue Jan 9, 2023
* support for DATE

* fix typos #24

* Issue 24 (#29)

* Add "REAL", "DATE" and "SIMPLE" data types

Add dictionary entries for "REAL", "DATE" and add "SIMPLE" data type

* Issue 24 - Support vor values without div tags (#31)

* Add "REAL", "DATE" and "SIMPLE" data types

Add dictionary entries for "REAL", "DATE" and add "SIMPLE" data type

* Fix typo

* Tabs to spaces

* More tabs to spaces

* add support for elements without div tag

Co-authored-by: ebroecker <eduard@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants