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

Example missing imports #593

Closed
stefan6419846 opened this issue Apr 18, 2023 · 4 comments · Fixed by #598
Closed

Example missing imports #593

stefan6419846 opened this issue Apr 18, 2023 · 4 comments · Fixed by #598
Assignees

Comments

@stefan6419846
Copy link

I just started evaluating this project for generating SPDX files manually, but had some trouble to finally generate a custom document:

  • The example at https://github.com/spdx/tools-python#example omits all imports.
  • The example starts with parsing an existing file. As documentation is sparse anyway, this requires me to do quite some extra research on how to create a document itself manually.
  • Instead of exposing the corresponding classes from the submodules of spdx.models inside spdx/models/__init__.py, I am required to import them from the corresponding submodules, which seems like some unnecessary overhead.
@armintaenzertng
Copy link
Collaborator

Thanks for the detailed feedback, Stefan, much appreciated! :)
As a first quick fix I opened a PR to include the imports in the readme example. I'll work on another example that demonstrates creating documents from scratch.

@armintaenzertng
Copy link
Collaborator

@stefan6419846, I have created a new example file that demonstrates how to create an SPDX document from scratch with this library. Please have a look and tell me if you find that helpful or where you wish for more information. :)

@stefan6419846
Copy link
Author

Thanks, this is much appreciated to lower the burden of getting started with plain library usage.

Doing some further research in the package itself, I managed to write a similar example in the meantime (with the help of the actual specification), but good documentation does not hurt.

@armintaenzertng
Copy link
Collaborator

That's great to here! Please reach out if there are any more road blocks you encounter!

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

Successfully merging a pull request may close this issue.

2 participants