gitronics 0.5.24__tar.gz → 0.6.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.
Files changed (70) hide show
  1. {gitronics-0.5.24 → gitronics-0.6.0}/Cargo.lock +20 -7
  2. {gitronics-0.5.24 → gitronics-0.6.0}/Cargo.toml +2 -2
  3. {gitronics-0.5.24 → gitronics-0.6.0}/PKG-INFO +2 -2
  4. {gitronics-0.5.24 → gitronics-0.6.0}/README.md +9 -0
  5. {gitronics-0.5.24 → gitronics-0.6.0}/docs/examples.md +12 -4
  6. {gitronics-0.5.24 → gitronics-0.6.0}/docs/index.md +10 -0
  7. {gitronics-0.5.24 → gitronics-0.6.0}/mkdocs.yml +4 -4
  8. {gitronics-0.5.24 → gitronics-0.6.0}/pyproject.toml +1 -1
  9. {gitronics-0.5.24 → gitronics-0.6.0}/python/gitronics/__init__.py +2 -1
  10. {gitronics-0.5.24 → gitronics-0.6.0}/python/gitronics/gitronics.pyi +16 -0
  11. {gitronics-0.5.24 → gitronics-0.6.0}/src/build_model.rs +213 -186
  12. gitronics-0.6.0/src/migrate_model.rs +193 -0
  13. {gitronics-0.5.24 → gitronics-0.6.0}/src/project_manager/load_metadata.rs +7 -6
  14. gitronics-0.6.0/src/project_manager/load_project_files.rs +104 -0
  15. {gitronics-0.5.24 → gitronics-0.6.0}/src/project_manager.rs +1 -1
  16. {gitronics-0.5.24 → gitronics-0.6.0}/src/python.rs +14 -1
  17. {gitronics-0.5.24 → gitronics-0.6.0}/src/types.rs +0 -43
  18. {gitronics-0.5.24 → gitronics-0.6.0}/src/utils.rs +65 -0
  19. {gitronics-0.5.24 → gitronics-0.6.0}/tests/test_example_project.rs +39 -0
  20. gitronics-0.5.24/src/migrate_model.rs +0 -236
  21. gitronics-0.5.24/src/project_manager/load_project_files.rs +0 -148
  22. {gitronics-0.5.24 → gitronics-0.6.0}/.github/workflows/ci.yml +0 -0
  23. {gitronics-0.5.24 → gitronics-0.6.0}/.github/workflows/docs.yml +0 -0
  24. {gitronics-0.5.24 → gitronics-0.6.0}/.github/workflows/release.yml +0 -0
  25. {gitronics-0.5.24 → gitronics-0.6.0}/.gitignore +0 -0
  26. {gitronics-0.5.24 → gitronics-0.6.0}/.vscode/settings.json +0 -0
  27. {gitronics-0.5.24 → gitronics-0.6.0}/LICENSE +0 -0
  28. {gitronics-0.5.24 → gitronics-0.6.0}/docs/assets/logo.png +0 -0
  29. {gitronics-0.5.24 → gitronics-0.6.0}/docs/best_practices.md +0 -0
  30. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/assessments.md +0 -0
  31. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/building_a_model.md +0 -0
  32. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/card_id_numbers.md +0 -0
  33. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/concepts.md +0 -0
  34. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/configuration_file.md +0 -0
  35. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/file_types.md +0 -0
  36. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/migrating.md +0 -0
  37. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/new_project.md +0 -0
  38. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started/project_structure.md +0 -0
  39. {gitronics-0.5.24 → gitronics-0.6.0}/docs/getting_started.md +0 -0
  40. {gitronics-0.5.24 → gitronics-0.6.0}/docs/hooks/version_from_git.py +0 -0
  41. {gitronics-0.5.24 → gitronics-0.6.0}/docs/installation.md +0 -0
  42. {gitronics-0.5.24 → gitronics-0.6.0}/docs/requirements.txt +0 -0
  43. {gitronics-0.5.24 → gitronics-0.6.0}/docs/usage/build.md +0 -0
  44. {gitronics-0.5.24 → gitronics-0.6.0}/docs/usage/migrate.md +0 -0
  45. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/assessment_specific/filler_model_3.mcnp +0 -0
  46. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/assessment_specific/filler_model_3.metadata +0 -0
  47. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/assessment_specific/small_override.yaml +0 -0
  48. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/configurations/valid_configuration.yaml +0 -0
  49. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/output/.gitignore +0 -0
  50. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/data_cards/fine_mesh.tally +0 -0
  51. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/data_cards/materials.mat +0 -0
  52. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/data_cards/my_transform.transform +0 -0
  53. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/data_cards/volumetric_source.source +0 -0
  54. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/envelope_structure.mcnp +0 -0
  55. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/envelope_structure.metadata +0 -0
  56. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/filler_models/filler_model_1.mcnp +0 -0
  57. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/filler_models/filler_model_1.metadata +0 -0
  58. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/filler_models/filler_model_2.mcnp +0 -0
  59. {gitronics-0.5.24 → gitronics-0.6.0}/example_project/reference_model/filler_models/filler_model_2.metadata +0 -0
  60. {gitronics-0.5.24 → gitronics-0.6.0}/python/gitronics/__main__.py +0 -0
  61. {gitronics-0.5.24 → gitronics-0.6.0}/python/tests/test_build_model.py +0 -0
  62. {gitronics-0.5.24 → gitronics-0.6.0}/python/tests/test_cli_works.py +0 -0
  63. {gitronics-0.5.24 → gitronics-0.6.0}/resources/simple_model.mcnp +0 -0
  64. {gitronics-0.5.24 → gitronics-0.6.0}/src/build_report.rs +0 -0
  65. {gitronics-0.5.24 → gitronics-0.6.0}/src/cli.rs +0 -0
  66. {gitronics-0.5.24 → gitronics-0.6.0}/src/lib.rs +0 -0
  67. {gitronics-0.5.24 → gitronics-0.6.0}/src/main.rs +0 -0
  68. {gitronics-0.5.24 → gitronics-0.6.0}/src/model_config.rs +0 -0
  69. {gitronics-0.5.24 → gitronics-0.6.0}/src/project_manager/load_model_config.rs +0 -0
  70. {gitronics-0.5.24 → gitronics-0.6.0}/src/report.css +0 -0
@@ -390,7 +390,7 @@ dependencies = [
390
390
 
391
391
  [[package]]
392
392
  name = "gitronics"
393
- version = "0.5.24"
393
+ version = "0.6.0"
394
394
  dependencies = [
395
395
  "chrono",
396
396
  "clap",
@@ -636,14 +636,21 @@ dependencies = [
636
636
 
637
637
  [[package]]
638
638
  name = "migjorn"
639
- version = "0.1.8"
639
+ version = "0.2.2"
640
640
  source = "registry+https://github.com/rust-lang/crates.io-index"
641
- checksum = "d3f2fe960921f8c049fc7ac5536e96cba576e902cf040c258e8092eabb9eeaaf"
641
+ checksum = "ce11924d4ef1f0496f0be14e68860ab11bbc0b63222057d03bc92b22b4084f3d"
642
642
  dependencies = [
643
- "clap",
644
- "memchr",
645
- "rayon",
646
- "thiserror",
643
+ "migjorn-syntax",
644
+ "rustc-hash",
645
+ ]
646
+
647
+ [[package]]
648
+ name = "migjorn-syntax"
649
+ version = "0.2.2"
650
+ source = "registry+https://github.com/rust-lang/crates.io-index"
651
+ checksum = "42d3806f43fee8380cfaa0e26e9fee3a2dbece142e5314b6c7f9a0babf03fe05"
652
+ dependencies = [
653
+ "rustc-hash",
647
654
  ]
648
655
 
649
656
  [[package]]
@@ -858,6 +865,12 @@ version = "0.8.10"
858
865
  source = "registry+https://github.com/rust-lang/crates.io-index"
859
866
  checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
860
867
 
868
+ [[package]]
869
+ name = "rustc-hash"
870
+ version = "2.1.3"
871
+ source = "registry+https://github.com/rust-lang/crates.io-index"
872
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
873
+
861
874
  [[package]]
862
875
  name = "rustix"
863
876
  version = "1.1.4"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "gitronics"
3
- version = "0.5.24"
3
+ version = "0.6.0"
4
4
  edition = "2024"
5
5
  description = "Build MCNP neutronics models from modular components"
6
6
  license = "EUPL-1.2"
@@ -16,7 +16,7 @@ crate-type = ["cdylib", "rlib"]
16
16
 
17
17
  [dependencies]
18
18
  pyo3 = { version = "0.23", features = ["extension-module", "abi3-py39"] }
19
- migjorn = { version = "0.1.8" }
19
+ migjorn = { version = "0.2.2" }
20
20
  walkdir = "2.5.0"
21
21
  serde = { version = "1.0.228", features = ["derive"] }
22
22
  serde-saphyr = "0.0.26"
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitronics
3
- Version: 0.5.24
3
+ Version: 0.6.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
7
7
  License-File: LICENSE
8
8
  Summary: Build MCNP neutronics models from modular components
9
- Requires-Python: >=3.8
9
+ Requires-Python: >=3.9
@@ -15,6 +15,8 @@ Gitronics lets you decompose a monolithic [MCNP](https://mcnp.lanl.gov/) input f
15
15
 
16
16
  **Full documentation: [fusion4energy.github.io/gitronics](https://fusion4energy.github.io/gitronics/latest/)**
17
17
 
18
+ The Gitronics methodology is already used to maintain the most complex neutronics models of the [ITER](https://www.iter.org/) fusion reactor, and [JT-60SA](https://www.jt60sa.org/) tokamak.
19
+
18
20
  ## Why?
19
21
 
20
22
  | Problem with monolithic models | Gitronics solution |
@@ -98,6 +100,13 @@ The full documentation covers installation, CLI reference, configuration options
98
100
 
99
101
  **[fusion4energy.github.io/gitronics](https://fusion4energy.github.io/gitronics/latest/)**
100
102
 
103
+ ## Publication
104
+
105
+ Gitronics is described in the following publication:
106
+
107
+ - Cubi, A., et al. *Novel modular and Git-based approach for the management and development of radiation transport models*. [Fusion Engineering and Design](https://www.sciencedirect.com/journal/fusion-engineering-and-design), 2025. [https://doi.org/10.1016/j.fusengdes.2025.115248](https://doi.org/10.1016/j.fusengdes.2025.115248)
108
+
109
+
101
110
  ## License
102
111
 
103
112
  [EUPL-1.2](LICENSE)
@@ -15,10 +15,18 @@ example_project/
15
15
  └── reference_model/
16
16
  ├── envelope_structure.mcnp
17
17
  ├── envelope_structure.metadata
18
- └── filler_models/
19
- ├── filler_model_1.mcnp
20
- ├── filler_model_1.metadata
21
- └── filler_model_2.mcnp
18
+ ├── filler_models/
19
+ ├── filler_model_1.mcnp
20
+ ├── filler_model_1.metadata
21
+ └── filler_model_2.mcnp
22
+ ├── source/
23
+ │ └── volumetric_source.mcnp
24
+ ├── materials/
25
+ │ └── materials.mcnp
26
+ ├── transformations/
27
+ │ └── my_transform.mcnp
28
+ └── tallies/
29
+ └── fine_mesh.mcnp
22
30
  ```
23
31
 
24
32
  ### Configuration
@@ -14,6 +14,8 @@ This workflow enables:
14
14
  - **Parallelism** — teams can develop different sub-models independently.
15
15
  - **Reproducibility** — each assembled model records the git commit hash and build timestamp in its metadata.
16
16
 
17
+ The Gitronics methodology is already used to maintain the most complex neutronics models of the [ITER](https://www.iter.org/) fusion reactor, and [JT-60SA](https://www.jt60sa.org/) tokamak.
18
+
17
19
  ---
18
20
 
19
21
  ## How it works
@@ -43,6 +45,14 @@ If you have never used Gitronics before, please take a few minutes to read the w
43
45
 
44
46
  ---
45
47
 
48
+ ## Publication
49
+
50
+ Gitronics is described in the following publication:
51
+
52
+ - Cubi, A., et al. *Novel modular and Git-based approach for the management and development of radiation transport models*. [Fusion Engineering and Design](https://www.sciencedirect.com/journal/fusion-engineering-and-design), 2025. [https://doi.org/10.1016/j.fusengdes.2025.115248](https://doi.org/10.1016/j.fusengdes.2025.115248)
53
+
54
+ ---
55
+
46
56
  ## Quick links
47
57
 
48
58
  - [Installation](installation.md)
@@ -11,14 +11,14 @@ theme:
11
11
  favicon: assets/logo.png
12
12
  palette:
13
13
  - scheme: default
14
- primary: deep purple
15
- accent: teal
14
+ # primary: deep purple
15
+ # accent: teal
16
16
  toggle:
17
17
  icon: material/brightness-7
18
18
  name: Switch to dark mode
19
19
  - scheme: slate
20
- primary: deep purple
21
- accent: teal
20
+ # primary: deep purple
21
+ # accent: teal
22
22
  toggle:
23
23
  icon: material/brightness-4
24
24
  name: Switch to light mode
@@ -6,7 +6,7 @@ build-backend = "maturin"
6
6
  name = "gitronics"
7
7
  dynamic = ["version"]
8
8
  description = "Build MCNP neutronics models from modular components"
9
- requires-python = ">=3.8"
9
+ requires-python = ">=3.9"
10
10
  classifiers = [
11
11
  "Programming Language :: Rust",
12
12
  "Programming Language :: Python :: Implementation :: CPython",
@@ -11,9 +11,10 @@ from __future__ import annotations
11
11
  import sys
12
12
 
13
13
  from .gitronics import py_build_model as build_model # type: ignore[import]
14
+ from .gitronics import py_migrate_model as migrate_model # type: ignore[import]
14
15
  from .gitronics import run # type: ignore[import]
15
16
 
16
- __all__ = ["build_model", "run"]
17
+ __all__ = ["build_model", "migrate_model", "run"]
17
18
 
18
19
 
19
20
  def _cli_main() -> None:
@@ -43,3 +43,19 @@ def py_build_model(config_path: Path | str, output_path: Path | str) -> None:
43
43
  )
44
44
  """
45
45
  ...
46
+
47
+ def py_migrate_model(mcnp_input: Path | str, output_path: Path | str) -> None:
48
+ """Migrate a monolithic MCNP model into a new gitronics project.
49
+
50
+ Splits the deck at *mcnp_input* into an envelope structure, per-universe
51
+ filler models, and a data-cards file, and writes a baseline configuration
52
+ that rebuilds the original model with :func:`build_model`.
53
+
54
+ Args:
55
+ mcnp_input: Path to the monolithic MCNP input file.
56
+ output_path: Directory where the new project will be created.
57
+
58
+ Raises:
59
+ RuntimeError: If any step of the migration fails.
60
+ """
61
+ ...