This is a library implementing operations around files readable by OpossumUI.
Currently only supports conversion from single SPDX files to .opossum
format.
This is a work in progress and not yet stable.
This package uses uv for installation and dependency management. After installing uv, you can set up the project with
uv sync
The CLI uses subcommands. The main command just displays all available subcommands
Usage: uv run opossum-file [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
generate Generate an Opossum file from various other file formats.
Usage: opossum-file generate [OPTIONS]
Generate an Opossum file from various other file formats.
Currently supported input formats:
- SPDX
- ScanCode
- Opossum
Options:
--spdx PATH Specify a path to a SPDX file that you would like to
include in the final output. Option can be repeated.
--opossum PATH Specify a path to a .opossum file that you would like
to include in the final output. Option can be
repeated.
--scan-code-json PATH Specify a path to a .json file generated by ScanCode
that you would like to include in the final output.
Option can be repeated.
-o, --outfile TEXT The file path to write the generated opossum document
to. If appropriate, the extension ".opossum" will be
appended. [default: output.opossum]
--help Show this message and exit.
To test your changes, run
uv run ruff check
uv run ruff format --check
uv run python -m mypy src/ tests/
uv run pytest
To build, run
uv run python build.py opossum-file
This will create a self-contained executable file dist/opossum-file
(dist/opossum-file.exe
on Windows).
- This project uses faker for testing
- By default, every test runs with a different seed
- To fix the seed, just adapt the line in faker_setup.py (without committing)
Note: You will need the "maintain" role in order to create a new release.
- Go to the GitHub releases page and use the UI to create a new release.
- The tag should have the format "opossum-file-$YEAR-$MONTH-$DAY" (in case of an Nth release on the same day "opossum-file-$YEAR-$MONTH-$DAY.N").
- The title of the release equals the tag.
- Click the button "Generate release notes" to get the description for the release. Then, remove all the contributions from @renovate which are just dependency upgrades.
- Click "Publish release". This will trigger the CI/CD pipeline which will build the release for all three OSs and upload the artifacts to the release.