Repository navigation
Improved standardised testing suite - #86
Open
irm-codebase wants to merge 2 commits into
Open
irm-codebase wants to merge 2 commits into
irm-codebase wants to merge 2 commits into
Conversation
Member
Author
jnnr
reviewed
Nov 6, 2026
jnnr
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this, @irm-codebase! I left some minor comments.
I think that more guidelines for developers should be added to the README; on where to place additional tests (tests/unit, tests/integration (?)), what they can alter (tests/unit/, tests/modelblocks/integration/module_integration_test.py) and where to leave their hands off (tests/modelblocks/convention_test.py). There could be a convention test that enforces the latter.
Shall we add a directory tests/integration for more integration tests? Some modules already have some local performance tests, for example.
- Removed check for figures/module.png - Small docstring fix in the README.md of the generated module
Member
Author
|
@jnnr about the testing guidance, I agree. I was thinking that maybe the following should be added:
Does this sound like a good idea? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #85
Separates standard Modelblocks checks from module unit tests and sunsets the old
test/integration_test.pyfile in favour of more targeted test separation.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.tests/unit/, coupled with a newpixi run test-unittask. It lets you run unit tests onworkflow/scripts/*.pycode.unit-test) which extends themoduleenvironment, resolved in tandem with it..github/workflows/pr-ci.yml. It will fail by default (to force people to add at least a couple of unit tests).conftest.pyis seen by the template, which is quite minimal).copierrules related to these changes.copier update.If this is accepted, I'll submit a sister PR to the docs specifying the new testing method.