cyclonedx-python icon indicating copy to clipboard operation
cyclonedx-python copied to clipboard

feat: add unified tags mapping across environment builders

Open rn23thakur opened this issue 1 year ago • 2 comments

Hey, I gave it another shot, tried to read and follow the existing patterns. I'm still not sure how to write tests for these, or how to run the pre-existing ones and interpret their results.

rn23thakur avatar Nov 06 '25 22:11 rn23thakur

@rn23thakur , thank you for all your efforts and your time.

just a note: you dont need to close a pull-request, and restart your changes with another pull request. you could have left it open and improved it. a pull-request can be a very lively conversation with lots of continuous changes in the scope. So, instead of closing your PR, you could just have addressed the notes, push another set of changes, and have this reviewed/discussed. (See this as an example https://github.com/CycloneDX/cyclonedx-python-lib/pull/908)

Anyway, I am happy to review your changes.

jkowalleck avatar Nov 07 '25 07:11 jkowalleck

@rn23thakur

I'm still not sure how to write tests for these, or how to run the pre-existing ones and interpret their results.

this tool works on specific setups, we all them test beds. you will find the test beds here: https://github.com/CycloneDX/cyclonedx-python/tree/main/tests/_data/infiles these test beds are used to run the tool on, and the results are stored here: https://github.com/CycloneDX/cyclonedx-python/tree/main/tests/_data/snapshots You may run the tests as shown here: https://github.com/CycloneDX/cyclonedx-python/tree/main/tests/_data/snapshots#re-creation step by step instructions:

  1. open your terminal
  2. navigate to the root folder of this project
  3. setup the project as shown here:
    poetry install
  4. run the tests as shown here: CDX_TEST_RECREATE_SNAPSHOTS=1 poetry run tox -e py
  5. see if tests are passing, and review the updated SBOM snapshots.

feel free to ask further question. If you find the existing docs insufficient, I would be happy to see a separate pull request improving the docs.

jkowalleck avatar Nov 07 '25 07:11 jkowalleck