Skip to content

Commit da1d619

Browse files
authored
Update smash! (#139)
* Split out language specific code to their own crates * Introduced MkDocs for joint Rust/Python documenting * Probably other stuff
1 parent 2fd10d8 commit da1d619

File tree

331 files changed

+40333
-4439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+40333
-4439
lines changed

.github/workflows/rust-test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,19 @@ jobs:
219219

220220
- name: Run tests (Linux/macOS)
221221
if: matrix.os != 'windows-latest'
222-
run: cargo test
222+
run: cargo test --workspace
223223

224224
- name: Run tests (Windows)
225225
if: matrix.os == 'windows-latest'
226226
run: |
227-
# Run all tests with our trait re-export fix
228-
cargo test --workspace --exclude pecos-rslib
227+
# Run all non-doctest tests
228+
cargo test --workspace --exclude pecos-rslib --lib --bins --tests --examples
229+
230+
# For Windows, we need to run doctests for the pecos crate specially
231+
# to ensure they run from the crate directory
232+
cd crates/pecos
233+
cargo test --doc
234+
cd ../..
235+
236+
# Run doctests for other crates normally
237+
cargo test --workspace --exclude pecos-rslib --exclude pecos --doc
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Documentation Tests & Build
2+
3+
on:
4+
push:
5+
branches: [ master, development ]
6+
paths:
7+
- 'docs/**'
8+
pull_request:
9+
branches: [ master, development ]
10+
paths:
11+
- 'docs/**'
12+
workflow_dispatch:
13+
14+
env:
15+
RUSTFLAGS: -C debuginfo=0
16+
RUST_BACKTRACE: 1
17+
PYTHONUTF8: 1
18+
19+
jobs:
20+
docs-ci:
21+
name: Test and build documentation
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.10'
30+
31+
- name: Install the latest version of uv
32+
uses: astral-sh/setup-uv@v4
33+
with:
34+
enable-cache: true
35+
36+
- name: Set up Rust
37+
run: rustup show
38+
39+
- name: Cache Rust
40+
uses: Swatinem/rust-cache@v2
41+
with:
42+
workspaces: python/pecos-rslib
43+
44+
- name: Generate lockfile and install dependencies
45+
run: |
46+
uv lock --project .
47+
uv sync --project .
48+
49+
- name: Install pecos-rslib with maturin
50+
run: |
51+
cd python/pecos-rslib
52+
uv run maturin develop --uv
53+
54+
- name: Install quantum-pecos from local source
55+
run: |
56+
cd python/quantum-pecos
57+
uv pip install -e .
58+
59+
- name: Test working documentation examples
60+
run: |
61+
uv run python scripts/docs/test_working_examples.py
62+
63+
- name: Test all code examples
64+
run: |
65+
uv run python scripts/docs/test_code_examples.py
66+
67+
- name: Build documentation
68+
if: success()
69+
run: |
70+
uv run mkdocs build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ instance/
9191

9292
# Sphinx documentation
9393
docs/_build/
94+
python/docs/_build/
9495

9596
# PyBuilder
9697
.pybuilder/

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ IY = "IY"
88
anc = "anc"
99
Pn = "Pn"
1010
emiss = "emiss"
11+
fo = "fo"

0 commit comments

Comments
 (0)