-
Notifications
You must be signed in to change notification settings - Fork 5
SAMMY inp module #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAMMY inp module #131
Conversation
…nd multiple scattering corrections - Implemented `CovarianceMatrixOptions` class for covariance matrix data input control. - Added `ExperimentalDataInputOptions` class for experimental data input control. - Created `MultipleScatteringCorrectionsOptions` class for handling multiple scattering corrections. - Developed unit tests for each of the new options classes to ensure correct behavior and mutual exclusivity. - Added test cases for valid and invalid combinations of options to validate the functionality.
- Implement CovarianceMatrixOutputOptions class for managing output options related to covariance matrices. - Introduce validation to ensure mutually exclusive options are handled correctly. - Create unit tests for CovarianceMatrixOutputOptions to verify default values, valid combinations, and error handling for mutually exclusive options. Add unit tests for cross section options - Implement tests for CrossSectionOptions to validate default settings, individual option handling, and mutually exclusive options. - Ensure comprehensive coverage of all possible configurations and expected behaviors. Add unit tests for LPT output options - Create tests for LPTOutputOptions to check default values, valid combinations, and error handling for mutually exclusive options. - Validate the correct generation of alphanumeric commands based on selected options. Add unit tests for quantum numbers options - Implement tests for QuantumNumbersOptions to verify default settings, valid combinations, and mutually exclusive options. - Ensure accurate command generation based on selected options. Add unit tests for covariance matrix input options - Create tests for CovarianceMatrixOptions to validate default values, individual option handling, and mutually exclusive options. - Ensure comprehensive coverage of all possible configurations and expected behaviors. Add unit tests for R-matrix options - Implement tests for RMatrixOptions to verify default settings, valid combinations, and mutually exclusive options. - Validate the correct generation of alphanumeric commands based on selected options.
…d generation methods
- Implemented PlotFileOptions class for managing plot file configurations, including energy units, ODF file options, plot generation, and theoretical uncertainties. - Added SpecialAnalysisOptions class for special analysis configurations, including cross section reconstruction, uncertainty multipliers, and matrix generation. - Introduced validation for mutually exclusive options in both classes to ensure correct configurations. - Developed comprehensive unit tests for both PlotFileOptions and SpecialAnalysisOptions to verify default values, option exclusivity, and command generation. - Created test cases for physical constants and angular distribution options to ensure functionality and correctness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors and extends the alphanumerics module for SAMMY by adding new Pydantic models for URR, special analysis, R‐matrix, plot file, physical constants, ENDF, cross section, Bayes solution, averages, and angular distribution options while also incorporating additional documentation and unit test scaffolding.
- Refactored URR options for improved readability
- Introduced new models for special analysis, averages, and angular distribution
- Updated documentation in markdown and YAML files and adjusted pre-commit exclusions
Reviewed Changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/pleiades/sammy/alphanumerics/urr.py | New URR options model with mutually exclusive validations |
src/pleiades/sammy/alphanumerics/special_analysis.py | Added special analysis options model |
src/pleiades/sammy/alphanumerics/sammy_table_VIA1.1.md | Added markdown table for command categories |
src/pleiades/sammy/alphanumerics/r_matrix.py | Updated R‑matrix options to include general options |
src/pleiades/sammy/alphanumerics/plot_file.py | Introduced new plot file options model with validations |
src/pleiades/sammy/alphanumerics/physical_constants.py | New physical constants options model with exclusivity enforcement |
src/pleiades/sammy/alphanumerics/endf.py | Added ENDF options model with dependency checks |
src/pleiades/sammy/alphanumerics/cross_section.py | New cross section options model with mutual exclusivity logic |
src/pleiades/sammy/alphanumerics/bayes_solution.py | Updated Bayes solution options model; added inversion and special fitting groups |
src/pleiades/sammy/alphanumerics/averages.py | New averages options model with dependency validation |
src/pleiades/sammy/alphanumerics/angular_distribution.py | New angular distribution options model enforcing frame selection |
.pre-commit-config.yaml | Updated codespell exclude regex to ignore documentation file extensions |
Comments suppressed due to low confidence (2)
src/pleiades/sammy/alphanumerics/bayes_solution.py:137
- The field 'take_baby_steps_with_least_squares_method' is referenced in the get_alphanumeric_commands method but is not defined in the BayesSolutionOptions model. Please add a Field definition for this option or remove its usage if not required.
if self.take_baby_steps_with_least_squares_method:
src/pleiades/sammy/alphanumerics/bayes_solution.py:138
- The field 'use_remembered_original_parameter_values' is referenced in the get_alphanumeric_commands method but is not defined in the BayesSolutionOptions model. Please add its definition or update the mutually exclusive groups and command generation code accordingly.
if self.use_remembered_original_parameter_values:
…ix, and Special Analysis Options
…nce validation; update tests for default and custom configurations
…ntegration; include tests for initialization, command generation, and file writing
…e corresponding sections; update tests for initialization and content generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new SAMMY input module by refactoring and completing the set of alphanumeric command categories, providing Pydantic models for each category, and adding corresponding tables, unit tests, and usage examples.
- Add a markdown table (
sammy_table_VIA1.1.md
) listing all alphanumeric categories and abbreviations. - Implement Pydantic models for each SAMMY option group (e.g., R-matrix, plot file, physical constants, ENDF, cross section, Bayes solution, averages, angular distribution) with validation and command generation.
- Update project configuration (
pyproject.toml
,.pre-commit-config.yaml
) and notebooks with new dependency and example usages.
Reviewed Changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/pleiades/sammy/alphanumerics/sammy_table_VIA1.1.md | Add markdown table of alphanumeric categories and abbreviations. |
src/pleiades/sammy/alphanumerics/r_matrix.py | Add RMatrixOptions model with R-matrix and general options. |
src/pleiades/sammy/alphanumerics/plot_file.py | Add PlotFileOptions model with mutually exclusive validation and command generation. |
src/pleiades/sammy/alphanumerics/physical_constants.py | Add PhysicalConstantsOptions model enforcing one-of validation. |
src/pleiades/sammy/alphanumerics/endf.py | Add ENDFOptions model with dependency validation. |
src/pleiades/sammy/alphanumerics/cross_section.py | Add CrossSectionOptions model with complex exclusivity logic. |
src/pleiades/sammy/alphanumerics/bayes_solution.py | Add BayesSolutionOptions model with grouped exclusivity. |
src/pleiades/sammy/alphanumerics/averages.py | Add AveragesOptions model with dependency and exclusivity checks. |
src/pleiades/sammy/alphanumerics/angular_distribution.py | Add AngularDistributionOptions model with exclusive frame selection. |
src/pleiades/sammy/alphanumerics/init.py | Export all new alphanumeric option models in package. |
pyproject.toml | Add viztracer dependency. |
examples/Notebooks/pleiades_sammy_endf.ipynb | Update notebook outputs and add INP‐generation example. |
.pre-commit-config.yaml | Extend codespell exclusion to include new alphanumeric files. |
Comments suppressed due to low confidence (3)
src/pleiades/sammy/alphanumerics/cross_section.py:50
- Capitalization inconsistency: "DErivatives" should be "DERIVATIVES".
use_no_cutoffs_for_derivatives: bool = Field(default=False, description="USE NO CUTOFFS FOR DErivatives or cross sections")
src/pleiades/sammy/alphanumerics/init.py:26
- [nitpick] Import name
CovarianceMatrixOptions
collides conceptually with the parameter‐covariance import aliasPCovarianceMatrixInOptions
; consider renaming this export toDataCovarianceMatrixOptions
for clarity.
from pleiades.sammy.alphanumerics.covariance_matrix_data import CovarianceMatrixOptions
src/pleiades/sammy/alphanumerics/cross_section.py:55
- [nitpick] Inconsistent capitalization: the word "functions" should be uppercase to match the all‐caps style used elsewhere.
use_alternative_coulomb_functions: bool = Field(default=False, description="USE ALTERNATIVE COULOMB functions")
I was able to review the pull request. Everything looks good to me. I think after I pull in the parfile branch I can start adding to the InpManager functionality. Specifically I think we need to initiate it with a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already left a comment.
This is a work in progress.
This PR introduces the following changes
Test Introductions
pleiades_Si_transmission.ipynb
andpleiades_sammy_endf.ipynb
)Summary [AI]
This pull request includes updates to the
.pre-commit-config.yaml
file and modifications to theexamples/Notebooks/pleiades_sammy_endf.ipynb
notebook. The changes primarily address pre-commit hook exclusions and updates to SAMMY execution logs and metadata.Pre-commit Configuration Updates:
exclude
pattern for thecodespell
hook in.pre-commit-config.yaml
to include.md
,.yaml
, and.yml
files undersrc/pleiades/sammy/alphanumerics/
directory.Notebook Updates:
pleiades_sammy_endf.ipynb
notebook to reflect new SAMMY runs. This includes: