diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7f30b85..085c84c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: run: working-directory: rormula steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build sdist uses: PyO3/maturin-action@v1 with: @@ -22,7 +22,7 @@ jobs: 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 @@ -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 @@ -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 @@ -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 }} @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5ff8bdb..320cdc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/rormula/test/test_wilkinson.py b/rormula/test/test_wilkinson.py index 1fdfe1b..da4a422 100644 --- a/rormula/test/test_wilkinson.py +++ b/rormula/test/test_wilkinson.py @@ -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")