Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix relative paths for downstream ci #218

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

VeraChristina
Copy link
Collaborator

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Code Compatibility

  • I have performed a self-review of my code

Code Performance and Testing

  • I have run the integration tests from different directories to check if my fix is effective

Documentation

  • My code follows the style guidelines of this project
  • I have updated the documentation and docstrings to reflect the changes
  • I have added comments to my code, particularly in hard-to-understand areas

@VeraChristina VeraChristina merged commit 7cf50ef into main Mar 26, 2025
28 checks passed
@VeraChristina VeraChristina deleted the test/fix-relative-paths branch March 26, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants