Skip to content

Conversation

@flamingbear
Copy link
Member

@flamingbear flamingbear commented Oct 20, 2025

Jira Issue ID

precursor to DAS-2431

Local Test Steps

Pull this branch and run the tests.

❯ ./bin/build-image && ./bin/build-test && ./bin/run-test

Verify tests run. And you have output in your hoss/coverage and hoss/test-reports directories.

Delete those directories for the next step.

Bonus points, you can build a local environment with

❯ conda create -y --name hoss --file conda_requirements.txt python=3.12 -q --channel conda-forge --override-channels

Then install the dependencies from pip_requirements.txt and tests/pip_test_requirements.txt

run the tests directly from the root (outside of docker)

./test/run_tests.sh

They should all pass again and you have output in your hoss/coverage and hoss/test-reports directories.

PR Acceptance Checklist

  • Jira ticket acceptance criteria met.
  • CHANGELOG.md updated to include high level summary of PR changes.
  • docker/service_version.txt updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

You can now run the tests in docker or in your local environment.
ARM vs AMD will not affect the outputs at the test level.
This was modifying the test and it could only be run one time before
generating errors.
This just uses pytest-cov to generate coverage and relocates the output to the
same place whether you run from docker or the commandline.
@flamingbear flamingbear changed the title DAS-2431: Updates tests to be architecture independent. DAS-2431: HOSS tests locally and in docker, artifacts are captured Oct 20, 2025
@flamingbear flamingbear requested review from a team and owenlittlejohns October 20, 2025 23:15
Copy link
Contributor

@joeyschultz joeyschultz left a comment

Choose a reason for hiding this comment

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

These changes look good. I ran the tests (both inside and outside of Docker) and confirmed the coverage and test report directories were created in each case. I also confirmed the test coverage summary is being written to stdout once again. I'm going to approve it but there is one typo I found that you may want to fix.

CHANGELOG.md Outdated
@@ -1,3 +1,13 @@
## [unrleased] - 2025-10-20
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@owenlittlejohns owenlittlejohns left a comment

Choose a reason for hiding this comment

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

These changes are great. I ran both the Docker image and the local script to execute the tests and both times the expected directories (coverage and test-reports) were made in the expected locations. I also confirmed the GitHub workflow that was triggered for this PR - the artefacts were saved as expected. 🎉

Copy link
Contributor

@sudha-murthy sudha-murthy left a comment

Choose a reason for hiding this comment

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

Tests all passed. Good to be able to run the tests outside docker without failures.

@@ -1,7 +1,5 @@
coverage~=7.9.2
pre-commit~=4.2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to keep pre-commit?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's not used in any of the images. It's a local dependency that you should install yourself. GitHub uses https://pre-commit.ci/ as a check.

Copy link
Member

@owenlittlejohns owenlittlejohns Oct 21, 2025

Choose a reason for hiding this comment

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

One other approach would be a separate dev_requirements.txt in the root of the repository. It feels like overkill for a single package, though.

Generally, pre-commit is now being used pretty much all the Python-based Harmony services DAS maintains. It should probably just be something that is manually installed by developers when setting up a new environment for a service.

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed that it was called out in the README. I'll update that. I don't think we need it for any testing purposes in the images still

Copy link
Member Author

Choose a reason for hiding this comment

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

@flamingbear flamingbear merged commit 31bbae1 into main Oct 21, 2025
4 checks passed
@flamingbear flamingbear deleted the mhs/DAS-2431/precursor-cleanup-work branch October 21, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants