Skip to content

Conversation

@jkowalleck
Copy link
Member

@jkowalleck jkowalleck commented Nov 26, 2025

Added

  • TODO

Changed

  • Moved non‑standard implementations to Contrib area

Deprecated

  • Certain exports have been deprecated; downstream imports should be updated to the new locations
    Note: the symbols themselves remain supported. See documentation and the "Refactored" section below for details.

Refactored

  • The following symbols were moved.
    The symbols are still import-able through their old location.
    • OLD -> NEW
    • TODO

TODO

  • wrote docs
  • moved functionality
  • mark old imports ad deprecated
  • write changelog

@jkowalleck jkowalleck requested a review from a team as a code owner November 26, 2025 09:25
@jkowalleck jkowalleck added the enhancement New feature or request label Nov 26, 2025
@codacy-production
Copy link

codacy-production bot commented Nov 26, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.04% 100.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (aff9636) 5827 5480 94.04%
Head commit (7d14191) 5864 (+37) 5517 (+37) 94.08% (+0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#916) 84 84 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@jkowalleck jkowalleck force-pushed the feat/prep-contrib branch 2 times, most recently from cfe1a70 to df53a77 Compare November 26, 2025 09:49
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck marked this pull request as draft November 27, 2025 12:50
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck requested a review from Copilot November 28, 2025 13:57
Copilot finished reviewing on behalf of jkowalleck November 28, 2025 13:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes code by introducing a new contrib (contributed/community) area for non-standard features and deprecating the old import paths. The changes prepare the library for clearer separation between core CycloneDX specification functionality and community-contributed utilities.

  • Moved LicenseFactory from cyclonedx.factory.license to cyclonedx.contrib.license.factories
  • Moved this_component() and this_tool() builders from cyclonedx.builder.this to cyclonedx.contrib.this.builders
  • Created deprecation wrappers at old locations with appropriate warnings directing users to new import paths

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cyclonedx/contrib/README.md Documents the purpose and guidelines for the new contrib area
cyclonedx/contrib/__init__.py Initializes contrib package with explanatory docstring
cyclonedx/contrib/license/__init__.py Package initialization for license-related contrib code
cyclonedx/contrib/license/factories.py New location for LicenseFactory implementation
cyclonedx/contrib/this/__init__.py Package initialization for self-representation contrib code
cyclonedx/contrib/this/builders.py New location for this_component() and this_tool() implementations
cyclonedx/factory/license.py Deprecated re-export wrapper for backward compatibility
cyclonedx/builder/this.py Deprecated re-export wrappers for backward compatibility
tests/test_factory_license.py Updated mock patch paths to new module locations
tests/test_real_world_examples.py Updated mock patch path to new module location
tests/test_output_xml.py Updated mock patch path to new module location
tests/test_output_json.py Updated mock patch path to new module location
tests/test_deserialize_xml.py Updated mock patch path to new module location
tests/test_deserialize_json.py Updated mock patch path to new module location
tests/test_contrib/.gitkeep Placeholder for future contrib test directory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck changed the title feat: prepare "contrib" area feat: Moved non‑standard implementations to Contrib area Nov 28, 2025
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck changed the title feat: Moved non‑standard implementations to Contrib area [WIP] feat: Moved non‑standard implementations to Contrib area Nov 28, 2025
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants