The Komodo integration unit testing that we run on Jenkins uses
komodoenv to set up an environment into which we can install testing
dependencies such as pytest. A strong requirement is that this komodoenv
doesn't actually install the given package's runtime requirements nor
the package itself.
That is, in case of ecl, we want the tests of ecl to use the package
as found in the komodo release that we're testing, rather than the one
that could be potentially installed in komodoenv. We take care to only
pip install -r test_requirements.txt, and hope that this file doesn't
contain any runtime dependencies so that our tests don't pass
accidentally when we forget to add some important package from
setup.py into the komodo release.
The more modern and official way of handling test requirements is to add
extras_require which allows us to pip install webviz-config[testing], thereby installing not only the webviz-config
package but also all dependencies marked with testing.
It is currently not possible to ask pip to install only these
extras. This install_extra script does allow this. The usage is as
follows, which will install only the dependencies marked 'testing',
and not webviz-config nor its runtime dependencies:
The Komodo integration unit testing that we run on Jenkins uses komodoenv to set up an environment into which we can install testing dependencies such as pytest. A strong requirement is that this komodoenv doesn't actually install the given package's runtime requirements nor the package itself.
That is, in case of ecl, we want the tests of ecl to use the package as found in the komodo release that we're testing, rather than the one that could be potentially installed in komodoenv. We take care to only
pip install -r test_requirements.txt
, and hope that this file doesn't contain any runtime dependencies so that our tests don't pass accidentally when we forget to add some important package fromsetup.py
into the komodo release.The more modern and official way of handling test requirements is to add
extras_require
which allows us topip install webviz-config[testing]
, thereby installing not only thewebviz-config
package but also all dependencies marked withtesting
.It is currently not possible to ask
pip
to install only these extras. Thisinstall_extra
script does allow this. The usage is as follows, which will install only the dependencies marked 'testing', and notwebviz-config
nor its runtime dependencies: