melexis / sphinx-traceability-extension

Traceability extension for Sphinx documentation generator
GNU General Public License v3.0
25 stars 9 forks source link

ReqIf XML export #164

Open bavovanachte opened 4 years ago

bavovanachte commented 4 years ago

In order to be able to import requirements made using this tool into other requirement management tools, an export feature with standardized format would be very useful. ReqIf seems like an excellent candidate.

Original issue: #31

bavovanachte commented 4 years ago

As for the ReqIf output, I've taken a closer look at pyreqif. My findings:

Conclusion: In my opinion, pyreqif is not at the maturity we would need. If we would start to use it, I have the feeling we would need to do a bit of work on a library that needs improvements on the architectural level as well.

bavovanachte commented 4 years ago

As an alternative option, I've started playing around with pyxb instead. This is a library that generates python classes/bindings automatically based on XSD files.

I've generated the reqif files (I think they're still version 1.0) and started playing around with them here: https://github.com/bavovanachte/reqif_pyxb_tryout

I haven't moved very far yet, but up until now, the advantages I see are:

My plan is to try to produce the same xml output using pyxb as the one produced by the example script in the pyreqif repo, and present the differences here for evaluation.

bavovanachte commented 4 years ago

Small update: I've advanced quite a bit with the pyXB approach. I've added a first layer of convenience classes on top of the pyXB ones, and added an example that uses most of them.

I've also done a first quick-and-very-dirty integration in here and managed to produce a reqif file based on the example project: if you're interested: exported_items.reqif.zip. This doesn't contain any links between the requirements yet, but it should be reqif-compatible (I can open and inspect it with the rmf eclipse plugin)

One of the things I didn't get right yet is the inclusion of xhtml in the xml tree, which is a quite important element (we'll want to store formatted text). That could be a make-or-break aspect for this approach.

bavovanachte commented 3 years ago

I'm closing #166 without merging. Although promising as a concept, the PyXB project doesn't seem to have a responsive owner, or a responsive community. That wouldn't be a major issue if the (generated) code was easy to understand and modify to our needs, but it doesn't seem to be. I don't think this is the right approach. I did learn quite a bit about the reqif standard, so this might help adopt, write or contribute to a different tool.