Closed nutjob4life closed 2 years ago
@nutjob4life how hard would it be to retrofit the DOI service to use tox
vs. the effort to allow either? just want to get either of these fixed ASAP so we can easily tag / release the DOI Service. with test failures, it becomes a little more cumbersome/manual.
The DOI service is already using tox
.
To just get a release "out the door" we could copy the dev
dependencies to install_require
dependencies.
As part of the Template Rollout Summer 2021, the pds-doi-service got the treatment that made it more like the pds-template-repo-python, complete with linting, code formatting, and the modern way of doing unit, functional, integration, user, acceptance, etc., tests.
However, this exposed a problem with the Roundup Action, which is making some assumptions about how testing should get done, namely that
python setup.py test
is sufficient.It isn't anymore.
First,
python setup.py test
fails to install any of the development-dependencies in the package being tested—dependencies that the tests expect (such asflask_testing
in this case). Second,python setup.py test
is the old way of running tests in Python. Instead,tox
should just be run.But not all of the NASA-PDS software repositories are equipped to handle
tox
yet. Therefore, the Roundup Action should be adaptive to how it executes Python tests:pip install --editable .[dev]
to ensure test dependencies are installed.tox
command should be invoked. If it succeeds, we can assume the tests were successful and there's no need to go to step-the-third.tox
failed or wasn't even found. In this case, fall back topython setup.py test
.