cffdrs-fire 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cffdrs_fire-0.2.0/.github/pull_request_template.md +18 -0
- cffdrs_fire-0.2.0/.github/workflows/ci.yml +69 -0
- cffdrs_fire-0.2.0/.github/workflows/release.yml +175 -0
- cffdrs_fire-0.2.0/.gitignore +88 -0
- cffdrs_fire-0.2.0/LICENSE +21 -0
- cffdrs_fire-0.2.0/PKG-INFO +416 -0
- cffdrs_fire-0.2.0/README.md +374 -0
- cffdrs_fire-0.2.0/conftest.py +11 -0
- cffdrs_fire-0.2.0/docs/BACKEND_DIFFERENCES.md +89 -0
- cffdrs_fire-0.2.0/docs/CODEBASE.md +587 -0
- cffdrs_fire-0.2.0/docs/CONTRIBUTION_PROCEDURES.md +279 -0
- cffdrs_fire-0.2.0/pyproject.toml +92 -0
- cffdrs_fire-0.2.0/rust/Cargo.lock +330 -0
- cffdrs_fire-0.2.0/rust/Cargo.toml +21 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/Cargo.toml +18 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/LICENSE +21 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/examples/bench_run.rs +67 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/behavior.rs +98 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/consumption.rs +167 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/crown.rs +121 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/fbp.rs +797 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/fbp_grid.rs +1099 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/field.rs +558 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/foliar_moisture.rs +352 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/fuel.rs +428 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/grid.rs +1002 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/growth.rs +15 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/lib.rs +145 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/liveness.rs +253 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/normalize.rs +177 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/percentile.rs +201 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/quantile.rs +173 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/ros.rs +130 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/slope_wind.rs +291 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/stage.rs +446 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/src/state.rs +602 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/characterization.rs +169 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/common/cases.rs +142 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/common/mod.rs +131 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/fbp_grid.rs +1322 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/geography_and_date_inputs.rs +103 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/grid_api.rs +797 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/input_defaults.rs +42 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/nan_input_goldens.rs +171 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/non_modeled_goldens.rs +169 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/override_goldens.rs +207 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/percentile_function_goldens.rs +63 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/percentile_goldens.rs +50 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/stage_state.rs +171 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/threads.rs +138 -0
- cffdrs_fire-0.2.0/rust/crates/cffbps-rust/tests/wotton_goldens.rs +82 -0
- cffdrs_fire-0.2.0/rust/crates/cffdrs-py/Cargo.toml +21 -0
- cffdrs_fire-0.2.0/rust/crates/cffdrs-py/src/fbp_grid.rs +391 -0
- cffdrs_fire-0.2.0/rust/crates/cffdrs-py/src/lib.rs +189 -0
- cffdrs_fire-0.2.0/src/cffdrs/__init__.py +18 -0
- cffdrs_fire-0.2.0/src/cffdrs/_typing.py +22 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/__init__.py +40 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/auto.py +148 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/__init__.py +1 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/constants.py +129 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/fingerprint.py +33 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/fmc_inputs.py +82 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/inputs.py +353 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/common/season.py +44 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/cupy/__init__.py +9 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/cupy/core.py +2002 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/__init__.py +19 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/core.py +1184 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/__init__.py +6 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/behavior.py +49 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/consumption.py +172 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/crown.py +117 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/foliar_moisture.py +177 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/growth.py +154 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/ros.py +87 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/equations/slope_wind.py +324 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/python/parallel.py +297 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/rust/__init__.py +9 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/rust/_convert.py +26 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/rust/_scalar_masks.py +154 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffbps/rust/core.py +390 -0
- cffdrs_fire-0.2.0/src/cffdrs/cffwis.py +1157 -0
- cffdrs_fire-0.2.0/src/cffdrs/diurnal_ffmc_lawson.py +325 -0
- cffdrs_fire-0.2.0/src/cffdrs/py.typed +0 -0
- cffdrs_fire-0.2.0/tests/cffbps/_wotton_helpers.py +128 -0
- cffdrs_fire-0.2.0/tests/cffbps/cffbps_cupy_from_wotton2009_csv.py +95 -0
- cffdrs_fire-0.2.0/tests/cffbps/cffbps_from_wotton2009_csv.py +88 -0
- cffdrs_fire-0.2.0/tests/cffbps/conftest.py +15 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/Inputs_for_Test_Cases_Wotton2009.csv +21 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/Reference_Results.xlsx +0 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/integer_outputs_snapshot.json +362 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/non_modeled_snapshot.json +3894 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/percentile_growth_snapshot.json +1764 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/percentile_ros_function_snapshot.json +6830 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/raster_array_snapshot.json +1445 -0
- cffdrs_fire-0.2.0/tests/cffbps/data/golden/wotton2009_scalar_snapshot.json +1260 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_auto_backend.py +284 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_calculate_sentinel.py +283 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_cupy_consumption.py +59 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_equation_modules.py +42 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_fbp_regression.py +217 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_fbp_unit.py +1512 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_final_review_regressions.py +181 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_foliar_moisture.py +92 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_fuel_mask.py +175 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_missing_inputs.py +122 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_rust_backend.py +607 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_rust_fbpgrid.py +221 -0
- cffdrs_fire-0.2.0/tests/cffbps/test_rust_parity.py +258 -0
- cffdrs_fire-0.2.0/tests/cffwis/cffwis_haig_camp_stn.py +248 -0
- cffdrs_fire-0.2.0/tests/cffwis/data/golden_outputs/HaigCamp_daily_weather_results.csv +276 -0
- cffdrs_fire-0.2.0/tests/cffwis/data/golden_outputs/HaigCamp_hourly_weather_results.csv +6409 -0
- cffdrs_fire-0.2.0/tests/cffwis/data/inputs/haig_camp_bcws_stn_2023.csv +6598 -0
- cffdrs_fire-0.2.0/tests/cffwis/test_diurnal_ffmc_lawson.py +78 -0
- cffdrs_fire-0.2.0/tests/test_cffwis.py +147 -0
- cffdrs_fire-0.2.0/tests/test_check_function_order.py +404 -0
- cffdrs_fire-0.2.0/tests/test_compare_backends_scenarios.py +33 -0
- cffdrs_fire-0.2.0/tools/bench_rust_grid.py +71 -0
- cffdrs_fire-0.2.0/tools/bench_rust_stages.py +200 -0
- cffdrs_fire-0.2.0/tools/check_function_order.py +390 -0
- cffdrs_fire-0.2.0/tools/compare_backends.py +127 -0
- cffdrs_fire-0.2.0/tools/gen_fbp_goldens.py +222 -0
- cffdrs_fire-0.2.0/tools/generate_test_fbp_rasters.py +150 -0
- cffdrs_fire-0.2.0/tools/manual_fbp_test.py +344 -0
- cffdrs_fire-0.2.0/tools/probe_integer_outputs.py +46 -0
- cffdrs_fire-0.2.0/tools/smoke_test_wheel.py +132 -0
- cffdrs_fire-0.2.0/uv.lock +981 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- What changed and why. Mention changes to scientific assumptions, units, outputs, missing-value behavior, golden or oracle changes, and regression risks. -->
|
|
4
|
+
|
|
5
|
+
## Test record
|
|
6
|
+
|
|
7
|
+
Procedures: [`docs/CONTRIBUTION_PROCEDURES.md`](../docs/CONTRIBUTION_PROCEDURES.md). Do not merge while a box is unchecked.
|
|
8
|
+
|
|
9
|
+
- [ ] Full default checks (and the Rust checks, when `rust/` changed) passed locally against this PR's latest commit.
|
|
10
|
+
- [ ] Large tests were run locally against this PR's latest commit, or are not applicable (reason below).
|
|
11
|
+
|
|
12
|
+
Commit SHA:
|
|
13
|
+
Python / Rust toolchain / OS:
|
|
14
|
+
Commands:
|
|
15
|
+
Result (passed / skipped):
|
|
16
|
+
Golden / oracle / differences-register changes:
|
|
17
|
+
Large tests (cases, differences found) or not-applicable reason:
|
|
18
|
+
Additional opt-in tests or limitations:
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# Rust checks on every pull request and on pushes to feature branches and
|
|
4
|
+
# master. Lints live here rather than in the release workflow, so a new stable
|
|
5
|
+
# clippy lint blocks a PR, not a tagged release.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
pull_request:
|
|
9
|
+
push:
|
|
10
|
+
branches: ["feature/**", "master"]
|
|
11
|
+
|
|
12
|
+
# A newer push to the same PR or branch cancels the superseded run.
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
rust:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
# cffdrs-py's pyo3 build script needs a Python interpreter; pin one
|
|
23
|
+
# rather than depend on the runner image's default python3.
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.12"
|
|
27
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
with:
|
|
29
|
+
components: rustfmt, clippy
|
|
30
|
+
- name: Format
|
|
31
|
+
run: cargo fmt --manifest-path rust/Cargo.toml --all --check
|
|
32
|
+
- name: Clippy
|
|
33
|
+
run: cargo clippy --manifest-path rust/Cargo.toml --workspace --all-targets --all-features -- -D warnings
|
|
34
|
+
- name: Docs
|
|
35
|
+
run: RUSTDOCFLAGS="-D warnings" cargo doc --manifest-path rust/Cargo.toml --workspace --no-deps
|
|
36
|
+
# cffdrs-py has no Rust tests and links against Python; pytest covers it
|
|
37
|
+
# in the python job below.
|
|
38
|
+
- name: Tests
|
|
39
|
+
run: cargo test --manifest-path rust/Cargo.toml -p cffbps-rust
|
|
40
|
+
|
|
41
|
+
# The MSRV is declared once, as rust-version in rust/Cargo.toml; read it from
|
|
42
|
+
# there so this job cannot drift from the manifest.
|
|
43
|
+
rust-msrv:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- name: Read the declared MSRV
|
|
48
|
+
id: msrv
|
|
49
|
+
run: echo "version=$(grep -m1 '^rust-version' rust/Cargo.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
|
|
50
|
+
- uses: dtolnay/rust-toolchain@master
|
|
51
|
+
with:
|
|
52
|
+
toolchain: ${{ steps.msrv.outputs.version }}
|
|
53
|
+
- run: cargo check --manifest-path rust/Cargo.toml --workspace --all-targets --locked
|
|
54
|
+
|
|
55
|
+
# The Python test suite, including the native Python/Rust parity tests. The
|
|
56
|
+
# extension is built by maturin during `uv sync`.
|
|
57
|
+
python:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
- uses: astral-sh/setup-uv@v4
|
|
62
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
63
|
+
- name: Build editable package and run test suite
|
|
64
|
+
run: |
|
|
65
|
+
uv sync --python 3.12 --extra test --extra dev
|
|
66
|
+
uv run pytest -q
|
|
67
|
+
uv run ruff check src/
|
|
68
|
+
uv run mypy
|
|
69
|
+
uv run python tools/check_function_order.py
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishing uses PyPI Trusted Publishing (OIDC); no API tokens are stored in the
|
|
4
|
+
# repository. A manual run (workflow_dispatch) builds, tests and publishes to
|
|
5
|
+
# TestPyPI; a v* tag builds, tests and publishes to PyPI. Both publish jobs need the
|
|
6
|
+
# `testpypi` / `pypi` environments and a trusted publisher registered on the matching
|
|
7
|
+
# index (repository gagreene/cffdrs, workflow release.yml). The tag must equal the
|
|
8
|
+
# version in rust/crates/cffdrs-py/Cargo.toml (checked below).
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
push:
|
|
13
|
+
tags: ["v*"]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build-and-test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: astral-sh/setup-uv@v4
|
|
21
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
22
|
+
- name: Verify release tag matches package version
|
|
23
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
24
|
+
shell: bash
|
|
25
|
+
run: |
|
|
26
|
+
package_version=$(awk -F '"' '/^version = / { print $2; exit }' rust/crates/cffdrs-py/Cargo.toml)
|
|
27
|
+
test "v${package_version}" = "${GITHUB_REF_NAME}"
|
|
28
|
+
- name: Build editable package and run test suite
|
|
29
|
+
run: |
|
|
30
|
+
uv sync --extra test --extra dev
|
|
31
|
+
uv run pytest -q
|
|
32
|
+
uv run ruff check src/
|
|
33
|
+
uv run mypy
|
|
34
|
+
# fmt, clippy and doc checks run in ci.yml, so a new stable lint cannot
|
|
35
|
+
# block a tagged release.
|
|
36
|
+
# cffdrs-py has no Rust tests and links against Python; pytest covers it.
|
|
37
|
+
- name: Rust tests
|
|
38
|
+
run: cargo test --manifest-path rust/Cargo.toml -p cffbps-rust
|
|
39
|
+
|
|
40
|
+
# The MSRV is declared once, as rust-version in rust/Cargo.toml; read it from
|
|
41
|
+
# there so this job cannot drift from the manifest.
|
|
42
|
+
rust-msrv:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- name: Read the declared MSRV
|
|
47
|
+
id: msrv
|
|
48
|
+
run: echo "version=$(grep -m1 '^rust-version' rust/Cargo.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT"
|
|
49
|
+
- uses: dtolnay/rust-toolchain@master
|
|
50
|
+
with:
|
|
51
|
+
toolchain: ${{ steps.msrv.outputs.version }}
|
|
52
|
+
- run: cargo check --manifest-path rust/Cargo.toml --workspace --all-targets --locked
|
|
53
|
+
|
|
54
|
+
build-sdist:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
- uses: astral-sh/setup-uv@v4
|
|
59
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
60
|
+
- name: Build source distribution
|
|
61
|
+
run: uv build --sdist --out-dir dist
|
|
62
|
+
- uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: distributions-sdist
|
|
65
|
+
path: dist/*
|
|
66
|
+
|
|
67
|
+
build-wheels:
|
|
68
|
+
strategy:
|
|
69
|
+
fail-fast: false
|
|
70
|
+
matrix:
|
|
71
|
+
# macos-15-intel builds the x86_64 wheel (macos-13 was retired in Dec 2025);
|
|
72
|
+
# macos-latest builds the arm64 wheel.
|
|
73
|
+
os: [ubuntu-latest, macos-15-intel, macos-latest, windows-latest]
|
|
74
|
+
runs-on: ${{ matrix.os }}
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v4
|
|
77
|
+
- uses: actions/setup-python@v5
|
|
78
|
+
with:
|
|
79
|
+
python-version: "3.11"
|
|
80
|
+
- name: Build native wheel
|
|
81
|
+
uses: PyO3/maturin-action@v1
|
|
82
|
+
with:
|
|
83
|
+
command: build
|
|
84
|
+
args: >-
|
|
85
|
+
--release --locked --compatibility pypi --out dist
|
|
86
|
+
--interpreter ${{ runner.os == 'Linux' && 'python3.11' || 'python' }}
|
|
87
|
+
manylinux: "2_17"
|
|
88
|
+
sccache: true
|
|
89
|
+
- uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: distributions-${{ matrix.os }}
|
|
92
|
+
path: dist/*
|
|
93
|
+
|
|
94
|
+
# Install each built wheel into a clean virtual environment outside the
|
|
95
|
+
# checkout and exercise it, so a wheel that builds but cannot import or run
|
|
96
|
+
# (missing extension, wrong tag, broken binding) blocks publication.
|
|
97
|
+
test-wheels:
|
|
98
|
+
needs: build-wheels
|
|
99
|
+
strategy:
|
|
100
|
+
fail-fast: false
|
|
101
|
+
matrix:
|
|
102
|
+
os: [ubuntu-latest, macos-15-intel, macos-latest, windows-latest]
|
|
103
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
104
|
+
runs-on: ${{ matrix.os }}
|
|
105
|
+
steps:
|
|
106
|
+
- uses: actions/checkout@v4
|
|
107
|
+
with:
|
|
108
|
+
sparse-checkout: tools/smoke_test_wheel.py
|
|
109
|
+
sparse-checkout-cone-mode: false
|
|
110
|
+
- uses: actions/setup-python@v5
|
|
111
|
+
with:
|
|
112
|
+
python-version: ${{ matrix.python-version }}
|
|
113
|
+
- uses: actions/download-artifact@v4
|
|
114
|
+
with:
|
|
115
|
+
name: distributions-${{ matrix.os }}
|
|
116
|
+
path: ${{ runner.temp }}/dist
|
|
117
|
+
- name: Install the wheel into a clean virtual environment
|
|
118
|
+
shell: bash
|
|
119
|
+
run: |
|
|
120
|
+
python -m venv "$RUNNER_TEMP/venv"
|
|
121
|
+
if [ "$RUNNER_OS" = "Windows" ]; then PY="$RUNNER_TEMP/venv/Scripts/python.exe"; else PY="$RUNNER_TEMP/venv/bin/python"; fi
|
|
122
|
+
"$PY" -m pip install "$RUNNER_TEMP"/dist/*.whl
|
|
123
|
+
echo "VENV_PY=$PY" >> "$GITHUB_ENV"
|
|
124
|
+
- name: Smoke-test the installed wheel
|
|
125
|
+
shell: bash
|
|
126
|
+
working-directory: ${{ runner.temp }}
|
|
127
|
+
run: |
|
|
128
|
+
cp "$GITHUB_WORKSPACE/tools/smoke_test_wheel.py" .
|
|
129
|
+
"$VENV_PY" -I smoke_test_wheel.py
|
|
130
|
+
|
|
131
|
+
check-distributions:
|
|
132
|
+
needs: [build-sdist, build-wheels, test-wheels]
|
|
133
|
+
runs-on: ubuntu-latest
|
|
134
|
+
steps:
|
|
135
|
+
- uses: actions/download-artifact@v4
|
|
136
|
+
with:
|
|
137
|
+
pattern: distributions-*
|
|
138
|
+
path: dist
|
|
139
|
+
merge-multiple: true
|
|
140
|
+
- name: Check package metadata
|
|
141
|
+
run: pipx run twine check dist/*
|
|
142
|
+
- uses: actions/upload-artifact@v4
|
|
143
|
+
with:
|
|
144
|
+
name: distributions
|
|
145
|
+
path: dist/*
|
|
146
|
+
|
|
147
|
+
publish-testpypi:
|
|
148
|
+
if: github.event_name == 'workflow_dispatch'
|
|
149
|
+
needs: [build-and-test, rust-msrv, check-distributions]
|
|
150
|
+
runs-on: ubuntu-latest
|
|
151
|
+
environment: testpypi
|
|
152
|
+
permissions:
|
|
153
|
+
id-token: write
|
|
154
|
+
steps:
|
|
155
|
+
- uses: actions/download-artifact@v4
|
|
156
|
+
with:
|
|
157
|
+
name: distributions
|
|
158
|
+
path: dist
|
|
159
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
160
|
+
with:
|
|
161
|
+
repository-url: https://test.pypi.org/legacy/
|
|
162
|
+
|
|
163
|
+
publish-pypi:
|
|
164
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
165
|
+
needs: [build-and-test, rust-msrv, check-distributions]
|
|
166
|
+
runs-on: ubuntu-latest
|
|
167
|
+
environment: pypi
|
|
168
|
+
permissions:
|
|
169
|
+
id-token: write
|
|
170
|
+
steps:
|
|
171
|
+
- uses: actions/download-artifact@v4
|
|
172
|
+
with:
|
|
173
|
+
name: distributions
|
|
174
|
+
path: dist
|
|
175
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Python bytecode and caches
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Distribution / packaging
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
downloads/
|
|
10
|
+
eggs/
|
|
11
|
+
.eggs/
|
|
12
|
+
lib/
|
|
13
|
+
lib64/
|
|
14
|
+
parts/
|
|
15
|
+
sdist/
|
|
16
|
+
share/python-wheels/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg
|
|
20
|
+
*.egg-info/
|
|
21
|
+
.installed.cfg
|
|
22
|
+
MANIFEST
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
|
|
25
|
+
# Virtual environments
|
|
26
|
+
.venv/
|
|
27
|
+
venv/
|
|
28
|
+
env/
|
|
29
|
+
ENV/
|
|
30
|
+
env.bak/
|
|
31
|
+
venv.bak/
|
|
32
|
+
|
|
33
|
+
# Tool caches and reports
|
|
34
|
+
.mypy_cache/
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
.ruff_cache/
|
|
37
|
+
.pyre/
|
|
38
|
+
.hypothesis/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
coverage.xml
|
|
44
|
+
htmlcov/
|
|
45
|
+
*.cover
|
|
46
|
+
*.py,cover
|
|
47
|
+
|
|
48
|
+
# Notebooks and local databases
|
|
49
|
+
.ipynb_checkpoints/
|
|
50
|
+
*.sqlite3
|
|
51
|
+
|
|
52
|
+
# Logs and runtime artifacts
|
|
53
|
+
*.log
|
|
54
|
+
*.pid
|
|
55
|
+
*.pid.lock
|
|
56
|
+
*.seed
|
|
57
|
+
|
|
58
|
+
# IDEs and editors
|
|
59
|
+
.idea/
|
|
60
|
+
.vscode/
|
|
61
|
+
*.iml
|
|
62
|
+
|
|
63
|
+
# OS-generated files
|
|
64
|
+
.DS_Store
|
|
65
|
+
Thumbs.db
|
|
66
|
+
Desktop.ini
|
|
67
|
+
|
|
68
|
+
/tests/cffwis/data/outputs/
|
|
69
|
+
/tests/cffbps/data/outputs/
|
|
70
|
+
|
|
71
|
+
# Generated by `maturin develop` in the Python source tree
|
|
72
|
+
/src/cffdrs/_rust*.pyd
|
|
73
|
+
/src/cffdrs/_rust*.so
|
|
74
|
+
/src/cffdrs/_rust*.dylib
|
|
75
|
+
# Windows debug symbols written next to the extension
|
|
76
|
+
*.pdb
|
|
77
|
+
|
|
78
|
+
# Legacy hatch-vcs output; ignored so old development checkouts stay clean
|
|
79
|
+
/src/cffdrs/_version.py
|
|
80
|
+
|
|
81
|
+
# Development scratch directory
|
|
82
|
+
/development/
|
|
83
|
+
|
|
84
|
+
# build output (cargo package artifacts are attached to releases, not tracked)
|
|
85
|
+
rust/target/
|
|
86
|
+
|
|
87
|
+
# Local AI-assistant instruction files (not tracked)
|
|
88
|
+
CLAUDE.md
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Gregory Greene
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|