As with turbo_seti, blimpy tests needs a README.md
razman786 opened this issue · comments
Describe the bug
Either follow the README.md file for installing unit tests python3 -m pip install -e .[full]
, or running ./run_tests.sh
results in various errors:
Installing collected packages: coverage, codecov
Successfully installed codecov-2.1.11 coverage-5.5
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
No module named 'pytest'
No module named 'pySLALIB'
Errors also occur when running the run_tests.sh
script directly, instead of from the repo's root directory - setup.py
not found.
There are no checks to see if git
is already installed, before needing sudo
access.
The script does not check what the current Operating System is before attempting to apt-get
.
To Reproduce
Steps to reproduce the behavior:
- run
python3 -m pip install -e .[full]
or./run_tests.sh
Expected behavior
The unit test script to run without error when executed directly or from the repo's root directory, not require the installation of system dependencies if they are already installed, automatically detect it's environment and execute accordingly.
Setup
- Python version: 3
- Blimpy version: master
- OS: Ubuntu 20.04 and Gentoo
test/run_tests.sh is obsolete and no longer in use as far as I know. There are a few files in this category such as .coveralls.yml
at the highest level (left over from when we were Travis CI users). We just haven't cleaned up yet.
I created a README.md in the test
directory of turbo_seti that covers regression test installation and operations. It is my intent to do the same for blimpy.
In a nutshell,
- Download from github.
- cd into the highest level directory.
- cd tests
- bash download_data.sh
- pip install pytest pyslalib
- cd ..
- pytest
See the github actions in .github/workflows.