Skip to content
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

Circle test picks up release package installed from conda and not current branch esmvalcore #1063

Closed
valeriupredoi opened this issue Mar 29, 2021 · 7 comments
Assignees
Labels

Comments

@valeriupredoi
Copy link
Contributor

The Circle test runs with the esmvalcore installed from conda at env creation point and is not overwritten by the package from the current branch under testing. This is not the desired behavior since pip install -e .[test] does not replace the conda install with the local pip install

@bouweandela
Copy link
Member

Why do you think this is the case?

The esmvalgroup/esmvalcore:development docker container is built from the file docker/Dockerfile.dev. The test is run by starting this docker container and running the next commands in it:

. /opt/conda/etc/profile.d/conda.sh
conda activate esmvaltool
pip install .[test]
pytest -n 2 -m "not installation"

. Nowhere in these steps is there any mention of the esmvalcore conda package.

@valeriupredoi
Copy link
Contributor Author

@bouweandela here's yer proof: GA test run in development on the branch using the actual branch codebase (doesn't fail, as I'd expect it) vs Circle test that's failing because it is using either master or release codebase (I think it's the release since look where it picks up esmvalcore from: /opt/conda/envs/esmvaltool/lib/python3.9/site-packages/esmvalcore). If test is supposed to check the release codebase against new testing code (because that's what it's doing at the moment) then we should explain this, if not we need to fix it, I believe replacing pip install -e .[test] with pip install -e .[develop] will do the trick 👍

@bouweandela
Copy link
Member

I think it's the release since look where it picks up esmvalcore from: /opt/conda/envs/esmvaltool/lib/python3.9/site-packages/esmvalcore

It gets installed there because this command

pip install .[test]

does not contain -e.

I believe replacing pip install -e .[test] with pip install -e .[develop] will do the trick

That seems unlikely, installing the develop extra instead of the test extra will just install extra development tools, e.g. prospector, as defined here:

ESMValCore/setup.py

Lines 211 to 213 in c0cc45f

extras_require={
'develop': REQUIREMENTS['develop'] + REQUIREMENTS['test'],
'test': REQUIREMENTS['test'],

that shouldn't change the test results.

@valeriupredoi
Copy link
Contributor Author

Does the container need refreshing then? Bouwe, this is a rather serious issue, something that we need to get to the bottom of, otherwise we risk introducing bugs that get uncovered only after merging into master and the GA test fails

@bouweandela
Copy link
Member

The docker container is just 4 days old, you can see it on dockerhub. It will be rebuilt from master every time a pull request is merged into it.

@valeriupredoi
Copy link
Contributor Author

OK so indeed, installing it with pip does not pick up the release but rather some current branch, but this test keeps failing where it should not fail if the test is run with the current development branch, is it because test installs master rather than the development branch where work is done?

@valeriupredoi
Copy link
Contributor Author

the mystery related to this issue is solved by figuring out #1159 - a problem that's got its own isue, so closing this, my apologies for doubting the sanity of your test container @bouweandela 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants