Skip to content

Commit 824fc83

Browse files
authored
CI: Add job to validate conda-forge meta.yaml (#53027)
* CI: Add job to validate conda-forge meta.yaml * Rename file, test from git * Fix typo * fix concurrency * rename to meta.yaml, test over python versions * Fix recipe, add python version to job name * Try using mambabuild verify directly * seperate test from build * Add check, and save to specific output location * Skip verify step * Check if it's in package * Try specifying another folder * Try local * Give full path? * Check where the package is * Whats in noarch? * check linux-64 * Skip --test * only run during main and 2.0 checks * update meta
1 parent f112661 commit 824fc83

File tree

2 files changed

+131
-4
lines changed

2 files changed

+131
-4
lines changed

.github/workflows/package-checks.yml

+38-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
permissions:
1515
contents: read
1616

17+
defaults:
18+
run:
19+
shell: bash -el {0}
20+
1721
jobs:
1822
pip:
1923
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
@@ -44,9 +48,39 @@ jobs:
4448
run: |
4549
python -m pip install --upgrade pip setuptools wheel python-dateutil pytz numpy cython
4650
python -m pip install versioneer[toml]
47-
shell: bash -el {0}
4851
4952
- name: Pip install with extra
50-
run: |
51-
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
52-
shell: bash -el {0}
53+
run: python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
54+
conda_forge_recipe:
55+
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
56+
runs-on: ubuntu-22.04
57+
strategy:
58+
matrix:
59+
python-version: ['3.9', '3.10', '3.11']
60+
fail-fast: false
61+
name: Test Conda Forge Recipe - Python ${{ matrix.python-version }}
62+
concurrency:
63+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
64+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-conda-forge-recipe-${{ matrix.python-version }}
65+
cancel-in-progress: true
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v3
69+
with:
70+
fetch-depth: 0
71+
72+
- name: Set up Python
73+
uses: mamba-org/provision-with-micromamba@v15
74+
with:
75+
environment-file: false
76+
environment-name: recipe-test
77+
extra-specs: |
78+
python=${{ matrix.python-version }}
79+
boa
80+
conda-verify
81+
channels: conda-forge
82+
cache-downloads: true
83+
cache-env: true
84+
85+
- name: Build conda package
86+
run: conda mambabuild ci --no-anaconda-upload --verify --strict-verify --output --output-folder .

ci/meta.yaml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{% set version = "2.0.1" %}
2+
3+
package:
4+
name: pandas
5+
version: {{ version }}
6+
7+
source:
8+
git_url: ../..
9+
10+
build:
11+
number: 1
12+
script:
13+
- export PYTHONUNBUFFERED=1 # [ppc64le]
14+
- {{ PYTHON }} -m pip install -vv --no-deps --ignore-installed . # [not unix]
15+
- {{ PYTHON }} -m pip install -vv --no-deps --ignore-installed . --global-option="build_ext" --global-option="-j4" --no-use-pep517 # [unix]
16+
skip: true # [py<39]
17+
18+
requirements:
19+
build:
20+
- python # [build_platform != target_platform]
21+
- cross-python_{{ target_platform }} # [build_platform != target_platform]
22+
- cython # [build_platform != target_platform]
23+
- numpy # [build_platform != target_platform]
24+
- {{ compiler('c') }}
25+
- {{ compiler('cxx') }}
26+
host:
27+
- python
28+
- pip
29+
- setuptools >=61.0.0
30+
- cython >=0.29.33,<3
31+
- numpy >=1.21.6 # [py<311]
32+
- numpy >=1.23.2 # [py>=311]
33+
- versioneer
34+
- tomli # [py<311]
35+
run:
36+
- python
37+
- {{ pin_compatible('numpy') }}
38+
- python-dateutil >=2.8.2
39+
- pytz >=2020.1
40+
- python-tzdata >=2022.1
41+
42+
test:
43+
imports:
44+
- pandas
45+
commands:
46+
- pip check
47+
# Skip test suite on PyPy as it segfaults there
48+
# xref: https://github.com/conda-forge/pandas-feedstock/issues/148
49+
#
50+
# Also skip `test_rolling_var_numerical_issues` on `ppc64le` as it is a known test failure.
51+
# xref: https://github.com/conda-forge/pandas-feedstock/issues/149
52+
{% set markers = ["not clipboard", "not single_cpu", "not db", "not network", "not slow"] %}
53+
{% set markers = markers + ["not arm_slow"] %} # [aarch64 or ppc64le]
54+
{% set extra_args = ["-n=2 -m " + " and ".join(markers)] %}
55+
{% set tests_to_skip = "_not_a_real_test" %}
56+
{% set tests_to_skip = tests_to_skip + " or test_rolling_var_numerical_issues" %} # [ppc64le]
57+
{% set tests_to_skip = tests_to_skip + " or test_std_timedelta64_skipna_false" %} # [ppc64le]
58+
{% set tests_to_skip = tests_to_skip + " or test_value_counts_normalized[M8[ns]]" %} # [ppc64le]
59+
{% set tests_to_skip = tests_to_skip + " or test_to_datetime_format_YYYYMMDD_with_nat" %} # [ppc64le]
60+
{% set tests_to_skip = tests_to_skip + " or (TestReductions and test_median_2d)" %} # [ppc64le]
61+
{% set extra_args = extra_args + ["-k", "not (" + tests_to_skip + ")"] %}
62+
- python -c "import pandas; pandas.test(extra_args={{ extra_args }})" # [python_impl == "cpython"]
63+
requires:
64+
- pip
65+
- pytest >=7.0.0
66+
- pytest-asyncio >=0.17.0
67+
- pytest-xdist >=2.2.0
68+
- pytest-cov
69+
- hypothesis >=6.46.1
70+
- tomli # [py<311]
71+
72+
about:
73+
home: http://pandas.pydata.org
74+
license: BSD-3-Clause
75+
license_file: LICENSE
76+
summary: Powerful data structures for data analysis, time series, and statistics
77+
doc_url: https://pandas.pydata.org/docs/
78+
dev_url: https://github.com/pandas-dev/pandas
79+
80+
extra:
81+
recipe-maintainers:
82+
- jreback
83+
- jorisvandenbossche
84+
- msarahan
85+
- ocefpaf
86+
- TomAugspurger
87+
- WillAyd
88+
- simonjayhawkins
89+
- mroeschke
90+
- datapythonista
91+
- phofl
92+
- lithomas1
93+
- marcogorelli

0 commit comments

Comments
 (0)