Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #6

Open
wants to merge 106 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
400b827
:memo: Add badges
EarlMilktea Aug 12, 2024
9690cde
:technologist: Suppress harmless warns
EarlMilktea Aug 12, 2024
230e7c5
:page_facing_up: Note on license
EarlMilktea Aug 12, 2024
6ee7c80
:recycle: Use more generic annotation
EarlMilktea Aug 12, 2024
e439d3e
:recycle: Enforce __future__
EarlMilktea Aug 12, 2024
1f71bab
:heavy_plus_sign: Add sphinx
EarlMilktea Aug 12, 2024
028d1c3
:hammer: Initialize sphinx
EarlMilktea Aug 12, 2024
48a1a34
:art: Use V
EarlMilktea Aug 12, 2024
32e4b46
:memo: Setup document
EarlMilktea Aug 12, 2024
a98df3f
:wrench: Ignore some rules
EarlMilktea Aug 15, 2024
76a7d79
:rotating_light: Fix
EarlMilktea Aug 15, 2024
4d4fc2c
:recycle: Use str
EarlMilktea Aug 15, 2024
6a5f5a8
:zap: Cancel on new push
EarlMilktea Aug 15, 2024
5b5bcc6
:construction_worker: Limit permission
EarlMilktea Aug 15, 2024
bc90066
:art: Use nightly for rustfmt
EarlMilktea Aug 15, 2024
2cb7665
:coffin: Remove commented out codes
EarlMilktea Aug 15, 2024
5493cf3
:bug: Add component
EarlMilktea Aug 15, 2024
71df385
:bug: Install toolchain
EarlMilktea Aug 15, 2024
cfdc9ac
:wrench: Add rustfmt.toml
EarlMilktea Aug 15, 2024
4082f09
:heavy_plus_sign: Add rtd theme
EarlMilktea Aug 15, 2024
828d067
:wrench: Update doc config
EarlMilktea Aug 15, 2024
3083e9e
:wrench: Add nojekyll
EarlMilktea Aug 15, 2024
e5d2cdd
:technologist: Remove unnecessary config
EarlMilktea Aug 15, 2024
9c638ae
:wrench: Update config for sdist
EarlMilktea Aug 15, 2024
3d14e0e
:wrench: Update Ruff config
EarlMilktea Aug 15, 2024
a3ea3f6
:twisted_rightwards_arrows: Merge branch 'main' into postimpl-checks
EarlMilktea Aug 15, 2024
e581952
:memo: Add codecov badge
EarlMilktea Aug 15, 2024
6948600
:bug: Fix validation
EarlMilktea Aug 15, 2024
09050a4
:wrench: Allow magic comparison
EarlMilktea Aug 15, 2024
08d928e
:white_check_mark: Test _common
EarlMilktea Aug 15, 2024
dc458ca
:white_check_mark: Test UserWarning
EarlMilktea Aug 15, 2024
5672103
:white_check_mark: Test utils
EarlMilktea Aug 15, 2024
59f4b61
:white_check_mark: Test gf2_linalg
EarlMilktea Aug 15, 2024
1c3e1b8
:white_check_mark: Add warning filter
EarlMilktea Aug 15, 2024
b2d29fa
:white_check_mark: Test without Pauli
EarlMilktea Aug 15, 2024
94795fa
:truck: Move check_graph to test
EarlMilktea Aug 16, 2024
5996d6d
:white_check_mark: Test TestCase separately
EarlMilktea Aug 16, 2024
fe4245e
:rotating_light: Remove ()
EarlMilktea Aug 16, 2024
05521c3
:bulb: Update docstring
EarlMilktea Aug 16, 2024
ddb5a4d
:recycle: Comment out empty lists
EarlMilktea Aug 16, 2024
cd26b50
:white_check_mark: Cover lines
EarlMilktea Aug 16, 2024
c19f7e8
:zap: Reduce test case with miri
EarlMilktea Aug 16, 2024
8f8cc71
:white_check_mark: Call solve_in_place twice
EarlMilktea Aug 16, 2024
6eb1532
:white_check_mark: Test validate
EarlMilktea Aug 16, 2024
a8d31f9
:white_check_mark: Add panic test
EarlMilktea Aug 16, 2024
d28fd63
:white_check_mark: Add panic test
EarlMilktea Aug 16, 2024
81bcb19
:heavy_plus_sign: Add pyright
EarlMilktea Aug 22, 2024
816ad6f
:construction_worker: Setup pyright CI
EarlMilktea Aug 22, 2024
f794ef1
:pencil2: Change step name
EarlMilktea Aug 22, 2024
44407e3
:construction_worker: Setup miri
EarlMilktea Aug 22, 2024
d8888af
:construction_worker: Check root dir
EarlMilktea Aug 23, 2024
d6ef612
:truck: Merge workflows
EarlMilktea Aug 23, 2024
b8ddc17
:bug: Use dev install
EarlMilktea Aug 23, 2024
e673535
:rotating_light: Use explicit annotation
EarlMilktea Aug 23, 2024
be6ea98
:construction_worker: Use strict
EarlMilktea Aug 23, 2024
747c2be
:technologist: Remove unused __init__
EarlMilktea Aug 23, 2024
8902ae9
:technologist: Setup pyre
EarlMilktea Aug 23, 2024
2b40c7b
:rotating_light: Fix type annotations
EarlMilktea Aug 23, 2024
fea5a0c
:construction_worker: Setup pyre CI
EarlMilktea Aug 23, 2024
e1ced49
:zap: Merge CI
EarlMilktea Aug 23, 2024
48d9acf
:fire: Remove pyre
EarlMilktea Aug 27, 2024
fd281a2
:art: Format config
EarlMilktea Sep 12, 2024
543c082
:lipstick: Use furo
EarlMilktea Oct 10, 2024
ba8a633
:adhesive_bandage: Fix link
EarlMilktea Oct 10, 2024
808f4de
:coffin: Remove pyre_configuration
EarlMilktea Oct 10, 2024
01ac69a
:children_crossing: Move types- to dev
EarlMilktea Oct 10, 2024
10d4778
:wrench: Update cov config
EarlMilktea Oct 10, 2024
13452cf
:arrow_up: Upgrade deps.
EarlMilktea Oct 20, 2024
b1d31df
:bulb: Note on usage
EarlMilktea Oct 20, 2024
a2ef97d
:arrow_down: Downgrade hashbrown
EarlMilktea Oct 20, 2024
2aaa69e
:sparkles: Impl. validation
EarlMilktea Oct 20, 2024
007d9cc
:construction: Wrap verify
EarlMilktea Oct 20, 2024
03d84c1
:heavy_plus_sign: Add sphinx_autodoc_typehints
EarlMilktea Oct 20, 2024
717494c
:recycle: Remove unnecessary docstring
EarlMilktea Oct 20, 2024
42ee507
:wrench: Set default role
EarlMilktea Oct 20, 2024
c118c00
:recycle: Remove explicit type documentation
EarlMilktea Oct 20, 2024
4770624
:memo: Update documents
EarlMilktea Oct 20, 2024
eded83e
:memo: Update docstring
EarlMilktea Oct 21, 2024
08af6a7
:memo: Manually add documentation
EarlMilktea Oct 21, 2024
5947853
:white_check_mark: Test verify
EarlMilktea Oct 22, 2024
a0e2c6b
:bulb: Add no cover pragma
EarlMilktea Oct 22, 2024
a63aa5c
:test_tube: Add python-side tests
EarlMilktea Oct 22, 2024
d0f7584
:white_check_mark: Fix test
EarlMilktea Oct 22, 2024
172bd1f
:art: Quote python version
EarlMilktea Oct 22, 2024
a90ed80
:heavy_plus_sign: Add thiserror
EarlMilktea Oct 26, 2024
5f6953a
:recycle: Impl. errors
EarlMilktea Oct 26, 2024
61258dc
:memo: Update doc
EarlMilktea Oct 26, 2024
83f7876
:wrench: Enforce __future__
EarlMilktea Oct 27, 2024
65054ca
:memo: Update docstring
EarlMilktea Oct 29, 2024
0522284
:wrench: Specify target files
EarlMilktea Oct 29, 2024
68dfbb5
:wrench: Support py3.13
EarlMilktea Oct 29, 2024
1fbbfe0
:bento: Add examples
EarlMilktea Oct 29, 2024
23c8362
:construction_worker: Add doc CI
EarlMilktea Oct 29, 2024
91e1f30
:technologist: Add __init__.py
EarlMilktea Oct 29, 2024
44856d9
:memo: Update docstring
EarlMilktea Nov 4, 2024
2fd08cc
:wrench: Update doc build config
EarlMilktea Nov 4, 2024
f7a2947
:children_crossing: Link manually
EarlMilktea Nov 4, 2024
30d9c0b
:children_crossing: Include error info.
EarlMilktea Nov 4, 2024
74d67a6
:recycle: Include self
EarlMilktea Nov 4, 2024
0c0c284
:construction: Add error decoder
EarlMilktea Nov 4, 2024
5933e00
:memo: Update docstring
EarlMilktea Nov 5, 2024
185d2a8
:heavy_plus_sign: Add sphinxcontrib-bibtex
EarlMilktea Nov 5, 2024
2238f37
:card_file_box: Add ref.bib
EarlMilktea Nov 5, 2024
a251920
:memo: Include bib in doc
EarlMilktea Nov 5, 2024
c86436e
:bulb: Remove comment
EarlMilktea Nov 5, 2024
7a8d535
:memo: Update docstring
EarlMilktea Nov 5, 2024
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
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coverage:
project:
default:
informational: true

patch:
default:
informational: true
33 changes: 22 additions & 11 deletions .github/workflows/check_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ruff_check:
ruff:
runs-on: ubuntu-latest

steps:
Expand All @@ -19,7 +23,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"

- name: Setup Ruff
run: |
Expand All @@ -31,7 +35,15 @@ jobs:
pip install ruff
ruff check

ruff_format:
- name: Run ruff isort
run: |
ruff check --select I --fix

- name: Run ruff format
run: |
ruff format

staticcheck:
runs-on: ubuntu-latest

steps:
Expand All @@ -41,17 +53,16 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"

- name: Setup Ruff
run: |
- run: |
python3 -m pip install -U pip
pip install ruff
pip install .[dev]

- name: Run ruff format
- name: Run mypy
run: |
ruff format
mypy

- name: Run ruff isort
- name: Run pyright
run: |
ruff check --select I --fix
pyright
38 changes: 12 additions & 26 deletions .github/workflows/check_rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,30 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
rustfmt:
lint_rs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: rustup update
- run: |
rustup update
# Use nightly for rustfmt
rustup toolchain install --allow-downgrade nightly
rustup component add --toolchain nightly rustfmt

- uses: actions/setup-python@v5
with:
python-version: 3.8

# Necessary for nektos/act
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# components: rustfmt
python-version: "3.8"

- name: Run rustfmt
run: |
cargo fmt -- --check

clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: rustup update

- uses: actions/setup-python@v5
with:
python-version: 3.8

# Necessary for nektos/act
# - uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# components: clippy
cargo +nightly fmt -- --check

- name: Run clippy
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pip install pipenv
# Use development build
pipenv install -e .[dev]
pipenv run pytest --cov=./python --cov-report=xml
pipenv run pytest --cov-report=xml

- uses: codecov/codecov-action@v4
with:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: doc

on: [pull_request]

permissions:
contents: read

jobs:
build_docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: rustup update

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- run: |
python3 -m pip install -U pip
pip install -e .[dev,doc]

- name: Run examples
run: |
for file in examples/*.py; do
python3 ${file}
done

- run: sphinx-build docs/source docs/build --fail-on-warning
32 changes: 0 additions & 32 deletions .github/workflows/mypy.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/test_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pytest:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

name: "py${{ matrix.python }}_${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand All @@ -28,9 +32,6 @@ jobs:
with:
python-version: ${{ matrix.python }}

# Necessary for nektos/act
# - uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Run Python tests
# MEMO: DO NOT use `pip install .`
# We need to test with debug build
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/test_rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cargo_test:
runs-on: ubuntu-latest
Expand All @@ -19,11 +23,28 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8

# Necessary for nektos/act
# - uses: actions-rust-lang/setup-rust-toolchain@v1
python-version: "3.8"

- name: Run Rust tests
run: |
cargo test

cargo_miri:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: |
rustup update
# Use nightly for miri
rustup toolchain install --allow-downgrade nightly
rustup component add --toolchain nightly miri

- uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Run Rust tests with miri
run: |
cargo +nightly miri test
19 changes: 13 additions & 6 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
windows:
runs-on: windows-latest
Expand All @@ -21,7 +28,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"
architecture: ${{ matrix.target }}

- run: |
Expand Down Expand Up @@ -58,7 +65,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"
architecture: x64

- run: |
Expand Down Expand Up @@ -102,7 +109,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"
architecture: x64

- run: |
Expand Down Expand Up @@ -139,7 +146,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"
architecture: x64

- run: |
Expand Down Expand Up @@ -186,7 +193,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"

- run: |
python3 -m pip install -U pip
Expand Down Expand Up @@ -232,7 +239,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.8"

- run: |
python3 -m pip install -U pip
Expand Down
Empty file added .nojekyll
Empty file.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ crate-type = ["cdylib"]
[dependencies]
anyhow = "1"
fixedbitset = "0.5"
hashbrown = "0.14"
hashbrown = "0.14" # Cannot use 0.15 for compatibility with pyo3
itertools = "0.13"
pyo3 = { version = "0.22", features = ["abi3-py38", "hashbrown"] }
thiserror = "1"
tracing = "0.1"

[dev-dependencies]
rand = "0.8"
rstest = "0.22"
rstest = "0.23"
rstest_reuse = "0.7"
test-log = { version = "0.2", features = ["trace"] }
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ verify_ssl = true
name = "pypi"

[packages]
fastflow = {extras = ["dev"], file = ".", editable = true}
fastflow = {extras = ["dev", "doc"], file = ".", editable = true}

[dev-packages]
maturin = "<2,>=1"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# fastflow

[![License](https://img.shields.io/github/license/TeamGraphix/fastflow)](https://github.com/TeamGraphix/fastflow?tab=Apache-2.0-1-ov-file)
[![test_rs](https://github.com/TeamGraphix/fastflow/actions/workflows/test_rs.yml/badge.svg)](https://github.com/TeamGraphix/fastflow/actions/workflows/test_rs.yml)
[![test_py](https://github.com/TeamGraphix/fastflow/actions/workflows/test_py.yml/badge.svg)](https://github.com/TeamGraphix/fastflow/actions/workflows/test_py.yml)
[![codecov](https://codecov.io/github/TeamGraphix/fastflow/graph/badge.svg?token=JPLJWWPNF4)](https://codecov.io/github/TeamGraphix/fastflow)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

Rust binding of generalized and pauli flow finding algorithms.

## License

This project is licensed under the Apache-2.0 License.
Loading
Loading