MetOffice / MetOffice/lfric_core
XIOS component integration tests import unsupported python libraries
- Dominant language
- Fortran
- Stars
- 26
- Forks
- 73
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
### Version
main
### Are there any linked Issues or Pull Requests?
_No response_
### What happened?
Attempting to build XIOS component on the command line. Integration tests fail due to `xarray` and `matplotlib` not being in the LFRic build environment.
This works in the test suite because it loads "SciTools" as well, but this is a bad thing as it trowels a lot of cruft into the environment and could easily blow up. e.g. if SciTools decided they needed to include PSyclone.
### Relevant log output
```shell
15:13:45 Compiled lfric_xios_time_read_test.f90
15:13:45 Archiving liblfric_xios_time_read_test.a
15:13:45 Linking lfric_xios_time_read_test
15:13:52 Harvesting lfric_xios_context_test
15:13:52 Running lfric_xios_context_test
Traceback (most recent call last):
File ".../components/lfric-xios/test/./lfric_xios_context_test.py", line 13, in
from xiostest import LFRicXiosTest
File ".../components/lfric-xios/build/testframework/xiostest.py", line 15, in
import xarray as xr
ModuleNotFoundError: No module named 'xarray'
make[1]: *** [.../infrastructure/build/tests.mk:98: do-integration-tests/run/lfric_xios_context_test] Error 1
make: *** [../../infrastructure/build/lfric.mk:345: integration-tests/run] Error 2
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with components/lfric-xios/test/lfric_xios_context_test.py and the generated build/testframework/xiostest.py, then inspect how the test suite loads SciTools. Trace the imports of xarray and matplotlib and the integration-test environment setup. Done means the command-line XIOS integration tests run without requiring unsupported libraries or the broader SciTools environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran, python
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100