Skip to content

Api - #7

Merged
JeremieGince merged 6 commits into
devfrom
api
Jun 11, 2026
Merged

Api#7
JeremieGince merged 6 commits into
devfrom
api

Conversation

@JeremieGince

@JeremieGince JeremieGince commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request removes legacy and temporary files related to alternative Pfaffian implementations and updates the build and test workflows to support a new Rust-based native extension. The documentation is also updated to describe native acceleration options and usage.

Build and Test Workflow Improvements:

  • Added steps to install the Rust toolchain in both the distribution build (build_dist.yml) and test (tests.yml) GitHub Actions workflows, enabling compilation of the Rust native extension. [1] [2] [3]
  • Updated the test workflow to build the native extension using maturin before running tests, ensuring that tests cover the Rust-accelerated code path. [1] [2]

Documentation Updates:

  • Expanded the README.md with instructions for building and using the Rust-accelerated native extension, including usage examples and strategy selection details.

Codebase Cleanup:

  • Removed archives/_pfaffian.py, a temporary file containing reference and experimental implementations of Pfaffian algorithms.
  • Removed archives/_test_pfaffian.py, a test suite for the removed temporary implementations.
  • Removed archives/pfaffian_perm.py, an alternative strategy for computing the Pfaffian based on permutations, which is no longer required.

Checklist

Please complete the following checklist when submitting a PR. The PR will not be reviewed until all items are checked.

  • All new features include a unit test.
    Make sure that the tests passed and the coverage is
    sufficient by running
    uv run pytest --session-timeout=600.
  • All new functions and code are clearly documented.
  • The code passes all pre-commit hooks.
    You can do this by running uvx pre-commit run --all-files.
  • The code is type-checked using Mypy.
    You can do this by running uv run mypy src tests.

@github-actions

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
238 238 100% 98% 🟢

New Files

File Coverage Status
src/torch_pfaffian/strategies/pfaffian_parlett_reid.py 100% 🟢
src/torch_pfaffian/strategies/pfaffian_rust_parlett_reid.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/torch_pfaffian/init.py 100% 🟢
src/torch_pfaffian/strategies/init.py 100% 🟢
src/torch_pfaffian/strategies/pfaffian_block_det.py 100% 🟢
src/torch_pfaffian/strategies/strategy.py 100% 🟢
TOTAL 100% 🟢

updated for commit: e4d5163 by action🐍

@JeremieGince
JeremieGince merged commit 6b079ad into dev Jun 11, 2026
11 checks passed
@JeremieGince
JeremieGince deleted the api branch June 11, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant