gitronics 0.5.8__tar.gz → 0.5.9__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.8 → gitronics-0.5.9}/Cargo.lock +1 -1
- {gitronics-0.5.8 → gitronics-0.5.9}/Cargo.toml +1 -1
- {gitronics-0.5.8 → gitronics-0.5.9}/PKG-INFO +1 -1
- {gitronics-0.5.8 → gitronics-0.5.9}/src/build_model.rs +1 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/model_config.rs +2 -1
- {gitronics-0.5.8 → gitronics-0.5.9}/src/project_manager/load_metadata.rs +2 -1
- {gitronics-0.5.8 → gitronics-0.5.9}/src/utils.rs +16 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/.github/workflows/ci.yml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/.github/workflows/docs.yml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/.github/workflows/release.yml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/.gitignore +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/.vscode/settings.json +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/LICENSE +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/README.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/assets/logo.png +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/best-practices.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/changelog.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/examples.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/getting-started.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/index.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/installation.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/requirements.txt +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/usage/build.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/usage/configuration.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/docs/usage/migrate.md +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/assessment_specific/filler_model_3.mcnp +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/assessment_specific/filler_model_3.metadata +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/assessment_specific/small_override.yaml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/configurations/valid_configuration.yaml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/output/.gitignore +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/fine_mesh.tally +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/materials.mat +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/my_transform.transform +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/volumetric_source.source +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/envelope_structure.mcnp +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/envelope_structure.metadata +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/filler_models/filler_model_1.mcnp +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/filler_models/filler_model_1.metadata +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/filler_models/filler_model_2.mcnp +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/filler_models/filler_model_2.metadata +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/mkdocs.yml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/pyproject.toml +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/python/gitronics/__init__.py +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/python/gitronics/__main__.py +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/python/gitronics/gitronics.pyi +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/python/tests/test_build_model.py +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/python/tests/test_cli_works.py +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/resources/simple_model.mcnp +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/cli.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/lib.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/main.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/migrate_model.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/project_manager/load_model_config.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/project_manager/load_project_files.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/project_manager.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/python.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/src/types.rs +0 -0
- {gitronics-0.5.8 → gitronics-0.5.9}/tests/test_example_project.rs +0 -0
|
@@ -63,6 +63,7 @@ pub fn build_model(config_path: &Path, output_path: &Path) -> Result<(), Gitroni
|
|
|
63
63
|
.map_err(|e| GitronicsError::ValidationError(e.to_string()))?;
|
|
64
64
|
|
|
65
65
|
// Write model
|
|
66
|
+
info!("Writing assembled model to file");
|
|
66
67
|
let assembled_path = project_manager.output_path().join("assembled.mcnp");
|
|
67
68
|
write_assembled_header(&mut envelope_structure, config_path)?;
|
|
68
69
|
envelope_structure.write_to_file(&assembled_path)?;
|
|
@@ -39,7 +39,8 @@ impl ModelConfig {
|
|
|
39
39
|
|
|
40
40
|
/// Parses a model configuration from a YAML file.
|
|
41
41
|
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, GitronicsError> {
|
|
42
|
-
let yaml_content =
|
|
42
|
+
let yaml_content =
|
|
43
|
+
fs::read_to_string(&path).map_err(|source| GitronicsError::io_path(&path, source))?;
|
|
43
44
|
let mut config: ModelConfig = serde_saphyr::from_str(&yaml_content).map_err(|e| {
|
|
44
45
|
GitronicsError::YamlParse(path.as_ref().to_string_lossy().to_string(), e.to_string())
|
|
45
46
|
})?;
|
|
@@ -24,7 +24,8 @@ impl ProjectManager {
|
|
|
24
24
|
if !metadata_path.exists() {
|
|
25
25
|
return Err(GitronicsError::MetadataNotFound(filler_name.into()));
|
|
26
26
|
}
|
|
27
|
-
let yaml_content = fs::read_to_string(&metadata_path)
|
|
27
|
+
let yaml_content = fs::read_to_string(&metadata_path)
|
|
28
|
+
.map_err(|source| GitronicsError::io_path(&metadata_path, source))?;
|
|
28
29
|
let filler_metadata: FillerMetadata =
|
|
29
30
|
serde_saphyr::from_str(&yaml_content).map_err(|e| {
|
|
30
31
|
GitronicsError::YamlParse(
|
|
@@ -19,6 +19,13 @@ const VALID_SUFFIXES: &[&str] = &["yaml", "yml", "mcnp", "mat", "tally", "transf
|
|
|
19
19
|
|
|
20
20
|
#[derive(Debug, Error)]
|
|
21
21
|
pub enum GitronicsError {
|
|
22
|
+
#[error("I/O error at `{path}`: {source}")]
|
|
23
|
+
IoPath {
|
|
24
|
+
path: String,
|
|
25
|
+
#[source]
|
|
26
|
+
source: io::Error,
|
|
27
|
+
},
|
|
28
|
+
|
|
22
29
|
#[error("I/O error occurred: `{0}`")]
|
|
23
30
|
Io(#[from] io::Error),
|
|
24
31
|
|
|
@@ -81,6 +88,15 @@ pub enum GitronicsError {
|
|
|
81
88
|
ValidationError(String),
|
|
82
89
|
}
|
|
83
90
|
|
|
91
|
+
impl GitronicsError {
|
|
92
|
+
pub fn io_path(path: impl AsRef<Path>, source: io::Error) -> Self {
|
|
93
|
+
Self::IoPath {
|
|
94
|
+
path: path.as_ref().display().to_string(),
|
|
95
|
+
source,
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
/// Recursively discovers and indexes all project files by their stem names.
|
|
85
101
|
///
|
|
86
102
|
/// Walks through the given directory tree and collects files with valid suffixes
|
|
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
|
{gitronics-0.5.8 → gitronics-0.5.9}/example_project/assessment_specific/filler_model_3.metadata
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/fine_mesh.tally
RENAMED
|
File without changes
|
{gitronics-0.5.8 → gitronics-0.5.9}/example_project/reference_model/data_cards/materials.mat
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitronics-0.5.8 → gitronics-0.5.9}/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
|