Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Commit 19bc4a5

Browse files
committed
merged
2 parents 09fe67a + 9bb6e4f commit 19bc4a5

9 files changed

Lines changed: 123 additions & 4 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build PyOdide
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- uses: actions/checkout@master
11+
- uses: actions/setup-python@master
12+
with:
13+
python-version: 3.11.2
14+
- run: |
15+
pip install pyodide-build>=0.23.0
16+
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
17+
- uses: mymindstorm/setup-emsdk@v12
18+
with:
19+
version: ${{ env.EMSCRIPTEN_VERSION }}
20+
- run: pyodide build
21+
22+
23+
- name: set up node
24+
uses: actions/setup-node@master # v3.6.0
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
28+
- name: Set up Pyodide virtual environment
29+
run: |
30+
pyodide venv .venv-pyodide
31+
source .venv-pyodide/bin/activate
32+
pip install dist/*.whl
33+
pip install numpy
34+
pip install pandas
35+
pip install pytest
36+
pip install hypothesis
37+
38+
- name: Test
39+
run: |
40+
source .venv-pyodide/bin/activate
41+
pytest test
42+
43+
- name: Configure AWS credentials
44+
uses: aws-actions/configure-aws-credentials@v1
45+
with:
46+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
47+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
48+
aws-region: us-west-1
49+
50+
- name: Copy to AWS s3
51+
run: |
52+
aws s3 cp ./dist s3://flexatone/packages/ --exclude "*" --include "*.whl" --recursive
53+

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,33 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
os: [macos-12, ubuntu-22.04, windows-2022]
31+
<<<<<<< HEAD
3132
minor: [8]
33+
=======
34+
minor: [7, 8]
35+
>>>>>>> master
3236
runs-on: ${{ matrix.os }}
3337
steps:
3438
- uses: actions/checkout@v3
3539
- uses: actions/setup-python@v3
40+
<<<<<<< HEAD
3641
- uses: pypa/cibuildwheel@v2.16.2
42+
=======
43+
- uses: pypa/cibuildwheel@v2.13.0
44+
>>>>>>> master
3745
with:
3846
output-dir: dist
3947
env:
4048
CIBW_BUILD: cp3${{ matrix.minor }}-*
49+
<<<<<<< HEAD
4150
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
4251
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_08.txt
4352
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_08.txt
53+
=======
54+
CIBW_ARCHS_MACOS: all
55+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-backward.txt
56+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test-backward.txt
57+
>>>>>>> master
4458
CIBW_TEST_COMMAND: pytest {project}
4559

4660
- uses: actions/upload-artifact@v3
@@ -59,11 +73,16 @@ jobs:
5973
steps:
6074
- uses: actions/checkout@v3
6175
- uses: actions/setup-python@v3
76+
<<<<<<< HEAD
6277
- uses: pypa/cibuildwheel@v2.16.2
78+
=======
79+
- uses: pypa/cibuildwheel@v2.13.0
80+
>>>>>>> master
6381
with:
6482
output-dir: dist
6583
env:
6684
CIBW_BUILD: cp3${{ matrix.minor }}-*
85+
<<<<<<< HEAD
6786
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
6887
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_11.txt
6988
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_11.txt
@@ -93,17 +112,46 @@ jobs:
93112
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
94113
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_12.txt
95114
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_12.txt
115+
=======
116+
CIBW_ARCHS_MACOS: all
117+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build.txt
118+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test.txt
119+
>>>>>>> master
96120
CIBW_TEST_COMMAND: pytest {project}
97121

98122
- uses: actions/upload-artifact@v3
99123
with:
100124
name: dist
101125
path: dist
102126

127+
forward:
128+
name: Forward / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
os: [ubuntu-22.04]
133+
minor: [11]
134+
runs-on: ${{ matrix.os }}
135+
steps:
136+
- uses: actions/checkout@v3
137+
- uses: actions/setup-python@v3
138+
- uses: pypa/cibuildwheel@v2.13.0
139+
with:
140+
output-dir: dist
141+
env:
142+
CIBW_BUILD: cp3${{ matrix.minor }}-*
143+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build.txt
144+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test-forward.txt
145+
CIBW_TEST_COMMAND: pytest {project}
146+
103147
upload:
104148
name: Publish
105149
if: github.event_name == 'release' && github.event.action == 'published'
150+
<<<<<<< HEAD
106151
needs: [tar_gz, whl_3_8, whl_gte_3_9_to_3_11, whl_3_12]
152+
=======
153+
needs: [tar_gz, whl_lt_3_9, whl_gte_3_9, forward]
154+
>>>>>>> master
107155
runs-on: ubuntu-latest
108156
steps:
109157
- uses: actions/download-artifact@v3

arraymap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# define PY_SSIZE_T_CLEAN
77
# include "Python.h"
88

9-
# define PY_ARRAY_UNIQUE_SYMBOL AK_ARRAY_API
9+
# define PY_ARRAY_UNIQUE_SYMBOL AM_ARRAY_API
1010
# define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
1111

1212
# include "numpy/arrayobject.h"

requirements-dev-3_08.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ hypothesis==6.70.0
33
invoke==1.7.1
44
pytest==7.1.2
55
tzdata==2022.1
6-
numpy==1.19.5
6+
numpy==1.19.5

requirements-test-backward.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
black==22.3.0
2+
hypothesis==6.70.0
3+
invoke==1.7.1
4+
pytest==7.1.2
5+
tzdata==2022.1
6+
numpy==1.19.5
7+

requirements-test-forward.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
black==22.3.0
2+
hypothesis==6.70.0
3+
invoke==1.7.1
4+
pytest==7.1.2
5+
numpy==1.24.3

requirements-test.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
black==22.3.0
2+
hypothesis==6.70.0
3+
invoke==1.7.1
4+
pytest==7.1.2
5+
numpy==1.23.5

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
numpy>=1.19.5
2+

test/test_property.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pickle
2-
import typing
2+
import typing as tp
33
from functools import partial
44
import sys
55
import warnings
@@ -17,7 +17,7 @@
1717
from arraymap import FrozenAutoMap
1818
from arraymap import NonUniqueError
1919

20-
Keys = typing.Set[typing.Hashable]
20+
Keys = tp.Set[tp.Union[int, str, float, bool, bytes, tp.Tuple[int, ...]]]
2121

2222
NATIVE_BYTE_ORDER = "<" if sys.byteorder == "little" else ">"
2323
VALID_BYTE_ORDERS = ("=", NATIVE_BYTE_ORDER)

0 commit comments

Comments
 (0)