simpeg / aurora

software for processing natural source electromagnetic data
MIT License
13 stars 2 forks source link

Github actions failing on earthscope_tests branch #293

Closed kkappler closed 9 months ago

kkappler commented 10 months ago

Despite earthscope_tests being identical (after recent merging) to fourier_coefficients for all common folders, the github actions fail in earthscope_tests with weird errors, the most common of which is: ModuleNotFoundError: No module named 'mth5.utils'

Running tests on earthscope_tests locally, all tests pass.

Here is a debugging exercise involving merging earthscope in fc:

Strategy: [ ] fork fourier_coefficients branch to fix_issue_293 [ ] Modify aurora/.github/workflows/tests.yml so that it is minimal (fast) but runs one of the failing tests on fourier_coefficients, for example tests/io/test_issue_139.py [ ] push fix_issue_293 and confirm test is passing (this is just fc with reduced tests) [ ] as a sanity check, merge earthscope_tests into debug_earthscope_into_fc_0 and confirm test fails [ ]Now debug by removing the files from merge and adding them in one at a time ...

kkappler commented 10 months ago

When I said the tests run locally, what I meant was pytest ran fine form aurora/tests directory. If I use the syntax of the tests.yml from which is executing from the topmost aurora folder pytest -s -v I was able reproduce the error locally.

A helpful tool which was enough to reproduce the error without executing the tests: pytest -s -v --collect-only (https://stackoverflow.com/questions/21455134/list-available-tests-with-py-test) It looks like the issue goes away if I rename widescale_test.py to widescale_tester.py I chose to rename it to widescale.py though