gitronics 0.6.3__tar.gz → 0.6.4__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.
- gitronics-0.6.4/.github/workflows/ci.yml +136 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/.gitignore +3 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/Cargo.lock +130 -6
- {gitronics-0.6.3 → gitronics-0.6.4}/Cargo.toml +18 -3
- {gitronics-0.6.3 → gitronics-0.6.4}/PKG-INFO +1 -1
- {gitronics-0.6.3 → gitronics-0.6.4}/README.md +3 -1
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/building_a_model.md +19 -3
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/configuration_file.md +10 -0
- gitronics-0.6.4/docs/usage/build.md +140 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/assessment_specific/small_override.yaml +1 -1
- gitronics-0.6.4/python/tests/test_cli_works.py +44 -0
- gitronics-0.6.4/python/tests/test_migrate_model.py +49 -0
- gitronics-0.6.4/report/eslint.config.mjs +50 -0
- gitronics-0.6.4/report/report.css +1707 -0
- gitronics-0.6.4/report/report.html +18 -0
- gitronics-0.6.4/report/report.js +1952 -0
- gitronics-0.6.4/report/vendor/diff.js +33 -0
- gitronics-0.6.4/resources/filled_model.mcnp +30 -0
- gitronics-0.6.4/src/build_model.rs +563 -0
- gitronics-0.6.4/src/build_record.rs +326 -0
- gitronics-0.6.4/src/build_report.rs +917 -0
- gitronics-0.6.4/src/error.rs +178 -0
- gitronics-0.6.4/src/fs_utils.rs +140 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/lib.rs +8 -2
- gitronics-0.6.4/src/mcnp_io.rs +191 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/migrate_model.rs +49 -33
- gitronics-0.6.4/src/model_config.rs +458 -0
- gitronics-0.6.4/src/project_manager/load_metadata.rs +178 -0
- gitronics-0.6.4/src/project_manager/load_project_files.rs +146 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/project_manager.rs +68 -26
- gitronics-0.6.4/src/provenance.rs +364 -0
- gitronics-0.6.4/src/runtime.rs +64 -0
- gitronics-0.6.4/src/types.rs +171 -0
- gitronics-0.6.4/tests/common/mod.rs +169 -0
- gitronics-0.6.4/tests/golden/small_override.assembled.mcnp +257 -0
- gitronics-0.6.4/tests/golden/small_override.build_report.json +396 -0
- gitronics-0.6.4/tests/golden/valid_configuration.assembled.mcnp +266 -0
- gitronics-0.6.4/tests/golden/valid_configuration.build_report.json +426 -0
- gitronics-0.6.4/tests/test_determinism.rs +140 -0
- gitronics-0.6.4/tests/test_envelope_metadata.rs +122 -0
- gitronics-0.6.4/tests/test_envelope_validation.rs +176 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/tests/test_example_project.rs +95 -45
- gitronics-0.6.4/tests/test_golden_build.rs +93 -0
- gitronics-0.6.4/tests/test_log_warnings.rs +53 -0
- gitronics-0.6.4/tests/test_migrate_round_trip.rs +123 -0
- gitronics-0.6.3/.github/workflows/ci.yml +0 -109
- gitronics-0.6.3/docs/usage/build.md +0 -77
- gitronics-0.6.3/python/tests/test_cli_works.py +0 -17
- gitronics-0.6.3/src/build_model.rs +0 -397
- gitronics-0.6.3/src/build_report.rs +0 -721
- gitronics-0.6.3/src/model_config.rs +0 -212
- gitronics-0.6.3/src/project_manager/load_metadata.rs +0 -47
- gitronics-0.6.3/src/project_manager/load_model_config.rs +0 -185
- gitronics-0.6.3/src/project_manager/load_project_files.rs +0 -107
- gitronics-0.6.3/src/report.css +0 -473
- gitronics-0.6.3/src/types.rs +0 -207
- gitronics-0.6.3/src/utils.rs +0 -375
- {gitronics-0.6.3 → gitronics-0.6.4}/.github/workflows/docs.yml +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/.github/workflows/release.yml +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/.vscode/settings.json +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/LICENSE +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/anatomy-light.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/anatomy.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/flow-light.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/flow.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/flow_readme.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/hero.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/inheritance-light.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/inheritance.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/logo.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/mapping-light.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/mapping.svg +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/assets/stylesheets/extra.css +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/best_practices.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/examples.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/assessments.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/card_id_numbers.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/concepts.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/file_types.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/migrating.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/new_project.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started/project_structure.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/getting_started.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/hooks/version_from_git.py +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/index.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/installation.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/requirements.txt +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/docs/usage/migrate.md +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/assessment_specific/filler_model_3.mcnp +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/assessment_specific/filler_model_3.metadata +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/configurations/valid_configuration.yaml +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/output/.gitignore +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/data_cards/fine_mesh.tally +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/data_cards/materials.mat +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/data_cards/my_transform.transform +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/data_cards/volumetric_source.source +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/envelope_structure.mcnp +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/envelope_structure.metadata +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/filler_models/filler_model_1.mcnp +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/filler_models/filler_model_1.metadata +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/filler_models/filler_model_2.mcnp +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/example_project/reference_model/filler_models/filler_model_2.metadata +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/mkdocs.yml +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/pyproject.toml +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/python/gitronics/__init__.py +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/python/gitronics/__main__.py +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/python/gitronics/gitronics.pyi +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/python/tests/test_build_model.py +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/resources/simple_model.mcnp +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/cli.rs +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/main.rs +0 -0
- {gitronics-0.6.3 → gitronics-0.6.4}/src/python.rs +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
rust:
|
|
14
|
+
name: Rust tests (${{ matrix.os }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Install Rust stable
|
|
23
|
+
uses: dtolnay/rust-toolchain@stable
|
|
24
|
+
with:
|
|
25
|
+
components: clippy, rustfmt
|
|
26
|
+
|
|
27
|
+
- name: Set up Python (Required for PyO3 test linking)
|
|
28
|
+
id: setup-python
|
|
29
|
+
uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.11"
|
|
32
|
+
|
|
33
|
+
- name: Configure PyO3 Python path
|
|
34
|
+
shell: bash
|
|
35
|
+
run: |
|
|
36
|
+
echo "PYO3_PYTHON=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV
|
|
37
|
+
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
|
38
|
+
PYLIB=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
|
|
39
|
+
PYVER=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LDVERSION'))")
|
|
40
|
+
echo "RUSTFLAGS=-L${PYLIB} -lpython${PYVER}" >> $GITHUB_ENV
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
- name: Cache cargo registry
|
|
44
|
+
uses: actions/cache@v4
|
|
45
|
+
with:
|
|
46
|
+
path: |
|
|
47
|
+
~/.cargo/registry
|
|
48
|
+
~/.cargo/git
|
|
49
|
+
target
|
|
50
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
51
|
+
|
|
52
|
+
- name: rustfmt
|
|
53
|
+
run: cargo fmt --all --check
|
|
54
|
+
|
|
55
|
+
- name: Test
|
|
56
|
+
run: cargo test --workspace --features pyo3/auto-initialize
|
|
57
|
+
|
|
58
|
+
- name: Clippy
|
|
59
|
+
run: cargo clippy --workspace -- -D warnings
|
|
60
|
+
|
|
61
|
+
ruff:
|
|
62
|
+
name: Python lint (ruff)
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
|
|
67
|
+
- uses: astral-sh/setup-uv@v5
|
|
68
|
+
|
|
69
|
+
# Pinned so a new ruff release can't fail CI unexpectedly; bump deliberately.
|
|
70
|
+
- name: ruff lint
|
|
71
|
+
run: uvx ruff@0.15.21 check python
|
|
72
|
+
|
|
73
|
+
- name: ruff format
|
|
74
|
+
run: uvx ruff@0.15.21 format --check python
|
|
75
|
+
|
|
76
|
+
python:
|
|
77
|
+
name: Python tests (${{ matrix.os }})
|
|
78
|
+
runs-on: ${{ matrix.os }}
|
|
79
|
+
strategy:
|
|
80
|
+
matrix:
|
|
81
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
|
|
85
|
+
- name: Install Rust stable
|
|
86
|
+
uses: dtolnay/rust-toolchain@stable
|
|
87
|
+
|
|
88
|
+
- name: Set up Python
|
|
89
|
+
uses: actions/setup-python@v5
|
|
90
|
+
with:
|
|
91
|
+
python-version: "3.11"
|
|
92
|
+
|
|
93
|
+
- name: Cache cargo registry
|
|
94
|
+
uses: actions/cache@v4
|
|
95
|
+
with:
|
|
96
|
+
path: |
|
|
97
|
+
~/.cargo/registry
|
|
98
|
+
~/.cargo/git
|
|
99
|
+
target
|
|
100
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
101
|
+
|
|
102
|
+
- name: Install maturin and pytest
|
|
103
|
+
run: pip install maturin pytest
|
|
104
|
+
|
|
105
|
+
- name: Build and install Python package (dev mode)
|
|
106
|
+
run: pip install -e .
|
|
107
|
+
|
|
108
|
+
- name: Run Python tests
|
|
109
|
+
run: pytest
|
|
110
|
+
|
|
111
|
+
report-viewer:
|
|
112
|
+
name: Report viewer (JS)
|
|
113
|
+
runs-on: ubuntu-latest
|
|
114
|
+
steps:
|
|
115
|
+
- uses: actions/checkout@v4
|
|
116
|
+
|
|
117
|
+
- uses: actions/setup-node@v4
|
|
118
|
+
with:
|
|
119
|
+
node-version: "22"
|
|
120
|
+
cache: npm
|
|
121
|
+
cache-dependency-path: report/package-lock.json
|
|
122
|
+
|
|
123
|
+
- name: Install test dependencies
|
|
124
|
+
working-directory: report
|
|
125
|
+
run: npm ci
|
|
126
|
+
|
|
127
|
+
# The viewer and vendored library are inlined by `include_str!` —
|
|
128
|
+
# there is no bundle step, so this job never runs cargo and cargo
|
|
129
|
+
# never runs node.
|
|
130
|
+
- name: Syntax check
|
|
131
|
+
working-directory: report
|
|
132
|
+
run: node --check report.js
|
|
133
|
+
|
|
134
|
+
- name: Render tests (jsdom)
|
|
135
|
+
working-directory: report
|
|
136
|
+
run: node --test 'test/*.test.mjs'
|
|
@@ -124,12 +124,30 @@ version = "2.11.1"
|
|
|
124
124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
125
125
|
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
|
126
126
|
|
|
127
|
+
[[package]]
|
|
128
|
+
name = "block-buffer"
|
|
129
|
+
version = "0.10.4"
|
|
130
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
131
|
+
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
|
132
|
+
dependencies = [
|
|
133
|
+
"generic-array",
|
|
134
|
+
]
|
|
135
|
+
|
|
127
136
|
[[package]]
|
|
128
137
|
name = "bumpalo"
|
|
129
138
|
version = "3.20.2"
|
|
130
139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
131
140
|
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
|
|
132
141
|
|
|
142
|
+
[[package]]
|
|
143
|
+
name = "castaway"
|
|
144
|
+
version = "0.2.4"
|
|
145
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
+
checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
|
|
147
|
+
dependencies = [
|
|
148
|
+
"rustversion",
|
|
149
|
+
]
|
|
150
|
+
|
|
133
151
|
[[package]]
|
|
134
152
|
name = "cc"
|
|
135
153
|
version = "1.2.62"
|
|
@@ -207,12 +225,35 @@ version = "1.0.5"
|
|
|
207
225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
208
226
|
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
209
227
|
|
|
228
|
+
[[package]]
|
|
229
|
+
name = "compact_str"
|
|
230
|
+
version = "0.9.1"
|
|
231
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
+
checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab"
|
|
233
|
+
dependencies = [
|
|
234
|
+
"castaway",
|
|
235
|
+
"cfg-if",
|
|
236
|
+
"itoa",
|
|
237
|
+
"rustversion",
|
|
238
|
+
"ryu",
|
|
239
|
+
"static_assertions",
|
|
240
|
+
]
|
|
241
|
+
|
|
210
242
|
[[package]]
|
|
211
243
|
name = "core-foundation-sys"
|
|
212
244
|
version = "0.8.7"
|
|
213
245
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
214
246
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
215
247
|
|
|
248
|
+
[[package]]
|
|
249
|
+
name = "cpufeatures"
|
|
250
|
+
version = "0.2.17"
|
|
251
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
|
+
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
|
253
|
+
dependencies = [
|
|
254
|
+
"libc",
|
|
255
|
+
]
|
|
256
|
+
|
|
216
257
|
[[package]]
|
|
217
258
|
name = "crossbeam-deque"
|
|
218
259
|
version = "0.8.6"
|
|
@@ -238,6 +279,26 @@ version = "0.8.21"
|
|
|
238
279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
280
|
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
240
281
|
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "crypto-common"
|
|
284
|
+
version = "0.1.7"
|
|
285
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
+
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
|
287
|
+
dependencies = [
|
|
288
|
+
"generic-array",
|
|
289
|
+
"typenum",
|
|
290
|
+
]
|
|
291
|
+
|
|
292
|
+
[[package]]
|
|
293
|
+
name = "digest"
|
|
294
|
+
version = "0.10.7"
|
|
295
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
296
|
+
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
|
297
|
+
dependencies = [
|
|
298
|
+
"block-buffer",
|
|
299
|
+
"crypto-common",
|
|
300
|
+
]
|
|
301
|
+
|
|
241
302
|
[[package]]
|
|
242
303
|
name = "dunce"
|
|
243
304
|
version = "1.0.5"
|
|
@@ -349,6 +410,16 @@ dependencies = [
|
|
|
349
410
|
"slab",
|
|
350
411
|
]
|
|
351
412
|
|
|
413
|
+
[[package]]
|
|
414
|
+
name = "generic-array"
|
|
415
|
+
version = "0.14.7"
|
|
416
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
417
|
+
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
|
418
|
+
dependencies = [
|
|
419
|
+
"typenum",
|
|
420
|
+
"version_check",
|
|
421
|
+
]
|
|
422
|
+
|
|
352
423
|
[[package]]
|
|
353
424
|
name = "getrandom"
|
|
354
425
|
version = "0.3.4"
|
|
@@ -390,7 +461,7 @@ dependencies = [
|
|
|
390
461
|
|
|
391
462
|
[[package]]
|
|
392
463
|
name = "gitronics"
|
|
393
|
-
version = "0.6.
|
|
464
|
+
version = "0.6.4"
|
|
394
465
|
dependencies = [
|
|
395
466
|
"chrono",
|
|
396
467
|
"clap",
|
|
@@ -402,11 +473,14 @@ dependencies = [
|
|
|
402
473
|
"logtest",
|
|
403
474
|
"migjorn",
|
|
404
475
|
"path-clean",
|
|
476
|
+
"pathdiff",
|
|
405
477
|
"pyo3",
|
|
406
478
|
"rayon",
|
|
407
479
|
"regex",
|
|
408
480
|
"serde",
|
|
409
481
|
"serde-saphyr",
|
|
482
|
+
"serde_json",
|
|
483
|
+
"sha2",
|
|
410
484
|
"tempfile",
|
|
411
485
|
"thiserror",
|
|
412
486
|
"walkdir",
|
|
@@ -636,21 +710,25 @@ dependencies = [
|
|
|
636
710
|
|
|
637
711
|
[[package]]
|
|
638
712
|
name = "migjorn"
|
|
639
|
-
version = "0.
|
|
713
|
+
version = "0.3.11"
|
|
640
714
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
641
|
-
checksum = "
|
|
715
|
+
checksum = "ecf4b3b5db557a6100d1767eb22295cbd70521d1678a34584644356ff140865c"
|
|
642
716
|
dependencies = [
|
|
717
|
+
"compact_str",
|
|
643
718
|
"migjorn-syntax",
|
|
719
|
+
"rayon",
|
|
644
720
|
"rustc-hash",
|
|
645
721
|
]
|
|
646
722
|
|
|
647
723
|
[[package]]
|
|
648
724
|
name = "migjorn-syntax"
|
|
649
|
-
version = "0.
|
|
725
|
+
version = "0.3.11"
|
|
650
726
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
651
|
-
checksum = "
|
|
727
|
+
checksum = "f7bce9c260eb5e8f964a98d313dd84ceb805e979b31ecdcdef5b90a059e5eb58"
|
|
652
728
|
dependencies = [
|
|
653
|
-
"
|
|
729
|
+
"compact_str",
|
|
730
|
+
"memchr",
|
|
731
|
+
"rayon",
|
|
654
732
|
]
|
|
655
733
|
|
|
656
734
|
[[package]]
|
|
@@ -686,6 +764,12 @@ version = "1.0.1"
|
|
|
686
764
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
687
765
|
checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef"
|
|
688
766
|
|
|
767
|
+
[[package]]
|
|
768
|
+
name = "pathdiff"
|
|
769
|
+
version = "0.2.3"
|
|
770
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
771
|
+
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
|
772
|
+
|
|
689
773
|
[[package]]
|
|
690
774
|
name = "pin-project-lite"
|
|
691
775
|
version = "0.2.17"
|
|
@@ -757,6 +841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
757
841
|
checksum = "94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb"
|
|
758
842
|
dependencies = [
|
|
759
843
|
"once_cell",
|
|
844
|
+
"python3-dll-a",
|
|
760
845
|
"target-lexicon",
|
|
761
846
|
]
|
|
762
847
|
|
|
@@ -795,6 +880,15 @@ dependencies = [
|
|
|
795
880
|
"syn",
|
|
796
881
|
]
|
|
797
882
|
|
|
883
|
+
[[package]]
|
|
884
|
+
name = "python3-dll-a"
|
|
885
|
+
version = "0.2.15"
|
|
886
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
887
|
+
checksum = "d80ba7540edb18890d444c5aa8e1f1f99b1bdf26fb26ae383135325f4a36042b"
|
|
888
|
+
dependencies = [
|
|
889
|
+
"cc",
|
|
890
|
+
]
|
|
891
|
+
|
|
798
892
|
[[package]]
|
|
799
893
|
name = "quote"
|
|
800
894
|
version = "1.0.45"
|
|
@@ -890,6 +984,12 @@ version = "1.0.22"
|
|
|
890
984
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
891
985
|
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
892
986
|
|
|
987
|
+
[[package]]
|
|
988
|
+
name = "ryu"
|
|
989
|
+
version = "1.0.23"
|
|
990
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
991
|
+
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
992
|
+
|
|
893
993
|
[[package]]
|
|
894
994
|
name = "same-file"
|
|
895
995
|
version = "1.0.6"
|
|
@@ -960,6 +1060,7 @@ version = "1.0.149"
|
|
|
960
1060
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
961
1061
|
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
962
1062
|
dependencies = [
|
|
1063
|
+
"indexmap",
|
|
963
1064
|
"itoa",
|
|
964
1065
|
"memchr",
|
|
965
1066
|
"serde",
|
|
@@ -967,6 +1068,17 @@ dependencies = [
|
|
|
967
1068
|
"zmij",
|
|
968
1069
|
]
|
|
969
1070
|
|
|
1071
|
+
[[package]]
|
|
1072
|
+
name = "sha2"
|
|
1073
|
+
version = "0.10.9"
|
|
1074
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1075
|
+
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
|
|
1076
|
+
dependencies = [
|
|
1077
|
+
"cfg-if",
|
|
1078
|
+
"cpufeatures",
|
|
1079
|
+
"digest",
|
|
1080
|
+
]
|
|
1081
|
+
|
|
970
1082
|
[[package]]
|
|
971
1083
|
name = "shlex"
|
|
972
1084
|
version = "1.3.0"
|
|
@@ -985,6 +1097,12 @@ version = "1.15.1"
|
|
|
985
1097
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
986
1098
|
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
987
1099
|
|
|
1100
|
+
[[package]]
|
|
1101
|
+
name = "static_assertions"
|
|
1102
|
+
version = "1.1.0"
|
|
1103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1104
|
+
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
|
1105
|
+
|
|
988
1106
|
[[package]]
|
|
989
1107
|
name = "strsim"
|
|
990
1108
|
version = "0.11.1"
|
|
@@ -1041,6 +1159,12 @@ dependencies = [
|
|
|
1041
1159
|
"syn",
|
|
1042
1160
|
]
|
|
1043
1161
|
|
|
1162
|
+
[[package]]
|
|
1163
|
+
name = "typenum"
|
|
1164
|
+
version = "1.20.1"
|
|
1165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1166
|
+
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
1167
|
+
|
|
1044
1168
|
[[package]]
|
|
1045
1169
|
name = "unicode-ident"
|
|
1046
1170
|
version = "1.0.24"
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "gitronics"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.4"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
description = "Build MCNP neutronics models from modular components"
|
|
6
6
|
license = "EUPL-1.2"
|
|
7
|
+
# The published crate includes the viewer and vendored library it inlines; the
|
|
8
|
+
# viewer's test harness and its dependencies are development-only.
|
|
9
|
+
exclude = [
|
|
10
|
+
"report/test",
|
|
11
|
+
"report/node_modules",
|
|
12
|
+
"report/package.json",
|
|
13
|
+
"report/package-lock.json",
|
|
14
|
+
]
|
|
7
15
|
readme = "README.md"
|
|
8
16
|
|
|
9
17
|
[[bin]]
|
|
@@ -15,11 +23,16 @@ name = "gitronics"
|
|
|
15
23
|
crate-type = ["cdylib", "rlib"]
|
|
16
24
|
|
|
17
25
|
[dependencies]
|
|
18
|
-
pyo3 = { version = "0.23", features = [
|
|
19
|
-
|
|
26
|
+
pyo3 = { version = "0.23", features = [
|
|
27
|
+
"extension-module",
|
|
28
|
+
"abi3-py39",
|
|
29
|
+
"generate-import-lib",
|
|
30
|
+
] }
|
|
31
|
+
migjorn = "0.3.11"
|
|
20
32
|
walkdir = "2.5.0"
|
|
21
33
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
22
34
|
serde-saphyr = "0.0.26"
|
|
35
|
+
serde_json = { version = "1.0", features = ["preserve_order"] }
|
|
23
36
|
thiserror = "2.0.18"
|
|
24
37
|
rayon = "1.12.0"
|
|
25
38
|
log = "0.4.29"
|
|
@@ -31,6 +44,8 @@ indexmap = { version = "2.14.0", features = ["serde"] }
|
|
|
31
44
|
git2 = "0.21.0"
|
|
32
45
|
dunce = "1.0.5"
|
|
33
46
|
path-clean = "1.0.1"
|
|
47
|
+
sha2 = "0.10"
|
|
48
|
+
pathdiff = "0.2"
|
|
34
49
|
|
|
35
50
|
[dev-dependencies]
|
|
36
51
|
tempfile = "3.0"
|
|
@@ -114,7 +114,9 @@ Requires the stable [Rust toolchain](https://rustup.rs/) and [maturin](https://g
|
|
|
114
114
|
git clone https://github.com/Fusion4Energy/gitronics
|
|
115
115
|
cd gitronics
|
|
116
116
|
pip install maturin
|
|
117
|
-
maturin develop --release
|
|
117
|
+
maturin develop --release
|
|
118
|
+
# Or to generate a wheel for distribution:
|
|
119
|
+
maturin build --release --target x86_64-pc-windows-gnu --zig -i python3.12
|
|
118
120
|
```
|
|
119
121
|
</details>
|
|
120
122
|
|
|
@@ -11,7 +11,7 @@ gitronics build configurations/baseline.yaml -o output/
|
|
|
11
11
|
This will assemble the model defined in `baseline.yaml` and write an `assembled.mcnp` file to the `output/` directory.
|
|
12
12
|
|
|
13
13
|
!!! tip "HTML report"
|
|
14
|
-
|
|
14
|
+
Every successful build writes a self-contained, offline `build_report.html` and its machine-readable `build_report.json` manifest.
|
|
15
15
|
|
|
16
16
|
If there is any problem during the assembly (configuration wrongly defined, missing files, duplicated card IDs, etc.), Gitronics will raise an error and the build will fail. The error message will indicate the cause of the failure and the file where it occurred.
|
|
17
17
|
|
|
@@ -32,9 +32,25 @@ When running the `gitronics build` command, the following steps are performed:
|
|
|
32
32
|
3. All fillers and data card files are reordered by their card type and ID numbers. Every `assembled.mcnp` file will have the same deterministic order of cards. Only the first ID number of the first card in each file is used to determine the order of the files.
|
|
33
33
|
4. The envelope structure is adapted to include the `FILL` cards for the envelope cells that have a filler model assigned. The `FILL` cards will reference the correct universe ID of the filler model by parsing the filler model in search of the first `U` card. The transformation associated to each `FILL` card is also applied as defined in the metadata of the filler model.
|
|
34
34
|
5. The envelope structure, filler models, and data card files are concatenated into a single MCNP input file.
|
|
35
|
-
6.
|
|
35
|
+
6. Assembly checks detect card ID collisions and invalid references supported by the parser. These checks do not validate geometry overlaps, transport behaviour, or physical correctness. Failure returns an error.
|
|
36
36
|
7. The assembled model is written to the output file: `assembled.mcnp`.
|
|
37
|
-
8.
|
|
37
|
+
8. HTML and JSON reports are written, recording the output identity and the checks performed.
|
|
38
|
+
|
|
39
|
+
## Reviewing a build
|
|
40
|
+
|
|
41
|
+
- **Overview and Checks:** assembly outcome, warnings, and each recorded check's result. Configuration completeness counts all marked envelopes, including those missing from the configuration. Explicit `null` assignments are complete, intentionally empty placements, not errors.
|
|
42
|
+
- **Explorer and Coverage Map:** filled, explicitly empty, and unconfigured envelopes, with search and status filters. Grouping fields come from project metadata; no field such as `sector` or `zone` is required or privileged. Defaults favour populated fields with a small number of repeated values.
|
|
43
|
+
- **Envelope and filler details:** envelope cell IDs, assignment configuration, input paths, transforms, arbitrary metadata, and searchable placement lists. IDs identify cards in the source files; source line numbers are not recorded.
|
|
44
|
+
- **ID Map:** separate lanes for cells, surfaces, materials, tallies, transformations, and universes, with exact numeric lookup, zoom, and pan. Geometry IDs identify their filler or envelope structure; data-card IDs identify their defining file and open the card definition. Materials count `M` definitions (not `MT`/`MX` modifiers), tallies count `F` and `FMESH` definitions (not tally modifiers), and transformations count `TR` definitions, including starred forms. Universes include explicit cell `U` assignments and implicit root universe 0 on ordinary cells; negative `U` values use their absolute ID, and inherited-only `LIKE ... BUT` membership is not separately resolved. Shared IDs show all defining owners and count once in occupancy totals. Older reports without the required inventory show an unavailable state rather than claiming the namespace is empty.
|
|
45
|
+
- **Data Cards:** one expandable entry per selected data file, showing its logical name, relative path, configuration role, and counts of actual card types. Expand a file to see card IDs grouped by type; open an ID (or a name such as `MODE` or `NPS`) for its definition and references. Search matches files, IDs, and definitions, reveals matching files, and highlights matching IDs. File roles and contents are separate: a file selected under `materials` can also contain transforms. The tab badge and overview count selected data files, not individual cards. Material definitions include direct cell references; transform definitions link matching envelope placements. This is not an exhaustive dependency analysis of all MCNP card types or inherited `LIKE ... BUT` properties.
|
|
46
|
+
- **Inputs:** file paths relative to the selected configuration, byte counts, SHA-256 identities, raw configuration inheritance layers, resolved configuration, and the configuration responsible for each envelope assignment.
|
|
47
|
+
- **Diff:** baseline and current identity, assignment and transform values, component statistics, input content hashes, data-card definitions, and placement impact. Schema-1 reports remain viewable, but cannot provide content comparisons without hashes.
|
|
48
|
+
|
|
49
|
+
The content fingerprint identifies the selected input bytes, logical paths, resolved configuration, and Gitronics version. It excludes timestamps and Git working-tree status; it is not a physics-equivalence hash. The separate output checksum includes the timestamped MCNP banner and identifies the exact assembled file. Input hashes describe the bytes read by the loaders, including configuration inheritance layers, rather than a separate pre-build read. Those identities are checked again before writing; changing loaded inputs during a build requires rebuilding.
|
|
50
|
+
|
|
51
|
+
Once assembly data is available, merge, data-card parsing, reference-validation, input-stability, and output-writing failures attempt to produce a report marked **failed**, without an output identity. If writing that report also fails, the original build error is preserved and the reporting error is logged as a warning. A report-writing failure after otherwise successful assembly still causes the command to fail. Earlier failures such as invalid configuration or missing files still return CLI errors before a new report can be produced. An old or partially written output deck can remain in a reused output directory after failure; do not treat it as the output of the failed attempt.
|
|
52
|
+
|
|
53
|
+
Reports embed file paths, metadata, configuration, and data-card text. Review that information before sharing reports outside the project.
|
|
38
54
|
|
|
39
55
|
## Logging
|
|
40
56
|
|
|
@@ -79,6 +79,8 @@ Only one source file can be specified, but any number of materials, transformati
|
|
|
79
79
|
|
|
80
80
|
This field is a dictionary that maps envelope cell names to filler model file stems.
|
|
81
81
|
If an envelope cell name appears in the dictionary but is not found in the envelope structure file, Gitronics will raise an error.
|
|
82
|
+
This also applies to names assigned `null`. The build stops before writing the assembled model or build reports and lists the unmatched names.
|
|
83
|
+
An envelope present in the structure but omitted from the configuration is left unfilled with a warning; use an explicit `null` assignment to mark it as intentionally empty.
|
|
82
84
|
|
|
83
85
|
<figure class="wide" markdown="span">
|
|
84
86
|
{ width="100%" }
|
|
@@ -100,7 +102,15 @@ The overriding rules are as follows:
|
|
|
100
102
|
|
|
101
103
|
- The field `project_roots` is not inherited, it must be specified in the current configuration file.
|
|
102
104
|
- The fields `envelope_structure`, `source`, `materials`, `transformations`, and `tallies` are inherited, but they can be overridden in the current configuration file. If the current file defines the field, the parent value is ignored.
|
|
105
|
+
- For `source`, omitting the key inherits the parent's value, `source: null` explicitly removes it, and a file stem replaces it. A cleared source remains cleared in descendants unless they assign a new source.
|
|
103
106
|
- The field `envelopes` is inherited and merged entry-by-entry. The current file can add new envelopes or change specific ones without repeating the full list. If an envelope name is present in both the parent and the current configuration, the current value takes precedence.
|
|
104
107
|
|
|
108
|
+
For example, to inherit a model without its source cards:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
overrides: baseline.yaml
|
|
112
|
+
source: null
|
|
113
|
+
```
|
|
114
|
+
|
|
105
115
|
!!! tip "Nested inheritance"
|
|
106
116
|
Inheritance chains are allowed but are not considered a good practice. It is simpler and less error-prone to inherit from a single parent configuration file.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# `build` — Assemble a Model
|
|
2
|
+
|
|
3
|
+
The `build` command reads a YAML configuration file and assembles a ready-to-run MCNP input file.
|
|
4
|
+
|
|
5
|
+
## Synopsis
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
gitronics build <CONFIG> [--output-path <DIR>]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
| Argument | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `CONFIG` | Path to the configuration YAML file (absolute or relative to cwd). |
|
|
14
|
+
| `-o`, `--output-path` | Directory to write `assembled.mcnp` into. Defaults to `.` (current directory). |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
gitronics build configurations/in_vessel_only.yaml --output-path output/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Output
|
|
23
|
+
|
|
24
|
+
On success, the following files are written to `--output-path`:
|
|
25
|
+
|
|
26
|
+
| File | Description |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `assembled.mcnp` | The complete, self-contained MCNP input deck. |
|
|
29
|
+
| `build_report.html` | A report of the build process, including a list of all files used and the envelope assignation. |
|
|
30
|
+
| `build_report.json` | The machine-readable build manifest, also used as the baseline for report comparisons. |
|
|
31
|
+
| `.gitignore` | A file to ignore the contents of the directory in Git. |
|
|
32
|
+
|
|
33
|
+
The `.gitignore` file is written to the output directory to prevent accidentally committing the assembled model and report to version control.
|
|
34
|
+
|
|
35
|
+
The top of `assembled.mcnp` contains a metadata comment block:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
C ============================================================
|
|
39
|
+
C Built by gitronics v0.1.0
|
|
40
|
+
C Configuration : configurations/in_vessel_only.yaml
|
|
41
|
+
C Git commit : v0.6.2-4-g04d555a
|
|
42
|
+
C Date / time : 2025-01-15 14:32:00
|
|
43
|
+
C ============================================================
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Comparing builds
|
|
47
|
+
|
|
48
|
+
Open the current build's `build_report.html`, select **Diff**, and choose or drop
|
|
49
|
+
the baseline `build_report.json`. Both reports stay local to your browser; the
|
|
50
|
+
HTML includes its assets and works offline. Rebuild or regenerate older HTML
|
|
51
|
+
reports to use the updated viewer. The JSON schema is unchanged.
|
|
52
|
+
|
|
53
|
+
The summary shows envelope changes, input and data-card changes, warning-message
|
|
54
|
+
changes, and signed cell/surface deltas (`current - baseline`). Click a count or
|
|
55
|
+
use the section controls to inspect the corresponding changes. **Build summary
|
|
56
|
+
changes** displays list-valued selections as bullet lists; an empty selection is
|
|
57
|
+
shown as **None**.
|
|
58
|
+
|
|
59
|
+
- **Assignments** groups repeated baseline/current filler substitutions, sorted
|
|
60
|
+
by affected placement count. Expand a group to inspect its placements, or use
|
|
61
|
+
**By envelope**. Search names or metadata, filter added/removed/reassigned
|
|
62
|
+
envelopes or transform/universe/status changes, and select metadata values
|
|
63
|
+
from either build. Results are paginated in groups of 25.
|
|
64
|
+
- **Inputs** separates content changes and added/removed inputs from collapsed
|
|
65
|
+
path-only changes with identical hashes. Search includes full paths; select
|
|
66
|
+
an input to compare paths, hashes and sizes. Missing hashes are marked as not
|
|
67
|
+
comparable, not treated as unchanged content.
|
|
68
|
+
- **Components** compares same-name components and explicit assignment
|
|
69
|
+
replacements. Replacements are inferred from shared envelope assignments,
|
|
70
|
+
not guessed from similar filenames, and do not imply a rename. Added and
|
|
71
|
+
removed component inventories remain available separately.
|
|
72
|
+
- **Data cards** lists modifications before removals and additions. Filter by
|
|
73
|
+
category or change type and select a card for a line-numbered diff. Related
|
|
74
|
+
tally cards such as `FMESH1014:N`, `FC1014`, and `FM1014` appear together under
|
|
75
|
+
**Tally 1014**. A member addition, removal, or edit marks an existing tally as
|
|
76
|
+
modified. Open a tally to select individual member comparisons, including
|
|
77
|
+
unchanged members; modified members are selected first. Counts distinguish
|
|
78
|
+
grouped items from individual card changes, and searches include all members.
|
|
79
|
+
Unchanged line context is folded by default; full definitions remain available.
|
|
80
|
+
Very costly line comparisons fall back to full definitions with a notice.
|
|
81
|
+
- **Checks & warnings** compares check results and warning-message occurrence
|
|
82
|
+
counts, including new, resolved and repeated warnings. A warning count is not
|
|
83
|
+
a geometry or physics validation result.
|
|
84
|
+
|
|
85
|
+
Placement details show baseline and current values together, including metadata,
|
|
86
|
+
assignment origins, and assigned components. Changed fields are highlighted;
|
|
87
|
+
unchanged fields are de-emphasized. Removed placements can still be inspected.
|
|
88
|
+
Schema 1 reports remain supported, with notices where input hashes or diagnostics
|
|
89
|
+
were not recorded. Input and card comparisons use recorded evidence; they do not
|
|
90
|
+
constitute a geometric or physical equivalence test.
|
|
91
|
+
|
|
92
|
+
The standalone **Data Cards** tab also groups tally members by ID within each
|
|
93
|
+
source file. Expand a tally and then a member to inspect its definition and
|
|
94
|
+
references. Searching for one member keeps its tally family visible. Global
|
|
95
|
+
defaults such as `E0` remain separate, as do non-tally cards with the same numeric
|
|
96
|
+
ID. Diff combines related tally members across files while preserving each
|
|
97
|
+
member's baseline and current file provenance.
|
|
98
|
+
|
|
99
|
+
### Viewer development
|
|
100
|
+
|
|
101
|
+
Run `npm ci`, `npm test`, `npm run check`, and `npm run lint` from `report/`.
|
|
102
|
+
The pinned `diff` development dependency supplies the offline jsdiff asset. After
|
|
103
|
+
updating that dependency, run `npm run vendor:diff` and commit the generated
|
|
104
|
+
`report/vendor/diff.js` with the package manifests. The generated asset includes
|
|
105
|
+
its BSD license and is embedded by both Rust and the JavaScript test harness.
|
|
106
|
+
Normal Rust builds do not require Node.js or an asset build step.
|
|
107
|
+
|
|
108
|
+
## How files are located
|
|
109
|
+
|
|
110
|
+
Gitronics recursively searches all directories listed in `project_roots` (defined in the configuration) for files referenced by stem name.
|
|
111
|
+
This means you can organise your project files into subdirectories however you like, as long as each stem name is unique across all `project_roots`.
|
|
112
|
+
|
|
113
|
+
## Python API
|
|
114
|
+
|
|
115
|
+
`build_model` is also available as a Python function for use in scripts and notebooks:
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import gitronics
|
|
119
|
+
|
|
120
|
+
gitronics.build_model(
|
|
121
|
+
"configurations/in_vessel_only.yaml",
|
|
122
|
+
"output/",
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
| Parameter | Type | Description |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| `config_path` | `str` or `Path` | Path to the configuration YAML file. |
|
|
129
|
+
| `output_path` | `str` or `Path` | Directory to write `assembled.mcnp` into. |
|
|
130
|
+
|
|
131
|
+
Raises `RuntimeError` on failure with a descriptive message.
|
|
132
|
+
|
|
133
|
+
## Logging
|
|
134
|
+
|
|
135
|
+
Set the `RUST_LOG` environment variable to control verbosity:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
RUST_LOG=info gitronics build configurations/baseline.yaml
|
|
139
|
+
RUST_LOG=debug gitronics build configurations/baseline.yaml
|
|
140
|
+
```
|