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

moved from conda/flit to pip #149

Merged
merged 6 commits into from
Sep 27, 2024
Merged

Conversation

veenstrajelmer
Copy link
Collaborator

@veenstrajelmer veenstrajelmer commented Sep 25, 2024

Issue addressed

Fixes #136

Explanation

The installation of the conda environment on github takes 5-10 minutes (depending on the season, the temperature, or something else). This is way faster with pip (2.5 minutes) and this also drops the flit dependency. Furthermore, this way we can also test on python 3.12 (all tests pass). In the future it might be better to move to pixi (just like everyone else) and use lockfiles and such, but I think this is a useful inbetween solution.

I would also prefer to delete envs/hydromt-delft3dfm.yml, but it is at the moment required by .github/workflows/docs.yml (which also requires flit actually).

Checklist

  • Updated tests or added new tests >> not relevant, but updated ci.yml
  • Branch is up to date with main
  • Tests & pre-commit hooks pass
  • Updated documentation if needed >> not relevant
  • Updated changelog.rst if needed >> not relevant

@veenstrajelmer veenstrajelmer linked an issue Sep 25, 2024 that may be closed by this pull request
Copy link

@veenstrajelmer veenstrajelmer requested review from hboisgon, xldeltares and shartgring and removed request for xldeltares September 25, 2024 15:21
Copy link
Contributor

@hboisgon hboisgon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I did not realise we were fully pip installable :)
Maybe good to update the update the installation with the two flavors then? 1 fully from pip and one with part conda / part pip).

Would be nice to be on conda-forge also at some point but let's keep this for later.

@veenstrajelmer
Copy link
Collaborator Author

You mean updating the docs right? In installation.rst it is already a pip install actually. There is all this stuff about mamba and libmamba that is a bit distracting, but in the end it is pip install hydromt-delft3dfm. I guess adding hydromt to the conda env is not necessary. Would you like me to remove that or leave at is? Let me know if you think the PR can be merged or not yet.

@hboisgon
Copy link
Contributor

You mean updating the docs right? In installation.rst it is already a pip install actually. There is all this stuff about mamba and libmamba that is a bit distracting, but in the end it is pip install hydromt-delft3dfm. I guess adding hydromt to the conda env is not necessary. Would you like me to remove that or leave at is? Let me know if you think the PR can be merged or not yet.

Yes updating the docs! Well indeed if it is pip installable you would not need to add the hydromt when the envrionment is created.
I think it might be nice to mention two installation types? One example for conda users (ie including the environment creation) and one for pip users. What do you think? Else you can leave as is.

For the conda example, I think they still need to install pip when they create their environment else hydromt-delft3dfm may end up being installed in their base environment:

conda create --name hydromt-delft3fm pip
conda activate hydromt-delft3dfm
pip install hydromt_delft3dfm

@veenstrajelmer veenstrajelmer removed the request for review from shartgring September 27, 2024 07:48
@veenstrajelmer veenstrajelmer merged commit c8f9e8f into main Sep 27, 2024
9 checks passed
@veenstrajelmer veenstrajelmer deleted the 136-add-support-for-python-312 branch September 27, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for python 3.12
2 participants