hf-simulation 2026.9.1__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.
Files changed (70) hide show
  1. hf_simulation-2026.9.1/.github/workflows/ci.yml +26 -0
  2. hf_simulation-2026.9.1/.github/workflows/publish-PyPI.yml +104 -0
  3. hf_simulation-2026.9.1/.gitignore +28 -0
  4. hf_simulation-2026.9.1/.yamllint.yml +17 -0
  5. hf_simulation-2026.9.1/Cargo.lock +1285 -0
  6. hf_simulation-2026.9.1/Cargo.toml +39 -0
  7. hf_simulation-2026.9.1/PHYSICS.md +404 -0
  8. hf_simulation-2026.9.1/PKG-INFO +115 -0
  9. hf_simulation-2026.9.1/README.md +98 -0
  10. hf_simulation-2026.9.1/crates/hb_high/Cargo.toml +47 -0
  11. hf_simulation-2026.9.1/crates/hb_high/benches/alpine.rs +441 -0
  12. hf_simulation-2026.9.1/crates/hb_high/benches/kernels.rs +561 -0
  13. hf_simulation-2026.9.1/crates/hb_high/benches/whole.rs +214 -0
  14. hf_simulation-2026.9.1/crates/hb_high/src/config.rs +385 -0
  15. hf_simulation-2026.9.1/crates/hb_high/src/fft.rs +244 -0
  16. hf_simulation-2026.9.1/crates/hb_high/src/geom.rs +270 -0
  17. hf_simulation-2026.9.1/crates/hb_high/src/input.rs +460 -0
  18. hf_simulation-2026.9.1/crates/hb_high/src/lib.rs +67 -0
  19. hf_simulation-2026.9.1/crates/hb_high/src/radiation.rs +324 -0
  20. hf_simulation-2026.9.1/crates/hb_high/src/ray.rs +653 -0
  21. hf_simulation-2026.9.1/crates/hb_high/src/rng/compat.rs +186 -0
  22. hf_simulation-2026.9.1/crates/hb_high/src/rng/fixture.rs +135 -0
  23. hf_simulation-2026.9.1/crates/hb_high/src/rng/mod.rs +250 -0
  24. hf_simulation-2026.9.1/crates/hb_high/src/rng/pcg.rs +50 -0
  25. hf_simulation-2026.9.1/crates/hb_high/src/sim.rs +1661 -0
  26. hf_simulation-2026.9.1/crates/hb_high/src/site.rs +189 -0
  27. hf_simulation-2026.9.1/crates/hb_high/src/state.rs +236 -0
  28. hf_simulation-2026.9.1/crates/hb_high/src/stoc.rs +689 -0
  29. hf_simulation-2026.9.1/crates/hb_high/tests/common/mod.rs +145 -0
  30. hf_simulation-2026.9.1/crates/hb_high/tests/properties.proptest-regressions +7 -0
  31. hf_simulation-2026.9.1/crates/hb_high/tests/properties.rs +1096 -0
  32. hf_simulation-2026.9.1/crates/hb_high/tests/snapshot.rs +244 -0
  33. hf_simulation-2026.9.1/crates/hb_high/tests/tier0_golden.rs +316 -0
  34. hf_simulation-2026.9.1/crates/hb_high/tests/tier4_golden.rs +203 -0
  35. hf_simulation-2026.9.1/harness/alpine_scaling.csv +14 -0
  36. hf_simulation-2026.9.1/harness/bench_baseline.csv +8 -0
  37. hf_simulation-2026.9.1/harness/bench_summary.py +223 -0
  38. hf_simulation-2026.9.1/harness/fixtures/stoch/alpine_base_r1.stoch +36 -0
  39. hf_simulation-2026.9.1/harness/fixtures/velocity_model +35 -0
  40. hf_simulation-2026.9.1/harness/golden/snapshot.txt +4 -0
  41. hf_simulation-2026.9.1/harness/golden/tier0/cr.bin +0 -0
  42. hf_simulation-2026.9.1/harness/golden/tier0/delaz5.bin +0 -0
  43. hf_simulation-2026.9.1/harness/golden/tier0/flzero.bin +0 -0
  44. hf_simulation-2026.9.1/harness/golden/tier0/rdatn.bin +0 -0
  45. hf_simulation-2026.9.1/harness/golden/tier0/siteamp.bin +0 -0
  46. hf_simulation-2026.9.1/harness/golden/tier4/gf_amp_tt.bin +0 -0
  47. hf_simulation-2026.9.1/harness/golden/tier4/stoc_f.bin +0 -0
  48. hf_simulation-2026.9.1/harness/plot_scaling.py +170 -0
  49. hf_simulation-2026.9.1/harness/scaling.png +0 -0
  50. hf_simulation-2026.9.1/harness/scaling.svg +2164 -0
  51. hf_simulation-2026.9.1/hf_simulation/__init__.py +442 -0
  52. hf_simulation-2026.9.1/hf_simulation/_hf_simulation.pyi +128 -0
  53. hf_simulation-2026.9.1/hf_simulation/dataset.py +86 -0
  54. hf_simulation-2026.9.1/hf_simulation.egg-info/PKG-INFO +115 -0
  55. hf_simulation-2026.9.1/hf_simulation.egg-info/SOURCES.txt +68 -0
  56. hf_simulation-2026.9.1/hf_simulation.egg-info/dependency_links.txt +1 -0
  57. hf_simulation-2026.9.1/hf_simulation.egg-info/requires.txt +12 -0
  58. hf_simulation-2026.9.1/hf_simulation.egg-info/scm_file_list.json +65 -0
  59. hf_simulation-2026.9.1/hf_simulation.egg-info/scm_version.json +8 -0
  60. hf_simulation-2026.9.1/hf_simulation.egg-info/top_level.txt +1 -0
  61. hf_simulation-2026.9.1/lefthook.yml +70 -0
  62. hf_simulation-2026.9.1/pyproject.toml +122 -0
  63. hf_simulation-2026.9.1/rustfmt.toml +1 -0
  64. hf_simulation-2026.9.1/setup.cfg +4 -0
  65. hf_simulation-2026.9.1/src-rust/Cargo.toml +20 -0
  66. hf_simulation-2026.9.1/src-rust/lib.rs +436 -0
  67. hf_simulation-2026.9.1/tests/test_batch.py +301 -0
  68. hf_simulation-2026.9.1/tests/test_dataset.py +93 -0
  69. hf_simulation-2026.9.1/tests/test_stub.py +161 -0
  70. hf_simulation-2026.9.1/uv.lock +571 -0
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ ci:
7
+ # @main rather than @v1: the v1 tag predates the Cargo.toml-gated Rust jobs.
8
+ uses: ucgmsim/meta-ci-action/.github/workflows/ci.yml@main
9
+ with:
10
+ # Docstring scope and exclusions come from [tool.npdlint] in pyproject.toml.
11
+ exclude-init: false
12
+ # Test paths and --doctest-modules come from [tool.pytest.ini_options].
13
+ pytest-paths: ""
14
+ enable-coverage: true
15
+ cov-package: hf_simulation
16
+ cov-fail-under: 95
17
+
18
+ # The shared workflow tests the debug profile only. Debug and release must agree,
19
+ # because LLVM folds `powf(x, 0.5)` into `sqrt(x)` at -O2 but not at -O0.
20
+ rust-release:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - uses: dtolnay/rust-toolchain@stable
25
+ - uses: Swatinem/rust-cache@v2
26
+ - run: cargo test --workspace --locked --release
@@ -0,0 +1,104 @@
1
+ name: Publish to PyPI
2
+ run-name: Publish Python Package to PyPI for release ${{ github.event.release.tag_name || inputs.tag_name || github.ref_name }}
3
+
4
+ on:
5
+ release:
6
+ types: [published]
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag_name:
10
+ description: "Git tag to checkout and publish"
11
+ required: false
12
+ type: string
13
+
14
+ jobs:
15
+ build:
16
+ name: Build distribution 📦
17
+ runs-on: ${{ matrix.os }}
18
+ strategy:
19
+ matrix:
20
+ os: [ubuntu-latest, macos-latest, windows-latest]
21
+
22
+ steps:
23
+ - name: Checkout code
24
+ uses: actions/checkout@v4.1.0
25
+ with:
26
+ ref: ${{ inputs.tag_name || github.ref }}
27
+ fetch-depth: 0
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.12"
33
+
34
+ - name: Install Rust
35
+ uses: actions-rust-lang/setup-rust-toolchain@v1
36
+
37
+ - name: Install Rust targets for macOS
38
+ if: matrix.os == 'macos-latest'
39
+ run: |
40
+ rustup target add x86_64-apple-darwin
41
+ rustup target add aarch64-apple-darwin
42
+
43
+ - name: Build wheels
44
+ uses: pypa/cibuildwheel@v4.1.0
45
+ env:
46
+ CIBW_SKIP: "pp* *-musllinux_*" # Skip PyPy and musl builds
47
+ CIBW_ARCHS_MACOS: "x86_64 arm64" # Build for Intel and Apple Silicon
48
+ CIBW_ARCHS_WINDOWS: "AMD64"
49
+ CIBW_ARCHS_LINUX: "x86_64"
50
+ # This is needed as for linux the wheel build process happens inside a container instead of the Github runner
51
+ # See https://cibuildwheel.pypa.io/en/stable/platforms/#linux-containers
52
+ CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && source $HOME/.cargo/env"
53
+ CIBW_ENVIRONMENT_LINUX: 'PATH="$HOME/.cargo/bin:$PATH"'
54
+ # Required to build wheels with Rust extensions on macOS
55
+ # See https://cibuildwheel.pypa.io/en/stable/platforms/#macos-version-compatibility
56
+ MACOSX_DEPLOYMENT_TARGET: "11.0"
57
+
58
+ - name: Build source distribution (Linux only)
59
+ if: matrix.os == 'ubuntu-latest'
60
+ run: |
61
+ python3 -m pip install build
62
+ python3 -m build --sdist
63
+
64
+ - name: Store the distribution packages
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: python-package-distributions-${{ matrix.os }}
68
+ path: |
69
+ wheelhouse/*.whl
70
+ dist/*.tar.gz
71
+ if-no-files-found: error
72
+
73
+ publish-to-pypi:
74
+ name: Publish to PyPI
75
+ needs:
76
+ - build
77
+ runs-on: ubuntu-latest
78
+
79
+ environment:
80
+ name: pypi
81
+ url: https://pypi.org/p/hf-simulation
82
+
83
+ permissions:
84
+ id-token: write
85
+
86
+ steps:
87
+ - name: Download all the dists
88
+ uses: actions/download-artifact@v4
89
+ with:
90
+ pattern: python-package-distributions-*
91
+ merge-multiple: true
92
+ path: artifacts/
93
+
94
+ - name: Collect all distributions into dist/
95
+ run: |
96
+ mkdir -p dist/
97
+ find artifacts/ -name '*.whl' -exec cp {} dist/ \;
98
+ find artifacts/ -name '*.tar.gz' -exec cp {} dist/ \;
99
+ ls -la dist/
100
+
101
+ - name: Publish distribution to PyPI
102
+ uses: pypa/gh-action-pypi-publish@release/v1
103
+ with:
104
+ packages-dir: dist
@@ -0,0 +1,28 @@
1
+ /target
2
+ /reference/build
3
+ /harness/out
4
+ *.o
5
+ *.mod
6
+ /reference/hb_high_ref.f
7
+ /reference/hb_high_subs.f
8
+ /harness/out
9
+ *.gcda
10
+ *.gcno
11
+ *.gcov
12
+
13
+ # Reduced-n validation runs (bisection artifacts). The certified baselines are
14
+ # the unsuffixed files and are written only with --baseline.
15
+ harness/science_*_n*.csv
16
+
17
+ # Python virtualenv for the extension build
18
+ .venv/
19
+ *.so
20
+ *.egg-info/
21
+
22
+ # Paper PDFs cited by the physics annotations: publisher-copyright material, kept
23
+ # out of git.
24
+ papers/*.pdf
25
+ __pycache__/
26
+ Todoist Export_*.csv
27
+ .coverage
28
+ htmlcov/
@@ -0,0 +1,17 @@
1
+ # yamllint's defaults are written for hand-authored documents, and every YAML
2
+ # file in this repo is a GitHub Actions workflow. Without this the pre-push
3
+ # yamllint hook fires on all of them for things Actions requires.
4
+ extends: default
5
+
6
+ rules:
7
+ # Workflows are not multi-document streams and GitHub does not want a
8
+ # leading `---`.
9
+ document-start: disable
10
+ # `on:` is the Actions trigger key, not the YAML 1.1 boolean `on`.
11
+ truthy:
12
+ check-keys: false
13
+ # Job names, action refs and ${{ }} expressions do not wrap. 140 clears the
14
+ # longest line in the repo, publish-PyPI.yml's `run-name:` expression.
15
+ line-length:
16
+ max: 140
17
+ allow-non-breakable-words: true