The run pytest GH action was not including the current working directory (repo root) on the module search path during tests, leading to module not found errors. Using python -m pytest tests/ includes the current working directory and examples/ can be found.
I also modified setup.py to be coherent with setup.cfg in that it seeks only the fitspy package and not any other package-like folders in the repo. My view is that it would be safer to have only one of setup.py or setup.cfg defining the package structure!
NOTE, the tests are still failing after this change, as they run GUI windows which can't open in the runner, but they do at least run.
The run pytest GH action was not including the current working directory (repo root) on the module search path during tests, leading to module not found errors. Using
python -m pytest tests/
includes the current working directory and examples/ can be found.I also modified
setup.py
to be coherent withsetup.cfg
in that it seeks only thefitspy
package and not any other package-like folders in the repo. My view is that it would be safer to have only one ofsetup.py
orsetup.cfg
defining the package structure!NOTE, the tests are still failing after this change, as they run GUI windows which can't open in the runner, but they do at least run.