Skip to content

Commit

Permalink
upgrade actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed May 21, 2024
1 parent 124204f commit b1253e1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
run:
working-directory: rormula
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
working-directory: rormula
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: rormula/dist
Expand All @@ -37,8 +37,8 @@ jobs:
matrix:
target: [x86_64, x86, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
Expand All @@ -50,7 +50,7 @@ jobs:
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: rormula/dist
Expand All @@ -65,8 +65,8 @@ jobs:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
Expand All @@ -78,7 +78,7 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: rormula/dist
Expand All @@ -93,8 +93,8 @@ jobs:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
Expand All @@ -105,7 +105,7 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: rormula/dist
Expand All @@ -119,7 +119,7 @@ jobs:
working-directory: rormula
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Publish to PyPI
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
test-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Test
run: cargo test --verbose
- name: Clippy
Expand All @@ -21,9 +21,9 @@ jobs:
run:
working-directory: rormula
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run CI
Expand Down
3 changes: 3 additions & 0 deletions rormula/test/test_wilkinson.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ def timing_and_test(data, formula_str):
# keeping data numerical and categorical data separated is faster
separated_data = ror.separate_num_cat(data)
M_r = timing(partial(rormula.eval, data=separated_data), "Rormula")
M_r_asdf = timing(partial(rormula.eval_asdf, data=data), "Rormula asdf")

assert M_r is not None
assert M_r_asdf is not None
names, M_r = M_r
if len(names) == 0:
return
M_r = pd.DataFrame(data=M_r, columns=names)
assert np.allclose(M_r, M_r_asdf)
formula = formulaic.Formula(formula_str.replace("^", "**"))
M_f = timing(partial(formula.get_model_matrix, data=data), "Formulaic")

Expand Down

0 comments on commit b1253e1

Please sign in to comment.