ebroecker / pyreqif

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

Tolerance to ReqIf format errors #20

Closed laurentcabot closed 4 years ago

laurentcabot commented 4 years ago

For EXCEL to REQIF validation, FormalMind Reqif Studio seems to be tolerant to errors. Others like DoorScope or ReqEdit or DOORS are not so permissive.

However, there is a ReqIf validator in ReqIf Studio that allows to detect the same errors as ReqEdit / DoorScope / DOORS import:

image

Converting this XLSX to REQIF, import the generated REQIF in ReqIf Studio and apply the validator leads to multiple errrors that prevent the file to being imported to other tools.

TestFormat.xlsx

ebroecker commented 4 years ago

with branch iss20 the errors got less. Maybe it's worth trying. gonna fix the last errors these days.

laurentcabot commented 4 years ago

OK. I'll try. Thanks.

laurentcabot commented 4 years ago

Fatal (SCHEMA): Error: The element 'SPECIFICATION' in namespace 'http://www.omg.org/spec/ReqIF/20110401/reqif.xsd' has incomplete content. List of possible elements expected: 'TYPE' in namespace 'http://www.omg.org/spec/ReqIF/20110401/reqif.xsd'.; Line and position: 296, 11

The user must also pay attention to avoid spaces in the column headers of the XLSX file. Otherwise, it generates errors during import.

When trying to open a ReqIf generated with the following input file: Test.xlsx

ReqEdit used.

ebroecker commented 4 years ago

the 'SPECIFICATION' type is known: https://github.com/ebroecker/pyreqif/blob/iss20/src/pyreqif/reqif.py#L185 and https://github.com/ebroecker/pyreqif/blob/iss20/src/pyreqif/reqif.py#L370

but the spaces issue should already be fixed : https://github.com/ebroecker/pyreqif/blob/iss20/xlsx2reqif.py#L95

gonna have a look on it anyway

ebroecker commented 4 years ago

with https://github.com/ebroecker/pyreqif/commit/bce4031093d29a95081d4461a347f51bfc339ae4 the style-checker is happy and the validator only finds one warning, wich is not in the hand of pyreqif. So I think, branch iss20 worth trying again.

Please kindly ingore the output {'IDENTIFIER': '_doc_type_ref', 'LAST of the command line tool for now.

laurentcabot commented 4 years ago

Fatal (SCHEMA): Error: The element 'SPECIFICATION' in namespace 'http://www.omg.org/spec/ReqIF/20110401/reqif.xsd' has incomplete content. List of possible elements expected: 'TYPE' in namespace 'http://www.omg.org/spec/ReqIF/20110401/reqif.xsd'.; Line and position: 296, 11

The user must also pay attention to avoid spaces in the column headers of the XLSX file. Otherwise, it generates errors during import.

When trying to open a ReqIf generated with the following input file: Test.xlsx

ReqEdit used.

laurentcabot commented 4 years ago

I have re-tried branch iss20. But xlsx to rif is broken: the generated RIF is empty.

ebroecker commented 4 years ago

@laurentcabot

I am a bit confused. xlsx2reqif with Test.xlsx seems to work fine at my side: test.zip

rif-export is not yet reengineered, but this seems to be another issue?!

could you please check the attached generated test.reqifz file?

laurentcabot commented 4 years ago

The test.zip is correct.

ebroecker commented 4 years ago

~~I can download it an unpack it and get than a test.reqifz Theres a '.zip' arround the test.reqifz~~

Sorry - did read corrupt - not correct

laurentcabot commented 4 years ago

OK I've redownload iss20 again and re-run. It's ok. I did probably something wrong. Sorry

ebroecker commented 4 years ago

So now you are able to use other tools than reqifstudio also?

laurentcabot commented 4 years ago

Yes, ReqIf Reader: the reader is free. https://www.reqteam.com/products DoorScope (doorscope.ch), is not funny, but usable. There is also OpenECTS but it seems to have the same library than ReqIfStudio.