Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
459e80e
first attempt
s3alfisc Apr 20, 2025
cff0ec9
first attempt
s3alfisc Apr 20, 2025
5b9cbf6
its working?
s3alfisc Apr 21, 2025
a4fe5b7
its working?
s3alfisc Apr 21, 2025
ed96639
cleanups
s3alfisc Apr 22, 2025
e9c72eb
chore: Add release profile to Cargo.toml
schroedk May 15, 2025
692fe09
chore: Add pixi-pycharm and pytest-benchmark dependencies
schroedk May 15, 2025
9a02c32
fix: Prefix unused variables with underscore to silence warnigs
schroedk May 15, 2025
27552b2
refactor: Rewrite demean in more rust idiomatic way, add python modul…
schroedk May 15, 2025
9ff37f7
chore: Use pytest-benchmark to compare backends on test function
schroedk May 15, 2025
be29f5b
chore: Result of cargo fmt
schroedk May 16, 2025
e4ec51b
refactor: Write the crv1_meat_loop function in a more rust idiomatic way
schroedk May 16, 2025
ccfe5f9
refactor: Rewrite count_fixef_fully_nested_all_rs function in a more …
schroedk May 19, 2025
8040d92
refactor: Implement find_collinear_variables_rs in a more Rust idomat…
schroedk May 21, 2025
c5c0bc2
refactor: Compute r-matrix update in parallel
schroedk May 21, 2025
e75647c
fix: Use correct indexing convention of ndarray
schroedk May 21, 2025
32994c4
refactor: Split rust implementation and python binding
schroedk May 21, 2025
3449dde
chore: Add thiserror crate to dependencies
schroedk May 21, 2025
c11e48d
feature: Add error handling to find_collinear_variables_rs
schroedk May 21, 2025
8deff15
chore: Result of cargo fmt
schroedk May 21, 2025
dba4f90
feature: Add default argument for tol in find_collinear_variables_rs
schroedk May 21, 2025
61ed97d
refactor: Move rust code to toplevel src folder, mv cargo files to to…
schroedk May 22, 2025
282c5c1
chore: Delete obsolete files
schroedk May 23, 2025
b729eb4
chore: Change lib name in Cargo.toml
schroedk May 23, 2025
035b5a0
chore: Add target folder to .gitignore
schroedk May 23, 2025
7526b74
chore: Change build system to maturin, include _core_impl as python e…
schroedk May 23, 2025
c5dea53
chore: Update pixi.lock
schroedk May 23, 2025
a7570a5
refactor: Update rust implementation, simplify collinear
schroedk May 23, 2025
bccb221
refactor: Update tests for rust components
schroedk May 23, 2025
aa96bca
feature: Add new subpackage pyfixest/core profiding the bindings to rust
schroedk May 23, 2025
bfc1751
fix: Fix backend definition for rust
schroedk May 23, 2025
81aa9cb
fix: Change maturin-develop pixi command
schroedk May 23, 2025
398f19f
chore: Update pixi.lock
schroedk May 23, 2025
f083ba0
chore: Update pixi.lock
schroedk May 23, 2025
723398c
fix: Fix not running tests for demeaning
schroedk May 23, 2025
67cc1e9
Merge pull request #905 from schroedk/rust
s3alfisc May 25, 2025
069fe2f
Merge branch 'master' into rust
s3alfisc May 25, 2025
9040869
update envs
s3alfisc May 29, 2025
cc1cdb7
fix small test labeling error
s3alfisc May 29, 2025
76ad75f
update CI pipelines
s3alfisc May 29, 2025
7d342f6
lock
s3alfisc May 29, 2025
3551cc7
Update src/collinear.rs
s3alfisc May 31, 2025
072f133
DemeanerBackendOptions
s3alfisc Jun 1, 2025
8b850e1
add docs for src funs
s3alfisc Jun 2, 2025
36fa7d1
update collinears.rs
s3alfisc Jun 2, 2025
8261c52
update docs for DemeanerOptions
s3alfisc Jun 2, 2025
759cb2a
update gitignore
s3alfisc Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 222 additions & 0 deletions .github/workflows/build-and-relase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# This file is autogenerated by maturin v1.8.6
# To update, run
#
# maturin generate-ci github --platform all
#
name: CI

on:
push:
branches:
- master
tags:
- '*'
workflow_dispatch:

permissions:
contents: read

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-22.04
target: ppc64le
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

emscripten:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: wasm32-unknown-emscripten
steps:
- uses: actions/checkout@v4
- run: pip install pyodide-build
- name: Get Emscripten and Python version info
shell: bash
run: |
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV
echo PYTHON_VERSION=$(pyodide config get python_version | cut -d '.' -f 1-2) >> $GITHUB_ENV
pip uninstall -y pyodide-build
- uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
actions-cache-folder: emsdk-cache
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: pip install pyodide-build
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i ${{ env.PYTHON_VERSION }}
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
rust-toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wasm-wheels
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, emscripten, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: 'wheels-*/*'
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
wasm-wheels/*.whl
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
6 changes: 6 additions & 0 deletions .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
mkdir -p $R_LIB_PATH
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages(c('did2s', 'wildrwolf', 'ivDiag'), lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://cran.rstudio.com', 'https://s3alfisc.r-universe.dev'))"
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages('ritest', lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://grantmcdermott.r-universe.dev'))"


- name: Compile Rust extension (no wheel)
run: |
pixi r maturin-develop

- name: Run 'regular' tests
run: |
pixi run tests-regular
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/extended_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ jobs:
mkdir -p $R_LIB_PATH
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages(c('did2s', 'wildrwolf', 'ivDiag'), lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://cran.rstudio.com', 'https://s3alfisc.r-universe.dev'))"
Rscript -e ".libPaths('$R_LIB_PATH'); install.packages('ritest', lib='/home/runner/work/pyfixest/pyfixest/.pixi/envs/dev/lib/R/library', repos = c('https://grantmcdermott.r-universe.dev'))"

- name: Compile Rust extension (no wheel)
run: |
pixi r maturin-develop

- name: Run long tests with coverage
run: pixi run tests-extended

Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ tests/.coverage
.pixi
*.egg-info
pyfixest/did/data/mpdata.csv
target
# Ignore compiled Python extensions from Rust (PyO3/maturin/pyo3-pack)
*.so
*.pyd
*.dll
*.dylib
Loading
Loading