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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ channel_targets:
- conda-forge main
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
pin_run_as_build:
python:
min_pin: x.x
max_pin: x.x
python:
- 3.12.* *_cpython
python_min:
- '3.9'
2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
{% 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+.

# v2024.10.0 supports Python 3.8, but the required dependencies are missing
# Python 3.8 support on conda-forge.
Comment on lines +4 to +5
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#



package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/coffea-{{ version }}.tar.gz
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/coffea-{{ version }}.tar.gz
sha256: 2b4d44faf39c9ad7e66a60abdb3ee4248539fb3c49be075ef7339178df95a23c

build:
noarch: python
number: 0
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 1
script: {{ PYTHON }} -m pip install . -vv

requirements:
host:
- python >=3.8
- python {{ python_min }}
- hatchling >=1.17.1
- hatch-vcs
- pip
run:
- python >=3.8
- python >={{ python_min }}
- awkward >=2.6.7
- uproot >=5.3.11
- dask-core >=2024.3.0
Expand All @@ -31,6 +34,7 @@ requirements:
- vector >=1.4.1
- correctionlib >=2.6.0
- pyarrow >=6.0.0
- fsspec-xrootd >=0.2.3
- matplotlib-base >=3
- numba >=0.58.1
- numpy >=1.22.0
Expand All @@ -44,18 +48,25 @@ requirements:
- pandas
- hist >=2
- cachetools
- requests
- aiohttp

test:
imports:
- coffea
requires:
- python {{ python_min }}
- pip
imports:
- coffea
commands:
- pip check

about:
home: https://github.com/CoffeaTeam/coffea
summary: Tools for doing Collider HEP style analysis with columnar operations
license: BSD-3-Clause
license_file: LICENSE
doc_url: https://coffea-hep.readthedocs.io/
dev_url: https://github.com/CoffeaTeam/coffea

extra:
recipe-maintainers:
Expand All @@ -65,3 +76,4 @@ extra:
- mcremone
- chrisburr
- henryiii
- conda-forge/scikit-hep