-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib): add
compute_paths
method for image method and "coherence…
…" of paths example (#117) * chore(lib): warn about overflow and add Rust coverage * fix(ci): setup Python inside container * chore(ci): does it work? * chore(ci): setup-python reads `.python-version` * fix(ci): `.python-version` * fix(ci): install cargo-tarpaulin manually * WIP on coherence * chore(lib): add masked vertices * chore(deps): bump JAX and Python>=3.10 * chore(lib): upgrade Python 3.10 and add fibonacci lattice * chore(lint): some fixes * fix(docs): typos * chore(docs): improve * fix(docs): typo * chore(tests): improved coverage * fix(docs): explicit variable name * chore(fmt): run ruff * try(docs): comment code * chore(docs): add reference to paper * wip(lib): ray casting for visibility check * chore(lib): avoid unnecessary broadcasting * chore(docs): cleanup * chore(lib): avoid unnecessary broadcasting * wip: addressing last issues * chore(lib): are we done with broadcasting? * chore(tests): improve PLY parsing and test logging * feat(lib): support reading materials from OBJ files * chore(lint): happy linting * chore(ci): codedoc ignore pyo3 modules * chore(docs): clear nb * fix(ci): justfile * fix(tests): remove materials * fix(lib): use re-entrant lock and add more tests * fix(ci): tests and justfile * chore(ci): disable xdist in CI * try(ci): or this? * chore(tests): one more test * feat(lib): use IndexMap to have reproducible results * fix(tests): lots of fixes and better naming * fix(ci): remove post-install * chore(lib): better defaults for hit tolerance and epsilon value * feat(lib): allow to iterate over chunks * chore(ci): remove fail on warning * chore(tests): add new benchmarks * fix(ci): fixes * chore(ci): codspeed * fix(ci): oops * fix(ci): use uv? * fix(tests): import * try(ci): fix? * try(ci): use real pip? * fix(ci): don't use uv * try(ci): :-( * fix(ci): oops * fix(deps): pin `numpy<2` See PyO3/rust-numpy#409 * chore(deps): update lock file * chore(tests): cleanup * chore(ci): disable xdist when benchmarking * chore(ci): force set `-n0` * chore(ci): remove Rust bench from comments * chore(ci): update * try(ci): add stupid benchmark * try... * fix(ci): install from local packages, not remote * fix(ci): missing interpolation * fix(ci): pip install actually * fix(ci): actually it was installing from remote :o * wip * fix(ci): finally * fix(ci): apt_packages are no longer installed * can we sudo? * :-( * fix(ci): rtd build * fix(ci): point to venv * chore(ci): use asdf install instead * fix(ci): must also install self
- Loading branch information
Showing
83 changed files
with
27,409 additions
and
26,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ jobs: | |
run: uv run pre-commit run --all-files | ||
|
||
- name: Apply fixes when present | ||
uses: pre-commit-ci/[email protected].2 | ||
uses: pre-commit-ci/[email protected].3 | ||
if: always() | ||
with: | ||
msg: 'chore(fmt): auto fixes from pre-commit hooks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ jobs: | |
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install dependencies | ||
run: uv sync --no-dev --extra tests | ||
run: uv sync --locked --no-dev --extra tests | ||
|
||
- name: Run tests | ||
run: uv run pytest | ||
|
@@ -63,7 +63,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
pyversion: ['3.9', '3.10', '3.11', '3.12'] | ||
pyversion: ['3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
|
@@ -120,28 +120,30 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
id: setup-python | ||
with: | ||
cache: pip | ||
cache-dependency-path: uv.lock | ||
|
||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v2 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools | ||
|
||
- name: Install dependencies | ||
run: pip install ".[tests]" | ||
- name: Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run Benchmarks on changes | ||
run: pytest --benchmark-only --benchmark-save=changes differt-core/tests/benchmarks | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml --extra tests --python '${{ steps.setup-python.outputs.python-path }}' | ||
|
||
- name: Build wheel with profiling profile | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
args: > | ||
--release | ||
--out pgo-wheel | ||
working-directory: differt-core | ||
- name: Build differt-core for profiling | ||
run: | | ||
rm -f python/differt_core/*.so | ||
pip install -e . --config-settings=build-args='--profile profiling' | ||
working-directory: differt-core | ||
env: | ||
RUSTFLAGS: -Cprofile-generate=${{ github.workspace }}/profdata | ||
|
||
|
@@ -150,79 +152,23 @@ jobs: | |
shell: bash | ||
|
||
- name: Generate profile data | ||
run: | | ||
python -m ensurepip | ||
python -m pip install differt-core --no-index --no-deps --find-links differt-core/pgo-wheel --force-reinstall | ||
pytest --benchmark-only differt-core/tests/benchmarks | ||
rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"' | ||
run: pytest --dist=no -n0 --benchmark-enable differt/tests/benchmarks | ||
|
||
- name: Merge GO data | ||
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata | ||
- name: Merge PGO data | ||
run: rustup run stable bash -c '$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata' | ||
|
||
- name: Build PGO-optimized wheel | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
args: > | ||
--release | ||
--out opt-wheel | ||
working-directory: differt-core | ||
- name: Build differt-core for benchmarking | ||
run: | | ||
rm -f python/differt_core/*.so | ||
pip install -e . --config-settings=build-args='--profile profiling' | ||
working-directory: differt-core | ||
env: | ||
RUSTFLAGS: -Cprofile-use=${{ github.workspace }}/merged.profdata | ||
|
||
- name: Run Benchmarks on changes with PGO-optimized wheel | ||
run: | | ||
python -m pip install differt-core --no-index --no-deps --find-links differt-core/opt-wheel --force-reinstall | ||
pytest --benchmark-only --benchmark-save=pgo differt-core/tests/benchmarks | ||
- name: Checkout base branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
clean: false | ||
|
||
- name: Install dependencies (before changes) | ||
run: pip install ".[tests]" | ||
|
||
- name: Build wheel before changes | ||
uses: PyO3/maturin-action@v1 | ||
- name: Run CodSpeed benchmarks | ||
uses: CodSpeedHQ/action@v3 | ||
with: | ||
args: > | ||
--release | ||
--out dist | ||
working-directory: differt-core | ||
|
||
- name: Run Benchmarks before changes | ||
run: | | ||
python -m pip install differt-core --no-index --no-deps --find-links differt-core/dist --force-reinstall | ||
pytest --benchmark-only --benchmark-save=before differt-core/tests/benchmarks | ||
- name: Compare benchmarks | ||
run: | | ||
echo 'results<<EOF' >> $GITHUB_OUTPUT | ||
pytest-benchmark compare --group-by=name --columns="mean,stddev,ops" >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
id: compare | ||
|
||
- name: Comment PR with benchmarks | ||
uses: thollander/actions-comment-pull-request@v2 | ||
continue-on-error: true | ||
with: | ||
message: | | ||
Python benchmark results: | ||
``` | ||
${{ steps.compare.outputs.results }} | ||
``` | ||
comment_tag: python-benchmarks | ||
|
||
id: comment | ||
|
||
- name: If PR comment failed, write to PR summary | ||
if: steps.comment.outcome != 'success' | ||
run: | | ||
echo '### Python benchmark results' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
echo '${{ steps.compare.outputs.results }}' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
run: pytest differt/tests/benchmarks --codspeed | ||
|
||
rust-benchmark: | ||
runs-on: ubuntu-latest | ||
|
@@ -232,57 +178,20 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Install NumPy | ||
run: pip install numpy | ||
run: pip install "numpy<2" | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Run Benchmarks on changes | ||
run: cargo bench --bench bench_main -- --save-baseline changes | ||
|
||
- name: Checkout base branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
clean: false | ||
|
||
- name: Run Benchmarks before changes | ||
run: cargo bench --bench bench_main -- --save-baseline before | ||
- name: Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Compare benchmarks | ||
run: | | ||
echo 'results<<EOF' >> $GITHUB_OUTPUT | ||
critcmp before changes >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
id: compare | ||
|
||
- name: Comment PR with benchmarks | ||
uses: thollander/actions-comment-pull-request@v2 | ||
continue-on-error: true | ||
with: | ||
message: | | ||
Rust benchmark results: | ||
``` | ||
${{ steps.compare.outputs.results }} | ||
``` | ||
comment_tag: rust-benchmarks | ||
|
||
id: comment | ||
|
||
- name: If PR comment failed, write to PR summary | ||
if: steps.comment.outcome != 'success' | ||
run: | | ||
echo '### Rust benchmark results' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
echo '${{ steps.compare.outputs.results }}' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
- name: Run Benchmarks | ||
run: cargo bench | ||
|
||
linkcheck-docs: | ||
runs-on: ubuntu-latest | ||
|
@@ -296,7 +205,7 @@ jobs: | |
enable-cache: true | ||
|
||
- name: Install dependencies | ||
run: uv sync --no-dev --extra docs | ||
run: uv sync --locked --no-dev --extra docs | ||
|
||
- name: Install Just | ||
uses: taiki-e/install-action@just | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ differt/src/differt/scene/scenes/ | |
|
||
# Tools | ||
|
||
.coverage | ||
.benchmarks/ | ||
.coverage* | ||
coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.