Skip to content

Commit da9ed05

Browse files
committed
Run full test suite
Added rattler conda recipe Added numpy to build requirements Bump version of pypa/cibuildwheel action Updated rapidjson
1 parent f7f97e3 commit da9ed05

File tree

6 files changed

+109
-9
lines changed

6 files changed

+109
-9
lines changed

.github/workflows/conda_recipe.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ jobs:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
1919
python-version: ["3.11"]
20+
builder: [conda]
21+
target-platform: [none]
22+
include:
23+
- os: ubuntu-latest
24+
target-platform: linux-64
25+
python-version: "3.11"
26+
builder: rattler
27+
- os: macos-latest
28+
target-platform: osx-arm64
29+
python-version: "3.11"
30+
builder: rattler
31+
- os: windows-latest
32+
target-platform: win-64
33+
python-version: "3.11"
34+
builder: rattler
2035
fail-fast: false
2136
steps:
2237
- name: Check out repository code
@@ -41,18 +56,26 @@ jobs:
4156
miniforge-version: latest
4257
conda-remove-defaults: true
4358
- name: Install conda-build
59+
if: matrix.builder == 'conda'
4460
run: |
4561
conda info
4662
conda list
4763
conda install conda-build cmake numpy -y
48-
- name: Check conda installation
64+
- name: Check conda installation & create test environment
4965
run: |
5066
conda info
5167
conda list
5268
conda create -n test python=${{ matrix.python-version }}
53-
- name: Build conda recipe
69+
- name: Build conda recipe (using conda-build)
70+
if: matrix.builder == 'conda'
5471
run: |
5572
conda-build --use-local --no-anaconda-upload --output-folder ./local_channel/ --python ${{ matrix.python-version }} recipe/
73+
- name: Build conda recipe (using rattler-build action)
74+
uses: prefix-dev/rattler-build-action@v0.2.34
75+
if: matrix.builder == 'rattler'
76+
with:
77+
upload-artifact: false
78+
build-args: --output-dir ./local_channel/ --target-platform ${{ matrix.target-platform }}
5679
- name: Install from local conda recipe
5780
run: |
5881
conda install -n test -c ./local_channel yggdrasil-python-rapidjson
@@ -63,4 +86,4 @@ jobs:
6386
###################################
6487
- name: Run tests
6588
run: |
66-
conda run -n test pytest -svx tests
89+
conda run -n test pytest -sv tests

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
name: Set up QEMU
124124

125125
- name: Build wheels
126-
uses: pypa/cibuildwheel@v3.1.4
126+
uses: pypa/cibuildwheel@v3.2.0
127127
env:
128128
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
129129
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

TODO.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
* Move python module into subdirectory for ease of re-packaging in submodule
1+
rapidjson
2+
* Move tests against install conda package into conda recipe & update conda recipe workflow
3+
* Check README
4+
* Tag yggdrasil-rapidjson
5+
* Create yggdrasil-rapidjson feedstock
6+
* Docs build (add link to docs in conda recipe & update README)
7+
8+
python-rapidjson
29
* Add numpy tile array method
3-
* Re-name python package to yggdrasil-rapidjson
4-
* Conda recipe
10+
* Update rapidjson in yggdrasil-python-rapidjson
11+
* Finish conda recipe & rename
12+
* Merge rename into yggdrasil-python-rapidjson
13+
* Update yggdrasil-python-rapidjson recipe w/ yggdrasil-rapidjson dependency
514
* Docs build (add link to docs in conda recipe & update README)
6-
* Update README with info specific to extension
15+
16+
yggdrasil
17+
* Update dependencies

conda.recipe/recipe.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
context:
2+
name: "yggdrasil-python-rapidjson"
3+
version: "1.1.0"
4+
5+
package:
6+
name: ${{ name|lower }}
7+
version: ${{ version }}
8+
9+
source:
10+
path: ../
11+
12+
build:
13+
number: 0
14+
script: '${{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv '
15+
16+
requirements:
17+
build:
18+
- if: build_platform != target_platform
19+
then:
20+
- python
21+
- cross-python_${{ target_platform }}
22+
- ${{ stdlib('c') }}
23+
- ${{ compiler('c') }}
24+
- ${{ compiler('cxx') }}
25+
- numpy
26+
host:
27+
- pip
28+
- python
29+
- numpy
30+
run:
31+
- python
32+
- numpy
33+
34+
test:
35+
imports:
36+
rapidjson
37+
requires:
38+
- pandas
39+
- pytest
40+
- pytz
41+
- trimesh
42+
- unyt
43+
source_files:
44+
- tests
45+
commands:
46+
- pytest tests
47+
48+
about:
49+
homepage: https://github.com/cropsinsilico/yggdrasil-python-rapidjson
50+
repository: https://github.com/cropsinsilico/yggdrasil-python-rapidjson
51+
license: MIT
52+
license_family: MIT
53+
license_file: LICENSE
54+
summary: A Python wrapper around YggdrasilRapidJSON.
55+
description: |
56+
A Python wrapper around YggdrasilRapidJSON. YggdrasilRapidJSON is a
57+
header-only C++ library for JSON operation extended for use with
58+
yggdrasil
59+
# documentation:
60+
61+
extra:
62+
recipe-maintainers:
63+
- langmm

recipe/meta.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ requirements:
2222
- {{ stdlib('c') }}
2323
- {{ compiler('c') }}
2424
- {{ compiler('cxx') }}
25+
- numpy
2526
host:
2627
- pip
2728
- python
29+
- numpy
2830
run:
2931
- python
32+
- numpy
3033

3134
test:
3235
imports:

0 commit comments

Comments
 (0)