test: fix relative paths for downstream ci #218
Merged
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.
Description
Adds a fixture to the integration test set-up that navigates to the repo's root dir at the beginning of each test.
This is needed because we use config files in anemoi-core/training//src/anemoi/training/config/ with relative paths for hydra, as well as config files from the integration test dir in anemoi-core.
This fixes the fast integration tests failing on the downstream-ci where tests are not run from the root dir of anemoi-core.
Error message from downstream-ci on anemoi-utils:
=========================== short test summary info ============================
ERROR tests/integration/test_training_cycle.py::test_config_validation_architecture_configs[architecture_config0] - FileNotFoundError: [Errno 2] No such file or directory: '/opt/actions-runner/work/_work/anemoi-utils/anemoi-utils/training/training/tests/integration/config/testing_modifications.yaml'
ERROR tests/integration/test_training_cycle.py::test_config_validation_architecture_configs[architecture_config1] - FileNotFoundError: [Errno 2] No such file or directory: '/opt/actions-runner/work/_work/anemoi-utils/anemoi-utils/training/training/tests/integration/config/testing_modifications.yaml'
============ 92 passed, 3 skipped, 104 warnings, 2 errors in 10.81s ============
Error: Process completed with exit code 1.
Type of Change
Code Compatibility
Code Performance and Testing
Documentation