-
Notifications
You must be signed in to change notification settings - Fork 184
Add 'test' optional dependency group so we can run the integration tests #2029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add 'test' optional dependency group so we can run the integration tests #2029
Conversation
Thank you for your contribution. Unfortunately it's the documentation that is lagging behind the code, the easiest way to run the tests right now is probably through docker compose which is what the CI uses: datacube-core/.github/workflows/main.yml Lines 55 to 69 in 419e7b0
I only use the docker image, but if you want to run things locally, I think Edit: if your use-case is for regular use of the package rather than developing datacube-core itself, what I just wrote isn't relevant. I'm guessing you want |
I prefer to keep away from using docker in this instance as I already have a dedicated vm to host the datacube and it is long term, Ive had it for 3 years now. I found that this simple addition brings the website back in sync with my environment. In my case I was following the documentation from the https://opendatacube.readthedocs.io/en/latest/installation/setup/ubuntu.html. Adding test means I can just run the code as is on the website. i.e 'pip install --upgrade -e '.[test]' |
Thanks Franklin. There was a commit in #2027 which I just merged which updates the README to advise running The dev dependency group includes everything needed to run tests AND everything needed to run the various code checks. Do you have a use case for being able to run integration tests in an environment that should not be cluttered with the various code check and type stub libraries? |
Hey SpacemanPaul, The core issue seems to be a mismatch between the Open Data Cube documentation and the current codebase. Ideally, updating the website would be the simplest fix, but I'm unsure if it's open to public contributions. My suggestion for adding the test dependency was a workaround to address the documentation gap, even though I agree it creates some unnecessary clutter. I believe accurate documentation is more critical than a clean dependency list in this case. Edit: I noticed the line Lines 82 to 95 in b04cccf
|
Thanks for spotting that. I will update shortly. |
Reason for this pull request
...
The documentation on the opendatacube website instructs users to install test dependencies using:
pip install --upgrade -e '.[test]'
However, the pyproject.toml file does not define the test. The following intergration tests section will fail
Proposed changes
Add missing test = [...] group under [project.optional-dependencies] in pyproject.toml to ensure test dependencies are installed.
Closes #xxxx
Tests added / passed
Pull Request Title will make sense in ODC Release Notes
📚 Documentation preview 📚: https://opendatacube--2029.org.readthedocs.build/en/2029/