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

Change workflow from pip to mamba/boa #397

Closed
forsyth2 opened this issue Jan 27, 2023 · 6 comments · Fixed by #429
Closed

Change workflow from pip to mamba/boa #397

forsyth2 opened this issue Jan 27, 2023 · 6 comments · Fixed by #429
Labels
DevOps CI/CD, configuration, etc. Documentation Files in `docs` modified

Comments

@forsyth2
Copy link
Collaborator

Change workflow from pip to mamba/boa

@tomvothecoder
Copy link
Collaborator

tomvothecoder commented Apr 17, 2023

Just leaving this here in case this is useful. You might find another solution fits the needs of zppy.


I was trying to find the conda/mamba equivalent of pip install . to install a local build of a package. The only command I found was conda develop ., which has a slew of issues according to this post.

What I decided to do (source):

  • Stick with pip install --no-build-isolation --no-deps -e .
  • With these CLI args --no-build-isolation --no-deps -e, no additional dependencies will be installed via pip.

Why I decided to do this (link):

  • I just need to install a local build of the package into the conda CI environment (simple build process)
  • All xcdat dependencies are already installed in the conda CI environment using ci.yml

Other user's opinions on this:

@xylar
Copy link
Contributor

xylar commented Apr 17, 2023

It's fine to set up a conda/maba environment with the dependencies but then to a pip install .. I had been using boa (conda mambabuild) in a lot of my testing up to now but I've switched to just installing the dependencies with mamba and then installing the package itself with pip.

I think the main problem is that you're installing a lot of other packages with pip, which isn't great. All the dependencies should come from conda-forge so you have a consistent set that plays nicely together.

@tomvothecoder
Copy link
Collaborator

tomvothecoder commented Apr 17, 2023

I think the main problem is that you're installing a lot of other packages with pip, which isn't great. All the dependencies should come from conda-forge so you have a consistent set that plays nicely together.

Yeah for xcdat I removed all pip packages in setup.py, which was especially needed since xesmf isn't available on pip. xcdat uses all conda-forge dependencies.

For zppy, we can remove install_requires in setup.py since the conda environments should already have these dependencies and we don't want to pull in the pip versions.

zppy/setup.py

Line 31 in 51460d4

intall_requires=["configobj>=5.0.0,<6.0.0", "jinja2>=2.0.0"],

@xylar
Copy link
Contributor

xylar commented Apr 17, 2023

You can remove the install_requires if you want to. It's a redundant place to have to keep track of dependencies.

pip check won't detect problems anymore but if install_requires doesn't get updated properly, that can be more of a hassle than a help in any case. There should be one definitive place where the dependencies are defined and where we know to look when we're updating the conda-forge feedstock.

@forsyth2
Copy link
Collaborator Author

Reopening due to the reversion in #435.

@forsyth2
Copy link
Collaborator Author

forsyth2 commented Oct 2, 2023

Resolved by #438

@forsyth2 forsyth2 closed this as completed Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps CI/CD, configuration, etc. Documentation Files in `docs` modified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants