gitronics 0.5.20__tar.gz → 0.5.22__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.5.20 → gitronics-0.5.22}/.github/workflows/release.yml +19 -1
- {gitronics-0.5.20 → gitronics-0.5.22}/Cargo.lock +1 -1
- {gitronics-0.5.20 → gitronics-0.5.22}/Cargo.toml +1 -1
- {gitronics-0.5.20 → gitronics-0.5.22}/PKG-INFO +1 -1
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/assessments.md +2 -2
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/building_a_model.md +7 -7
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/card_id_numbers.md +1 -1
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/concepts.md +4 -4
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/configuration_file.md +3 -2
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/index.md +2 -2
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/usage/migrate.md +1 -6
- {gitronics-0.5.20 → gitronics-0.5.22}/.github/workflows/ci.yml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/.github/workflows/docs.yml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/.gitignore +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/.vscode/settings.json +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/LICENSE +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/README.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/assets/logo.png +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/best_practices.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/examples.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/file_types.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/migrating.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/new_project.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started/project_structure.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/getting_started.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/hooks/version_from_git.py +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/installation.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/requirements.txt +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/docs/usage/build.md +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.mcnp +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.metadata +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/small_override.yaml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/configurations/valid_configuration.yaml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/output/.gitignore +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/fine_mesh.tally +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/materials.mat +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/my_transform.transform +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/volumetric_source.source +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.mcnp +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.metadata +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_1.mcnp +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_1.metadata +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_2.mcnp +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_2.metadata +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/mkdocs.yml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/pyproject.toml +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/python/gitronics/__init__.py +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/python/gitronics/__main__.py +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/python/gitronics/gitronics.pyi +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/python/tests/test_build_model.py +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/python/tests/test_cli_works.py +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/resources/simple_model.mcnp +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/build_model.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/build_report.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/cli.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/lib.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/main.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/migrate_model.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/model_config.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/project_manager/load_metadata.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/project_manager/load_model_config.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/project_manager/load_project_files.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/project_manager.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/python.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/report.css +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/types.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/src/utils.rs +0 -0
- {gitronics-0.5.20 → gitronics-0.5.22}/tests/test_example_project.rs +0 -0
|
@@ -3,7 +3,8 @@ name: Release
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
tags:
|
|
6
|
-
|
|
6
|
+
# GitHub Actions tag filters use glob patterns (not regex).
|
|
7
|
+
- "v*.*.*"
|
|
7
8
|
|
|
8
9
|
env:
|
|
9
10
|
CARGO_TERM_COLOR: always
|
|
@@ -135,3 +136,20 @@ jobs:
|
|
|
135
136
|
|
|
136
137
|
- name: Publish to PyPI
|
|
137
138
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
139
|
+
|
|
140
|
+
# ──────────────────────────────────────────────
|
|
141
|
+
# 5. Create/update GitHub Release for the tag
|
|
142
|
+
# ──────────────────────────────────────────────
|
|
143
|
+
github-release:
|
|
144
|
+
name: Publish GitHub Release
|
|
145
|
+
runs-on: ubuntu-latest
|
|
146
|
+
needs: [publish-pypi]
|
|
147
|
+
permissions:
|
|
148
|
+
contents: write
|
|
149
|
+
steps:
|
|
150
|
+
- name: Create or update GitHub Release
|
|
151
|
+
uses: softprops/action-gh-release@v2
|
|
152
|
+
with:
|
|
153
|
+
tag_name: ${{ github.ref_name }}
|
|
154
|
+
name: ${{ github.ref_name }}
|
|
155
|
+
generate_release_notes: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Assessments
|
|
2
2
|
|
|
3
|
-
Gitronics can also be used to manage the specific changes required to
|
|
3
|
+
Gitronics can also be used to manage the specific changes required to a model for a specific assessment.
|
|
4
4
|
The recommended practice is to create a new Git branch for the assessment.
|
|
5
5
|
Then, create a new directory that will contain all the assessment-specific files (e.g. new filler models, tallies, configuration files, etc.).
|
|
6
6
|
This directory could also contain post-processing scripts, organization files and others.
|
|
@@ -30,4 +30,4 @@ gitronics_project/
|
|
|
30
30
|
└── ...
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
After the assessment is complete, the branch can be stored as a file via `git bundle`, and
|
|
33
|
+
After the assessment is complete, the branch can be stored as a file via `git bundle`, and then deleted from the repository to keep the main branch clean.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Building a Model
|
|
2
2
|
|
|
3
3
|
Once a configuration file is ready, the model can be built with the `gitronics build` command.
|
|
4
4
|
After the [installation of Gitronics](../installation.md) is complete, the command can be run from the terminal.
|
|
@@ -34,10 +34,6 @@ When running the `gitronics build` command, the following steps are performed:
|
|
|
34
34
|
|
|
35
35
|
While the build is running, Gitronics will print `INFO` and `WARNING` messages to the terminal indicating the progress of the assembly.
|
|
36
36
|
|
|
37
|
-
!!! tip "`WARNING` messages"
|
|
38
|
-
Watch out for `WARNING` messages, they indicate potential mistakes that will not stop the build, for example, the existence of envelope cells in the envelope structure that are not referenced in the configuration file.
|
|
39
|
-
If the intention was to leave them empty, it is better to explicitly declare them as `null` in the configuration file to make sure they are not forgotten via `envelope_name: null`.
|
|
40
|
-
|
|
41
37
|
??? note "Example of `build` logging"
|
|
42
38
|
```
|
|
43
39
|
[2026-06-23 14:38:02 INFO gitronics] Starting model build process for: configurations/valid_configuration.yaml
|
|
@@ -54,6 +50,10 @@ While the build is running, Gitronics will print `INFO` and `WARNING` messages t
|
|
|
54
50
|
[2026-06-23 14:38:02 INFO gitronics] Build completed successfully in: output/assembled.mcnp
|
|
55
51
|
```
|
|
56
52
|
|
|
53
|
+
!!! tip "`WARNING` messages"
|
|
54
|
+
Watch out for `WARNING` messages, they indicate potential mistakes that will not stop the build, for example, the existence of envelope cells in the envelope structure file that are not referenced in the configuration.
|
|
55
|
+
If the intention was to leave them empty, it is better to explicitly declare them as `null` in the configuration file to make sure they are not forgotten: `envelope_name: null`.
|
|
56
|
+
|
|
57
57
|
## Header
|
|
58
58
|
|
|
59
59
|
The `assembled.mcnp` file will contain a header comment at the top of the file like:
|
|
@@ -69,5 +69,5 @@ C ============================================================
|
|
|
69
69
|
|
|
70
70
|
The first information line shows the Gitronics version used to build the model.
|
|
71
71
|
The second line shows the configuration file used to build the model, relative to the current working directory.
|
|
72
|
-
The third line shows the Git commit hash of the repository at the time of the build.
|
|
73
|
-
The fourth line shows the date and time when the build was performed.
|
|
72
|
+
The third line shows the Git commit hash of the **Gitronics project** repository at the time of the build.
|
|
73
|
+
The fourth line shows the date and time when the build was performed.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Card ID numbers
|
|
2
2
|
|
|
3
3
|
Whenever a file of any type is loaded by Gitronics during a `build` command, Gitronics will copy and paste the cards into a single model.
|
|
4
|
-
If two different files share the same card ID number, for example, two different filler models
|
|
4
|
+
If two different files share the same card ID number, for example, two different filler models sharing a surface, Gitronics will include that surface twice in the assembled model, which will cause a validation error, crashing the build process.
|
|
5
5
|
Gitronics will warn about which card IDs are duplicated with an error message.
|
|
6
6
|
|
|
7
7
|
[Migjorn](https://github.com/Fusion4Energy/migjorn), the parser used internally by Gitronics, is capable of renumbering on the fly any card ID.
|
|
@@ -4,12 +4,12 @@ The following is a list of concepts or keywords that are used throughout the doc
|
|
|
4
4
|
|
|
5
5
|
- **Gitronics**. The name of the tool and methodology.
|
|
6
6
|
- **Gitronics project**. A reactor/s or other nuclear project that is managed with the Gitronics methodology.
|
|
7
|
-
- **Git
|
|
7
|
+
- [**Git**](https://git-scm.com/). A distributed version control system that is used to track changes in the files of a **Gitronics project**.
|
|
8
8
|
- **Reference model directory**. A directory containing files that can be used to assemble an MCNP model.
|
|
9
|
-
- **Assembled model**. The output of the `gitronics build` command, a single MCNP input file generated from a
|
|
10
|
-
- **Configuration file
|
|
9
|
+
- **Assembled model**. The output of the [`gitronics build`](../usage/build.md) command, a single MCNP input file generated from a [configuration](configuration_file.md) file and the contents of the **reference model directory**.
|
|
10
|
+
- [**Configuration file**](configuration_file.md). A YAML file that declares which filler models and data cards are used to assemble a model.
|
|
11
11
|
- **Envelope structure**. An MCNP input file that defines the *level 0* geometry cells, that is, cells that do not belong to a filler universe. It is the only mandatory file in a Gitronics project.
|
|
12
12
|
- **Envelope cell**. A MCNP cell that can be filled with a filler model. They are defined in the envelope structure file as cells with an inline comment of the form `$ @env:<envelope_name>`, where `<envelope_name>` is the name for the envelope cell.
|
|
13
|
-
- **Filler model**.
|
|
13
|
+
- **Filler model**. A MCNP input file that defines a *filler universe*, which is a set of geometry cells that can be inserted into an envelope cell. A filler model must have a metadata file with the same name and the `.metadata` extension.
|
|
14
14
|
- **Data card file**. A file that contains MCNP data cards, such as materials, sources, tallies, transformations or others. These files can have the following extensions: `.mat`, `.source`, `.tally`, or `.transform`.
|
|
15
15
|
- **Metadata file**. A YAML file that contains metadata related to a geometry or data card file. A metadata file must have the same name as the file it describes, but with the `.metadata` extension. These files are optional except for filler models and they can hold any arbitrary information.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Configuration file
|
|
2
2
|
|
|
3
|
-
This is a YAML file that declares which filler models and data cards are used to assemble a model.
|
|
3
|
+
This is a [YAML](https://yaml.org/) file that declares which filler models and data cards are used to assemble a model.
|
|
4
4
|
The configuration file does not need to be in the `reference_model` directory, it can be anywhere in the project.
|
|
5
5
|
For example:
|
|
6
6
|
|
|
@@ -78,13 +78,14 @@ Only one source file can be specified, but any number of materials, transformati
|
|
|
78
78
|
### `envelopes`
|
|
79
79
|
|
|
80
80
|
This field is a dictionary that maps envelope cell names to filler model file stems.
|
|
81
|
-
If an envelope cell name appears in the dictionary but is not found in the envelope structure, Gitronics will raise an error.
|
|
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
82
|
|
|
83
83
|
## Overriding other configuration
|
|
84
84
|
|
|
85
85
|
If a configuration file specifies the `overrides` field, it will inherit from the parent configuration file. The parent is loaded first and the current file is merged on top of it. Fields present in the current file take precedence; the parent provides defaults.
|
|
86
86
|
|
|
87
87
|
The overriding rules are as follows:
|
|
88
|
+
|
|
88
89
|
- The field `project_roots` is not inherited, it must be specified in the current configuration file.
|
|
89
90
|
- 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.
|
|
90
91
|
- 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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Gitronics** is a tool for assembling [MCNP](https://mcnp.lanl.gov/) neutronics models from modular, version-controlled components.
|
|
4
4
|
|
|
5
|
-
Instead of maintaining a single monolithic MCNP input file, Gitronics lets you decompose a model into independent universe *filler models*, an *envelope structure*, and separate data cards (materials, sources, tallies, transformations). These components are assembled at build time according to a YAML configuration file.
|
|
5
|
+
Instead of maintaining a single monolithic MCNP input file, Gitronics lets you decompose a model into independent universe *filler models*, an *envelope structure*, and separate data cards (materials, sources, tallies, transformations). These components are assembled at build time according to a [YAML](https://yaml.org/) configuration file.
|
|
6
6
|
|
|
7
7
|
This workflow enables:
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ output/
|
|
|
36
36
|
The `build` command reads a configuration file, loads all referenced components, inserts `FILL` cards into the envelope cells, and writes a single self-contained MCNP input file.
|
|
37
37
|
It is highly recommended to use [Git](https://git-scm.com/) to track changes to your project files.
|
|
38
38
|
|
|
39
|
-
If you have never used Gitronics before, please take a few minutes to read the whole [Getting Started](getting_started.md) guide to understand the
|
|
39
|
+
If you have never used Gitronics before, please take a few minutes to read the whole [Getting Started](getting_started.md) guide to understand the methodology.
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -42,7 +42,7 @@ Each universe found in the model is written to its own `universe_<id>.mcnp` file
|
|
|
42
42
|
|
|
43
43
|
### Metadata files
|
|
44
44
|
|
|
45
|
-
Each filler model is accompanied by a `.metadata` YAML file. These files describe how the filler should be placed and can specify per-envelope transformation cards.
|
|
45
|
+
Each filler model is accompanied by a `.metadata` YAML file. These files describe how the filler should be placed and can specify per-envelope transformation cards.
|
|
46
46
|
|
|
47
47
|
## Verifying the round-trip
|
|
48
48
|
|
|
@@ -51,13 +51,8 @@ After migration, rebuild the model and verify it matches the original:
|
|
|
51
51
|
```bash
|
|
52
52
|
gitronics build tokamak_project/configurations/baseline.yaml \
|
|
53
53
|
--output-path tokamak_project/output
|
|
54
|
-
diff models/tokamak_2025.mcnp tokamak_project/output/assembled.mcnp
|
|
55
54
|
```
|
|
56
55
|
|
|
57
|
-
!!! note
|
|
58
|
-
Minor formatting differences (whitespace, line ordering within a section) are expected. The geometry and physics data should be functionally identical.
|
|
59
|
-
|
|
60
56
|
## Limitations
|
|
61
57
|
|
|
62
58
|
- Data cards (materials, tallies, source) are written to a single `data_cards.source` file. After migration you may wish to split these into separate files under `reference_model/data_cards/`.
|
|
63
|
-
- The migration does not attempt to detect repeated structures or simplify the model.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.mcnp
RENAMED
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.metadata
RENAMED
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/assessment_specific/small_override.yaml
RENAMED
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/configurations/valid_configuration.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/fine_mesh.tally
RENAMED
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/data_cards/materials.mat
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.mcnp
RENAMED
|
File without changes
|
{gitronics-0.5.20 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.metadata
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|