Skip to content

Improved standardised testing suite - #86

Open
irm-codebase wants to merge 1 commit into
mainfrom
feature/convention-testing-upgrade
Open

irm-codebase wants to merge 1 commit into
mainfrom
feature/convention-testing-upgrade

Conversation

@irm-codebase

@irm-codebase irm-codebase commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes #85

Separates standard Modelblocks checks from module unit tests and sunsets the old test/integration_test.py file in favour of more targeted test separation.

  • Moves compatibility and integration tests to tests/modelblocks/, which is now fully managed by the template.
    • convention_test.py: validates that files and behaviour specified in the Modelblocks convention.
    • module_integration_test.py: tests emulating importing the module into another workflow live here.
  • Adds tests/unit/, coupled with a new pixi run test-unit task. It lets you run unit tests on workflow/scripts/*.py code.
    • new environment (unit-test) which extends the module environment, resolved in tandem with it.
    • A new CI task running these unit tests was added to .github/workflows/pr-ci.yml. It will fail by default (to force people to add at least a couple of unit tests).
    • Test code is generally shielded from template updates (only conftest.py is seen by the template, which is quite minimal).
  • Additional updates to CI, documentation, and copier rules related to these changes.
  • Added a short migration guidance that will show up after users run copier update.

If this is accepted, I'll submit a sister PR to the docs specifying the new testing method.

@irm-codebase

Copy link
Copy Markdown
Member Author

At long last, here is the first item from the workshop!
Took a couple of iterations. I tried my best to keep the template lean.

I'd be interested in feedback from @ekatef, @fneum, @davide-f, or @lkstrp, of course!

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.

Separate tests into convention / integration / unit test folders

1 participant