-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace environment.yml with conda-lock.yml #442
Conversation
TODO * [ ] valid pyproject.toml for `pip install -e .[dev]`
Currently pip does not understand pyproject.toml file
Skipped flake8 config as this will be replaced by ruff
I followed the instructions:
However, I thought dev dependencies should not be added to the lock file but it seems like they did |
Unable to exclude during lock generation as `--no-dev-dependencies` moves dev deps to main cat.
Switched to |
Hmm, |
Because it is imported in this package
For me pip says it did the following: And with Which is normal as it's the dev+docs dependencies. Perhaps edit the PR text:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried out this branch. Encountered some issues.
- Tried installing ewatercycle into python (no conda or esmvaltool). Got the following error:
Importlib changed with 🐍 3.10. Changing line 4 in ewatercycle/shared.py
to:
from importlib.metadata import EntryPoint
fixes this issue.
- currently
import ewatercycle.forcing
fails without esmvalcore/tool. This does not have to be this way. Want to fix that in a different PR? Would be nice to open an issue about it.
The import try/excepts can be moved to the methods which rely on esmvaltool, but still allow already generated forcing to be loaded (or e.g. caravanforcing which does not need esmvaltool)
Otherwise the conda-lock file seems to work well. It's also a lot faster, so stability + speed are both very nice to have.
get_diagnostic_filename, | ||
run_diagnostic, | ||
) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to where it's used (i.e. def *Forcing.generate(...)
) would allow users to mostly use ewatercycle without esmvaltool.
|
Quality Gate failedFailed conditions |
https://ewatercycle.readthedocs.io/en/stable/system_setup.html#conda-environment) is still using |
Fixes #357 |
TODO
pip install -e .[dev]
Refs #441
To check
pip install -e .
should only install ewatercycle, only few additional deps should be installedpip install -e .[dev]
should only install ewatercycle, few additional deps should be installed