gitronics 0.5.21__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.
Files changed (68) hide show
  1. {gitronics-0.5.21 → gitronics-0.5.22}/Cargo.lock +1 -1
  2. {gitronics-0.5.21 → gitronics-0.5.22}/Cargo.toml +1 -1
  3. {gitronics-0.5.21 → gitronics-0.5.22}/PKG-INFO +1 -1
  4. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/assessments.md +2 -2
  5. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/building_a_model.md +7 -7
  6. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/card_id_numbers.md +1 -1
  7. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/concepts.md +4 -4
  8. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/configuration_file.md +3 -2
  9. {gitronics-0.5.21 → gitronics-0.5.22}/docs/index.md +1 -1
  10. {gitronics-0.5.21 → gitronics-0.5.22}/docs/usage/migrate.md +1 -6
  11. {gitronics-0.5.21 → gitronics-0.5.22}/.github/workflows/ci.yml +0 -0
  12. {gitronics-0.5.21 → gitronics-0.5.22}/.github/workflows/docs.yml +0 -0
  13. {gitronics-0.5.21 → gitronics-0.5.22}/.github/workflows/release.yml +0 -0
  14. {gitronics-0.5.21 → gitronics-0.5.22}/.gitignore +0 -0
  15. {gitronics-0.5.21 → gitronics-0.5.22}/.vscode/settings.json +0 -0
  16. {gitronics-0.5.21 → gitronics-0.5.22}/LICENSE +0 -0
  17. {gitronics-0.5.21 → gitronics-0.5.22}/README.md +0 -0
  18. {gitronics-0.5.21 → gitronics-0.5.22}/docs/assets/logo.png +0 -0
  19. {gitronics-0.5.21 → gitronics-0.5.22}/docs/best_practices.md +0 -0
  20. {gitronics-0.5.21 → gitronics-0.5.22}/docs/examples.md +0 -0
  21. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/file_types.md +0 -0
  22. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/migrating.md +0 -0
  23. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/new_project.md +0 -0
  24. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started/project_structure.md +0 -0
  25. {gitronics-0.5.21 → gitronics-0.5.22}/docs/getting_started.md +0 -0
  26. {gitronics-0.5.21 → gitronics-0.5.22}/docs/hooks/version_from_git.py +0 -0
  27. {gitronics-0.5.21 → gitronics-0.5.22}/docs/installation.md +0 -0
  28. {gitronics-0.5.21 → gitronics-0.5.22}/docs/requirements.txt +0 -0
  29. {gitronics-0.5.21 → gitronics-0.5.22}/docs/usage/build.md +0 -0
  30. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.mcnp +0 -0
  31. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/assessment_specific/filler_model_3.metadata +0 -0
  32. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/assessment_specific/small_override.yaml +0 -0
  33. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/configurations/valid_configuration.yaml +0 -0
  34. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/output/.gitignore +0 -0
  35. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/data_cards/fine_mesh.tally +0 -0
  36. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/data_cards/materials.mat +0 -0
  37. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/data_cards/my_transform.transform +0 -0
  38. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/data_cards/volumetric_source.source +0 -0
  39. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.mcnp +0 -0
  40. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/envelope_structure.metadata +0 -0
  41. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_1.mcnp +0 -0
  42. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_1.metadata +0 -0
  43. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_2.mcnp +0 -0
  44. {gitronics-0.5.21 → gitronics-0.5.22}/example_project/reference_model/filler_models/filler_model_2.metadata +0 -0
  45. {gitronics-0.5.21 → gitronics-0.5.22}/mkdocs.yml +0 -0
  46. {gitronics-0.5.21 → gitronics-0.5.22}/pyproject.toml +0 -0
  47. {gitronics-0.5.21 → gitronics-0.5.22}/python/gitronics/__init__.py +0 -0
  48. {gitronics-0.5.21 → gitronics-0.5.22}/python/gitronics/__main__.py +0 -0
  49. {gitronics-0.5.21 → gitronics-0.5.22}/python/gitronics/gitronics.pyi +0 -0
  50. {gitronics-0.5.21 → gitronics-0.5.22}/python/tests/test_build_model.py +0 -0
  51. {gitronics-0.5.21 → gitronics-0.5.22}/python/tests/test_cli_works.py +0 -0
  52. {gitronics-0.5.21 → gitronics-0.5.22}/resources/simple_model.mcnp +0 -0
  53. {gitronics-0.5.21 → gitronics-0.5.22}/src/build_model.rs +0 -0
  54. {gitronics-0.5.21 → gitronics-0.5.22}/src/build_report.rs +0 -0
  55. {gitronics-0.5.21 → gitronics-0.5.22}/src/cli.rs +0 -0
  56. {gitronics-0.5.21 → gitronics-0.5.22}/src/lib.rs +0 -0
  57. {gitronics-0.5.21 → gitronics-0.5.22}/src/main.rs +0 -0
  58. {gitronics-0.5.21 → gitronics-0.5.22}/src/migrate_model.rs +0 -0
  59. {gitronics-0.5.21 → gitronics-0.5.22}/src/model_config.rs +0 -0
  60. {gitronics-0.5.21 → gitronics-0.5.22}/src/project_manager/load_metadata.rs +0 -0
  61. {gitronics-0.5.21 → gitronics-0.5.22}/src/project_manager/load_model_config.rs +0 -0
  62. {gitronics-0.5.21 → gitronics-0.5.22}/src/project_manager/load_project_files.rs +0 -0
  63. {gitronics-0.5.21 → gitronics-0.5.22}/src/project_manager.rs +0 -0
  64. {gitronics-0.5.21 → gitronics-0.5.22}/src/python.rs +0 -0
  65. {gitronics-0.5.21 → gitronics-0.5.22}/src/report.css +0 -0
  66. {gitronics-0.5.21 → gitronics-0.5.22}/src/types.rs +0 -0
  67. {gitronics-0.5.21 → gitronics-0.5.22}/src/utils.rs +0 -0
  68. {gitronics-0.5.21 → gitronics-0.5.22}/tests/test_example_project.rs +0 -0
@@ -390,7 +390,7 @@ dependencies = [
390
390
 
391
391
  [[package]]
392
392
  name = "gitronics"
393
- version = "0.5.21"
393
+ version = "0.5.22"
394
394
  dependencies = [
395
395
  "chrono",
396
396
  "clap",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "gitronics"
3
- version = "0.5.21"
3
+ version = "0.5.22"
4
4
  edition = "2024"
5
5
  description = "Build MCNP neutronics models from modular components"
6
6
  license = "EUPL-1.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitronics
3
- Version: 0.5.21
3
+ Version: 0.5.22
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -1,6 +1,6 @@
1
1
  # Assessments
2
2
 
3
- Gitronics can also be used to manage the specific changes required to the model for a specific assessment.
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 the assessment-specific files can be deleted from the main branch to keep it clean.
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
- # Build Model
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 share a surface, Gitronics will include that surface twice in the assembled model, which will cause a validation error crashing the build process.
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**. A distributed version control system that is used to track changes in the files of a **Gitronics project**.
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 **configuration** file and the contents of the **reference model directory**.
10
- - **Configuration file**. A YAML file that declares which filler models and data cards are used to assemble a model.
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**. An 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.
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
 
@@ -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. Edit them to add transformations after migration.
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