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

MNT: Use noarch python {{ python_min }} variable #68

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 18, 2024

Resolves #42

  • Use 'python {{ python_min }}' syntax for the python requirements for noarch python recipes.
  • Use a Jinja2 set statement for python_min to keep all the build metadata contained in the recipe/meta.yaml and override the global python_min with coffea's python_min of 3.9.
    • coffea v2024.10.0 reports a minimum Python of 3.8, but the dependencies on conda-forge are unable to install without Python 3.9+.
  • Remove --no-deps --no-build-isolation 'pip install' options in recipes as the build tool (e.g. conda-build, rattler-build) will enforce all required 'pip install' options itself at build time.
  • Add missing dependencies of fsspec-xrootd, requests, aiohttp.
  • Add 'pip check' to tests.
  • Add conda-forge/scikit-hep as feedstock maintainers.
  • Use 'pypi.org'.
  • Bump build number.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • [N/A] Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

recipe/meta.yaml Outdated
@@ -1,28 +1,29 @@
{% set name = "coffea" %}
{% set version = "2024.10.0" %}
{% set python_min = "3.8" %}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will now ensure that there are versions that work with the lower bound of the requires-python defined in the PyPI package. If the PyPI requires-python changes this workflow will fail (which is good) and it will then require bumping this.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/11899908899.

@@ -1,28 +1,29 @@
{% set name = "coffea" %}
{% set version = "2024.10.0" %}
{% set python_min = "3.9" %}
Copy link
Member Author

Choose a reason for hiding this comment

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

The dependencies fail to install on Python 3.8, so need to bump to Python 3.9+.

@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@matthewfeickert matthewfeickert marked this pull request as ready for review November 18, 2024 20:15
@matthewfeickert
Copy link
Member Author

@conda-forge/coffea, this is ready for review. Let me know if you have any questions.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/11900331597.

Comment on lines +4 to +5
# v2024.10.0 supports Python 3.8, but the required dependencies are missing
# Python 3.8 support on conda-forge.
Copy link
Member Author

@matthewfeickert matthewfeickert Nov 18, 2024

Choose a reason for hiding this comment

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

Example:

$ docker run --rm -ti python:3.8 bash
root@1ce9c68a2081:/# python -m venv venv && . venv/bin/activate && python -m pip install uv && uv pip install 'coffea==2024.10.0'
(venv) root@1ce9c68a2081:/# uv pip show coffea
Using Python 3.8.20 environment at /venv
Name: coffea
Version: 2024.10.0
Location: /venv/lib/python3.8/site-packages
Requires: aiohttp, awkward, cachetools, cloudpickle, correctionlib, dask, dask-awkward, dask-histogram, fsspec-xrootd, hist, lz4, matplotlib, mplhep, numba, numpy, packaging, pandas, pyarrow, requests, scipy, toml, tqdm, uproot, vector
Required-by:
$ docker run --rm -ti python:3.8 bash
root@3711dc87e0d3:/# curl -fsSL https://pixi.sh/install.sh | bash && . /root/.bashrc
This script will automatically download and install Pixi (latest) for you.
Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 14.9M  100 14.9M    0     0  4525k      0  0:00:03  0:00:03 --:--:-- 5924k
The 'pixi' binary is installed into '/root/.pixi/bin'
Updating '/root/.bashrc'
Please restart or source your shell.
root@3711dc87e0d3:/# mkdir example && cd $_
root@3711dc87e0d3:/example# pixi init
✔ Created /example/pixi.toml
root@3711dc87e0d3:/example# pixi add 'python=3.8' 'coffea==2024.10.0'
  × failed to solve the conda requirements of 'default' 'linux-64'
  ╰─▶ Cannot solve the request because of: coffea ==2024.10.0 cannot be installed because there are no viable options:
      └─ coffea 2024.10.0 would require
         └─ dask-core >=2024.3.0, which cannot be installed because there are no viable options:
            └─ dask-core 2024.3.0 | 2024.3.1 | 2024.4.0 | 2024.4.1 | 2024.4.2 | 2024.5.0 | 2024.5.1 | 2024.5.2 | 2024.6.0 | 2024.6.1 | 2024.6.2 | 2024.7.0 | 2024.7.1 | 2024.8.0 | 2024.8.1 | 2024.8.2 |
      2024.9.0 | 2024.9.1 | 2024.10.0 | 2024.11.0 | 2024.11.1 | 2024.11.2 would require
               └─ python >=3.9, for which no candidates were found.


root@3711dc87e0d3:/example# pixi add 'python=3.9' 'coffea==2024.10.0'
✔ Added python=3.9
✔ Added coffea==2024.10.0
root@3711dc87e0d3:/example#

recipe/meta.yaml Outdated Show resolved Hide resolved
matthewfeickert and others added 2 commits November 19, 2024 14:14
* Use 'python {{ python_min }}' syntax for the python requirements for noarch
  python recipes.
   - c.f. https://conda-forge.org/docs/maintainer/knowledge_base/#noarch-python
* Use a Jinja2 set statement for python_min to keep all the build metadata
  contained in the recipe/meta.yaml and override the global python_min
  with coffea's python_min of 3.9.
   - coffea v2024.10.0 reports a minimum Python of 3.8, but the dependencies
     on conda-forge are unable to install without Python 3.9+.
* Remove --no-deps --no-build-isolation 'pip install' options in recipes as
  the build tool (e.g. conda-build, rattler-build) will enforce all required
  'pip install' options itself at build time.
* Add missing dependencies of fsspec-xrootd, requests, aiohttp.
* Add 'pip check' to tests.
* Add conda-forge/scikit-hep as feedstock maintainers.
* Use 'pypi.org'.
* Bump build number.
@matthewfeickert
Copy link
Member Author

@conda-forge-admin, please rerender

@lgray lgray merged commit 4d1f8a7 into conda-forge:main Nov 20, 2024
4 checks passed
@matthewfeickert matthewfeickert deleted the mnt/use-noarch branch November 20, 2024 00:49
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.

Re-enable pip check when fsspec-xrootd starts to report its version correctly again
3 participants