Skip to content

CI/TST: pip extras install #49241

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

Merged
merged 31 commits into from
Nov 16, 2022
Merged

CI/TST: pip extras install #49241

merged 31 commits into from
Nov 16, 2022

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Oct 21, 2022

(c-)blosc is only available on conda, so removing it from the pip extras
https://www.pytables.org/usersguide/installation.html#prerequisites

@mroeschke mroeschke added CI Continuous Integration Dependencies Required and optional dependencies labels Oct 21, 2022
@mroeschke
Copy link
Member Author

mroeschke commented Oct 26, 2022

blosc on pypi has a lower version than on conda-forge. Pending to see if blosc will be updated on pypi: Blosc/python-blosc#297

EDIT: Updated the OP to note that blosc is actually c-blosc which isn't available on pypi

@mroeschke mroeschke added this to the 2.0 milestone Oct 28, 2022
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

This blocks quite a few runners for significant minutes (around 15 per build). Is there a way to avoid building pandas all the time?

@mroeschke
Copy link
Member Author

Looks like pip install -e .[... will still run setup.py. Maybe I could patch it to avoid building the extensions?

@mroeschke
Copy link
Member Author

@phofl found a hacky workaround to not build the extensions and now the jobs complete in a few seconds. Open to better ideas on how to achieve the same thing.

@phofl
Copy link
Member

phofl commented Nov 10, 2022

This works consistently? I'd be ok with this for the time being.

Alternative would be to change setup.py directly, correct?

@mroeschke
Copy link
Member Author

This works consistently? I'd be ok with this for the time being.

Yeah this worked when I tried in in 05b6ef7.

Alternative would be to change setup.py directly, correct?

Yeah I think so, but my attempts at this were not successful. I tried creating a no-extensions flag to pass into setup.py that could be used with pip install --install-options (https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-install-option) but that flag is deprecated and will pass that option to other package's setup.py

@phofl
Copy link
Member

phofl commented Nov 16, 2022

Thanks, lets try the current solution and adjust if necessary

@phofl phofl merged commit 18aca9c into pandas-dev:main Nov 16, 2022
@mroeschke mroeschke deleted the tst/pip_extras branch November 16, 2022 22:24
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
@lithomas1
Copy link
Member

@mroeschke I'm not sure if this is adding anything useful to the test matrix. Taking a quick look, this just tests that installing each of the extras works(this is already covered by environment.yml/requirements-dev.txt, since all dependencies are installed when we install from there and these deps are just a subset of thoe), not that the extras are correct. (IMO, you'd need some sort of "golden" file to check this).

There's also coverage for this in the pre-commit checks which should be enough IMO.

So if it's fine with you, I would propose reverting this PR, since it relies on a setuptools hack that is blocking my meson PR.

@phofl
Copy link
Member

phofl commented Nov 18, 2022

Not really, this checks that pip install pandas[foo] works, this is different than the environment yml.

@mroeschke
Copy link
Member Author

mroeschke commented Nov 18, 2022

Yeah I think there still some use here smoke testing pip install pandas[foo] "works", but agreed there should be a stronger check that install dependencies match what the extras specify.

One concern here was build speed since most of the time was built the cython extensions, but I suppose we can live with some extra build time for now and remove my hack (modifying setup.py in the job) which should unblock your meson PR.

Alternatively do you have any ideas on how to disable building cython extensions when pip installing?

@lithomas1
Copy link
Member

Not really, this checks that pip install pandas[foo] works, this is different than the environment yml.

Since it's a subset, if we know installing all the dependencies works, then installing only some of them should work too, right?

Yeah I think there still some use here smoke testing pip install pandas[foo] "works", but agreed there should be a stronger check that install dependencies match what the extras specify.

One concern here was build speed since most of the time was built the cython extensions, but I suppose we can live with some extra build time for now and remove my hack (modifying setup.py in the job) which should unblock your meson PR.

Alternatively do you have any ideas on how to disable building cython extensions when pip installing?

I came across a rejected issue pypa/pip#4783. It doesn't seem like it.

Why don't we restrict these builds to PRs tagged with "Build" for now? That should be a good compromise.

@mroeschke
Copy link
Member Author

Why don't we restrict these builds to PRs tagged with "Build" for now? That should be a good compromise.

Sure that would be fine with me

mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: CI check for new extras_require
4 participants