Skip to content

Add project name and version context to SBOM file name - #948

Open
Rimsha2535 wants to merge 9 commits into
mainfrom
feature/946-sbom-context-clean
Open

Add project name and version context to SBOM file name#948
Rimsha2535 wants to merge 9 commits into
mainfrom
feature/946-sbom-context-clean

Conversation

@Rimsha2535

Copy link
Copy Markdown
Contributor

Fixes #946

Checklist

Note: If any of the items in the checklist are not relevant to your PR, just check the box.

For any Pull Request

Is the following correct:

  • the title of the Pull Request?
  • the title of the corresponding issue?
  • there are no other open Pull Requests for the same update/change?
  • that the issue which this Pull Request fixes ("Fixes...") is mentioned?

When Changes Were Made

Did you:

  • update the changelog?
  • update the cookiecutter-template?
  • update the implementation?
  • check coverage and add tests: unit tests and, if relevant, integration tests?
  • update the User Guide & other documentation?
  • resolve any failing CI criteria (incl. Sonar quality gate)?

When Preparing a Release

Have you:

  • thought about version number (major, minor, patch)?
  • checked Exasol packages for updates and resolved open vulnerabilities, if easily possible?

Comment thread exasol/toolbox/templates/github/workflows/build-and-publish.yml Outdated
Comment thread exasol/toolbox/nox/_dependencies.py Outdated
Comment thread exasol/toolbox/templates/github/workflows/build-and-publish.yml Outdated
Comment thread exasol/toolbox/templates/github/workflows/build-and-publish.yml
Comment thread exasol/toolbox/templates/github/workflows/build-and-publish.yml Outdated
Comment thread exasol/toolbox/templates/github/workflows/build-and-publish.yml Outdated
Co-authored-by: Ariel Schulz <43442541+ArBridgeman@users.noreply.github.com>
Co-authored-by: Ariel Schulz <43442541+ArBridgeman@users.noreply.github.com>
Co-authored-by: Ariel Schulz <43442541+ArBridgeman@users.noreply.github.com>
Co-authored-by: Ariel Schulz <43442541+ArBridgeman@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Comment thread exasol/toolbox/nox/_dependencies.py
test()


def test_project_name_and_version_from_poetry():

@ArBridgeman ArBridgeman Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mocking this was a good instinct, as the exasol-toolbox version will change over time. However, as the python-toolbox is used in many projects, we often do a more direct test to ensure that the 3rd party code (in this case poetry version --ansi) works as expected and is parsed in a way we expect. This way if update poetry or dependencies change that we have clearer test feedback to act upon.

@ArBridgeman ArBridgeman Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So, I'd replace this test with:

from exasol.toolbox import __version__

def test_project_name_and_version_from_poetry():
    name, version = project_name_and_version_from_poetry(
        working_directory=PROJECT_CONFIG.root_path)

    assert name == "exasol_toolbox"
    assert version == Version.from_string(__version__)

def test_generate_sbom(monkeypatch, nox_session, tmp_path, test_project_config_factory):
project_config = test_project_config_factory(root_path=tmp_path)
monkeypatch.setattr(_dependencies, "PROJECT_CONFIG", project_config)
monkeypatch.setattr(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

💚

name, version = project_name_and_version_from_poetry()

assert name == "exasol_toolbox"
assert version == Version(10, 4, 0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Otherwise, please add an entry for this issue in the doc/changes/unreleased.md file.

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 this pull request may close these issues.

Alter sbom to give context

3 participants