galaxyproject / galaxyproject/galaxy_codex
Replace tests by unittests
- Dominant language
- HTML
- Stars
- 28
- Forks
- 36
- Avg merge
- 19h 29m
- Merged PRs (30d)
- 1
Description
Since we cannot use the current tests for PR testing (github does not allow using the API keys - and we also should not do that).
We should replace the current test framework: https://github.com/galaxyproject/galaxy_codex/blob/main/.github/workflows/run_tests.yaml
With mocked unittests (mocking the API calls) like: https://github.com/galaxyproject/galaxy_codex/tree/main/sources/bin/tests
Once we have a good code coverage we can only rely on the unittests.
Currently we got:
```bash
Name Stmts Miss Cover
-----------------------------------------------------
bin/extract_galaxy_tools.py 515 425 17%
bin/extract_galaxy_workflows.py 300 197 34%
bin/shared.py 75 34 55%
-----------------------------------------------------
TOTAL 890 656 26%
```
Check with:
```
PYTHONPATH=bin coverage run -m unittest discover -s bin/tests
coverage report --omit="bin/tests/*"
```
Should we add the code coverage in the CI ?
Contributor guide
Assessment
This issue has not been assessed yet.