endf-parserpy 0.17.0__tar.gz → 0.19.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.
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/LICENSE +1 -1
- endf_parserpy-0.19.0/MANIFEST.in +2 -0
- endf_parserpy-0.19.0/PKG-INFO +231 -0
- endf_parserpy-0.19.0/README.md +194 -0
- endf_parserpy-0.19.0/THIRD_PARTY_NOTICES.md +76 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/__init__.py +32 -1
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/compare.py +99 -16
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/convert.py +34 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/explain.py +18 -9
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/insert_material.py +4 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/insert_text.py +14 -7
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/list_materials.py +3 -3
- endf_parserpy-0.19.0/endf_parserpy/cli/actions/match.py +156 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/remove_material.py +2 -2
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/replace.py +108 -42
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/show.py +20 -10
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/update_directory.py +13 -6
- endf_parserpy-0.19.0/endf_parserpy/cli/actions/validate.py +346 -0
- endf_parserpy-0.19.0/endf_parserpy/cli/cmd.py +114 -0
- endf_parserpy-0.19.0/endf_parserpy/cli/cmd_utils.py +475 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/code_generator_core.py +255 -50
- endf_parserpy-0.19.0/endf_parserpy/compiler/code_generator_parsing.py +930 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/code_generator_parsing_core.py +3 -7
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/code_generator_writing.py +310 -111
- endf_parserpy-0.19.0/endf_parserpy/compiler/code_generator_writing_core.py +352 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/compiler.py +113 -37
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_boilerplate.py +172 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_boilerplate_reading.py +306 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_boilerplate_writing.py +4 -4
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/endf_float_cpp.hpp +341 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/endf_rational.hpp +180 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/index_shifter.hpp +1047 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/module_header.hpp +832 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/module_header_reading.hpp +4891 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_templates/module_header_writing.hpp +1637 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_information.py +2 -3
- {endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_matrix2d → endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_array}/__init__.py +1 -1
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_array/assign.py +792 -0
- {endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_vector → endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_array}/auxiliary.py +1 -1
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_array/definition.py +442 -0
- {endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_matrix2d → endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_array}/query.py +7 -5
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_scalar/assign.py +20 -3
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_type_scalar/auxiliary.py +41 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_varops_assign.py +36 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_varops_query.py +77 -23
- endf_parserpy-0.19.0/endf_parserpy/compiler/cpp_types/cpp_vartype_handling.py +280 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/endf2cpp.py +355 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/endf2cpp_aux.py +1218 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/endf2cpp_aux_writing.py +11 -5
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/conversion.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/custom_nodes.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/equation_utils.py +17 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/node_checks.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/node_trafos.py +91 -19
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/tree_trafos.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/tree_walkers.py +2 -2
- endf_parserpy-0.19.0/endf_parserpy/compiler/mode_management.py +373 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/node_aux.py +22 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/node_checks.py +3 -3
- endf_parserpy-0.19.0/endf_parserpy/compiler/recipe_layout.py +193 -0
- endf_parserpy-0.19.0/endf_parserpy/compiler/unused_arrays.py +212 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/variable_management.py +2 -2
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/__init__.py +8 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/_historical_modules.py +151 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/endf6.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/endf6_ext.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/endf_parser_cpp.py +731 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/errorr.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/jendl.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/pendf.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/cpp_parsers/test.py +29 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_parser_base.py +311 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_parser_factory.py +59 -11
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/__init__.py +9 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/catalogue.py +306 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/__init__.py +4 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf14.py +13 -6
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt455.py +5 -5
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/endf6/endf_recipe_mf26.py +48 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf2_mt151.py +12 -6
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf31_mt452_455_456.py +9 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf32.py +17 -18
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf5.py +5 -5
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf6.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf7.py +28 -11
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf8_mt457.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6_ext/__init__.py +4 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/errorr/__init__.py +4 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/gendf/__init__.py +53 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/gendf/endf_recipe_groupwise.py +111 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/gendf/endf_recipe_mf0_mt0.py +15 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/gendf/endf_recipe_mf1_mt451.py +53 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/jendl/__init__.py +4 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/jendl/endf_recipe_mf8_mt457.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/__init__.py +4 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf6.py +3 -3
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/__init__.py +147 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/test/endf_recipe_mf1.py +22 -2
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf10.py +92 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf2.py +229 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf3.py +62 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf4.py +43 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf5.py +28 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf6.py +28 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf7.py +119 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf8.py +70 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/test/endf_recipe_mf9.py +85 -0
- endf_parserpy-0.19.0/endf_parserpy/endf_recipes/utils.py +6 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/errors.py +13 -4
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/custom_exceptions.py +18 -1
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/endf_mapping_core.py +196 -32
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/endf_mapping_utils.py +381 -38
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/endf_mappings.py +26 -8
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/endf_parser.py +783 -240
- endf_parserpy-0.19.0/endf_parserpy/interpreter/endf_recipe_utils.py +116 -0
- endf_parserpy-0.19.0/endf_parserpy/interpreter/endf_utils.py +992 -0
- endf_parserpy-0.19.0/endf_parserpy/interpreter/fortran_utils.py +518 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/helpers.py +4 -2
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/logging_utils.py +24 -5
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/lookahead_management.py +73 -8
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/meta_control_utils.py +109 -39
- endf_parserpy-0.19.0/endf_parserpy/interpreter/numpy_annotation.py +917 -0
- endf_parserpy-0.19.0/endf_parserpy/interpreter/numpy_arrays.py +404 -0
- endf_parserpy-0.19.0/endf_parserpy/interpreter/tree_analysis.py +66 -0
- endf_parserpy-0.19.0/endf_parserpy/recipe_parser/__init__.py +25 -0
- endf_parserpy-0.19.0/endf_parserpy/recipe_parser/parser.py +928 -0
- endf_parserpy-0.19.0/endf_parserpy/recipe_parser/tree.py +265 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/__init__.py +6 -1
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/address.py +73 -17
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/endf_file.py +865 -115
- endf_parserpy-0.19.0/endf_parserpy/tape/errors.py +129 -0
- endf_parserpy-0.19.0/endf_parserpy/tape/framing.py +829 -0
- endf_parserpy-0.19.0/endf_parserpy/tape/index.py +918 -0
- endf_parserpy-0.19.0/endf_parserpy/tape/material.py +342 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/operations.py +56 -12
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/records.py +1 -1
- endf_parserpy-0.19.0/endf_parserpy/tape/splitter.py +161 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/views.py +85 -16
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/accessories.py +447 -58
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/debugging_utils.py +61 -6
- endf_parserpy-0.19.0/endf_parserpy/utils/deprecation.py +79 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/endf6_plumbing.py +26 -7
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/matching.py +39 -8
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/math_utils.py +6 -2
- endf_parserpy-0.19.0/endf_parserpy/utils/record_vectors.py +101 -0
- endf_parserpy-0.19.0/endf_parserpy/utils/sections.py +540 -0
- endf_parserpy-0.19.0/endf_parserpy/utils/tape_structure.py +896 -0
- endf_parserpy-0.19.0/endf_parserpy/utils/text_encoding.py +264 -0
- endf_parserpy-0.19.0/endf_parserpy/utils/tolerated_mismatches.py +250 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/tree_utils.py +3 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/user_tools.py +30 -15
- endf_parserpy-0.19.0/endf_parserpy.egg-info/PKG-INFO +231 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy.egg-info/SOURCES.txt +180 -12
- endf_parserpy-0.19.0/endf_parserpy.egg-info/requires.txt +10 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/pyproject.toml +12 -3
- endf_parserpy-0.19.0/setup.py +322 -0
- endf_parserpy-0.19.0/tests/test_abbreviation_scope.py +81 -0
- endf_parserpy-0.19.0/tests/test_accept_non_ascii.py +217 -0
- endf_parserpy-0.19.0/tests/test_accessories_numpy.py +171 -0
- endf_parserpy-0.19.0/tests/test_benchmark_report.py +1176 -0
- endf_parserpy-0.19.0/tests/test_blank_line_hint.py +128 -0
- endf_parserpy-0.19.0/tests/test_cli_match_invalid_query.py +78 -0
- endf_parserpy-0.19.0/tests/test_cli_parse_errors.py +278 -0
- endf_parserpy-0.19.0/tests/test_cli_replace_mat_mismatch.py +71 -0
- endf_parserpy-0.19.0/tests/test_cli_section_edits.py +197 -0
- endf_parserpy-0.19.0/tests/test_cli_section_selectors.py +146 -0
- endf_parserpy-0.19.0/tests/test_cli_validate_fast_path.py +305 -0
- endf_parserpy-0.19.0/tests/test_cli_validate_report.py +260 -0
- endf_parserpy-0.19.0/tests/test_cmake_project_content.py +66 -0
- endf_parserpy-0.19.0/tests/test_cpp_build_info.py +147 -0
- endf_parserpy-0.19.0/tests/test_cpp_codegen_dedup_key.py +120 -0
- endf_parserpy-0.19.0/tests/test_cpp_codegen_repeated_unknown.py +86 -0
- endf_parserpy-0.19.0/tests/test_cpp_codegen_shared_chunks.py +244 -0
- endf_parserpy-0.19.0/tests/test_cpp_condition_read_check.py +129 -0
- endf_parserpy-0.19.0/tests/test_cpp_endf_float_objects.py +83 -0
- endf_parserpy-0.19.0/tests/test_cpp_endf_float_original_strings.py +214 -0
- endf_parserpy-0.19.0/tests/test_cpp_error_context.py +198 -0
- endf_parserpy-0.19.0/tests/test_cpp_field_reading.py +152 -0
- endf_parserpy-0.19.0/tests/test_cpp_float_field_writing.py +177 -0
- endf_parserpy-0.19.0/tests/test_cpp_float_kernel_equivalence.py +290 -0
- endf_parserpy-0.19.0/tests/test_cpp_float_reading_exact.py +195 -0
- endf_parserpy-0.19.0/tests/test_cpp_float_row_kernel.py +425 -0
- endf_parserpy-0.19.0/tests/test_cpp_float_writing_edge_cases.py +231 -0
- endf_parserpy-0.19.0/tests/test_cpp_gc_pause.py +70 -0
- endf_parserpy-0.19.0/tests/test_cpp_historical_modules.py +329 -0
- endf_parserpy-0.19.0/tests/test_cpp_intg_reading.py +270 -0
- endf_parserpy-0.19.0/tests/test_cpp_intg_writing.py +303 -0
- endf_parserpy-0.19.0/tests/test_cpp_legacy_strings.py +52 -0
- endf_parserpy-0.19.0/tests/test_cpp_line_reading.py +81 -0
- endf_parserpy-0.19.0/tests/test_cpp_line_views.py +290 -0
- endf_parserpy-0.19.0/tests/test_cpp_list_bulk_form.py +660 -0
- endf_parserpy-0.19.0/tests/test_cpp_list_bulk_form_codegen.py +517 -0
- endf_parserpy-0.19.0/tests/test_cpp_list_reserve.py +515 -0
- endf_parserpy-0.19.0/tests/test_cpp_load_file_into_memory.py +125 -0
- endf_parserpy-0.19.0/tests/test_cpp_module_function_defaults.py +28 -0
- endf_parserpy-0.19.0/tests/test_cpp_result_containers.py +154 -0
- endf_parserpy-0.19.0/tests/test_cpp_tape_header_blank_mfmt.py +69 -0
- endf_parserpy-0.19.0/tests/test_cpp_type_checks.py +316 -0
- endf_parserpy-0.19.0/tests/test_cpp_verbatim_fallback.py +88 -0
- endf_parserpy-0.19.0/tests/test_cpp_write_array_type_mismatch.py +81 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_array_accessor.py +518 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_empty_list.py +69 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_line_assembly.py +182 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_lookahead.py +118 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_numpy_blocks.py +93 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_register_element.py +380 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_sequences.py +74 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_skipped_elements.py +91 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_tab_sizes.py +90 -0
- endf_parserpy-0.19.0/tests/test_cpp_writer_unused_arrays.py +193 -0
- endf_parserpy-0.19.0/tests/test_crlf_blank_lines.py +95 -0
- endf_parserpy-0.19.0/tests/test_d_exponent_handling.py +109 -0
- endf_parserpy-0.19.0/tests/test_deprecated_cache_options.py +72 -0
- endf_parserpy-0.19.0/tests/test_deprecation_warnings.py +219 -0
- endf_parserpy-0.19.0/tests/test_empty_inner_loops.py +157 -0
- endf_parserpy-0.19.0/tests/test_empty_tables.py +104 -0
- endf_parserpy-0.19.0/tests/test_endf6_plumbing_description.py +69 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_construction.py +25 -19
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_cpp_parser.py +8 -3
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_cpp_parser_options.py +19 -3
- endf_parserpy-0.19.0/tests/test_endf_file_canonical_data.py +87 -0
- endf_parserpy-0.19.0/tests/test_endf_file_numpy_views.py +250 -0
- endf_parserpy-0.19.0/tests/test_endf_file_section_handoff.py +123 -0
- endf_parserpy-0.19.0/tests/test_endf_file_tpid_blank_mat.py +112 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_parser_factory.py +19 -0
- endf_parserpy-0.19.0/tests/test_endf_parser_factory_defaults.py +111 -0
- endf_parserpy-0.19.0/tests/test_endf_parser_lookahead_state.py +91 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_parser_options.py +5 -0
- endf_parserpy-0.19.0/tests/test_endfpath_equality.py +135 -0
- endf_parserpy-0.19.0/tests/test_endfpath_sections.py +478 -0
- endf_parserpy-0.19.0/tests/test_expression_arithmetic.py +252 -0
- endf_parserpy-0.19.0/tests/test_final_line_endings.py +237 -0
- endf_parserpy-0.19.0/tests/test_float_formatting_precision.py +181 -0
- endf_parserpy-0.19.0/tests/test_gendf_flavor.py +688 -0
- endf_parserpy-0.19.0/tests/test_integer_field_overflow.py +74 -0
- endf_parserpy-0.19.0/tests/test_intg_ndigit.py +64 -0
- endf_parserpy-0.19.0/tests/test_layout_versions.py +565 -0
- endf_parserpy-0.19.0/tests/test_list_body_npl_overrun.py +249 -0
- endf_parserpy-0.19.0/tests/test_list_mode_empty_arrays.py +209 -0
- endf_parserpy-0.19.0/tests/test_list_mode_empty_sections.py +80 -0
- endf_parserpy-0.19.0/tests/test_locale_independence.py +249 -0
- endf_parserpy-0.19.0/tests/test_long_lines_and_messages.py +145 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_matching.py +16 -1
- endf_parserpy-0.19.0/tests/test_negative_zero_formatting.py +100 -0
- endf_parserpy-0.19.0/tests/test_numpy_annotation.py +426 -0
- endf_parserpy-0.19.0/tests/test_numpy_arrays.py +492 -0
- endf_parserpy-0.19.0/tests/test_numpy_blocks_3d.py +193 -0
- endf_parserpy-0.19.0/tests/test_numpy_intg_blocks.py +314 -0
- endf_parserpy-0.19.0/tests/test_numpy_regular_blocks.py +271 -0
- endf_parserpy-0.19.0/tests/test_prefer_noexp_small_numbers.py +96 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_py_and_cpp_parser_output_equivalence.py +8 -8
- endf_parserpy-0.19.0/tests/test_py_numpy_arrays.py +265 -0
- endf_parserpy-0.19.0/tests/test_py_write_array_type_mismatch.py +57 -0
- endf_parserpy-0.19.0/tests/test_recipe_law2_lang_per_energy.py +293 -0
- endf_parserpy-0.19.0/tests/test_recipe_layout.py +63 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf14.py +94 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf1_mt455.py +123 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf26.py +99 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf2_mt151_rml.py +152 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf31.py +122 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf32_rml.py +149 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf5.py +79 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf7_mt4.py +80 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf7_mt451.py +114 -0
- endf_parserpy-0.19.0/tests/test_recipe_mf8_mt457.py +137 -0
- endf_parserpy-0.19.0/tests/test_recipe_parser_memory.py +155 -0
- endf_parserpy-0.19.0/tests/test_recipe_parser_oracle.py +502 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_reported_cpp_parser_issues.py +1 -1
- endf_parserpy-0.19.0/tests/test_scalar_read_in_loop.py +95 -0
- endf_parserpy-0.19.0/tests/test_section_edits.py +304 -0
- endf_parserpy-0.19.0/tests/test_section_functions.py +396 -0
- endf_parserpy-0.19.0/tests/test_section_order.py +269 -0
- endf_parserpy-0.19.0/tests/test_section_selection_forms.py +156 -0
- endf_parserpy-0.19.0/tests/test_short_lines.py +119 -0
- endf_parserpy-0.19.0/tests/test_standard_form_on_tie.py +324 -0
- endf_parserpy-0.19.0/tests/test_strict_control_fields.py +972 -0
- endf_parserpy-0.19.0/tests/test_tape_blank_lines.py +144 -0
- endf_parserpy-0.19.0/tests/test_tape_head_rule.py +154 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_tape_index.py +4 -0
- endf_parserpy-0.19.0/tests/test_tape_index_duplicates.py +219 -0
- endf_parserpy-0.19.0/tests/test_tape_index_missing_tpid.py +165 -0
- endf_parserpy-0.19.0/tests/test_tape_index_scan.py +253 -0
- endf_parserpy-0.19.0/tests/test_tape_section_selectors.py +189 -0
- endf_parserpy-0.19.0/tests/test_tape_structure.py +224 -0
- endf_parserpy-0.19.0/tests/test_tape_structure_conformance.py +468 -0
- endf_parserpy-0.19.0/tests/test_tape_structure_cpp.py +86 -0
- endf_parserpy-0.19.0/tests/test_tape_structure_py.py +546 -0
- endf_parserpy-0.19.0/tests/test_text_encoding.py +231 -0
- endf_parserpy-0.19.0/tests/test_text_fields.py +249 -0
- endf_parserpy-0.19.0/tests/test_tolerated_mismatch_summary.py +698 -0
- endf_parserpy-0.19.0/tests/test_unknown_endf_format.py +63 -0
- endf_parserpy-0.19.0/tests/test_validate_framing_records.py +861 -0
- endf_parserpy-0.19.0/tests/test_value_strings_edge_cases.py +120 -0
- endf_parserpy-0.19.0/tests/test_value_strings_writing.py +98 -0
- endf_parserpy-0.19.0/tests/test_verbatim_bytes_lines.py +75 -0
- endf_parserpy-0.19.0/tests/test_verbatim_section_lines.py +108 -0
- endf_parserpy-0.19.0/tests/test_verbatim_short_lines.py +99 -0
- endf_parserpy-0.19.0/tests/test_without_lark.py +97 -0
- endf_parserpy-0.19.0/tests/test_write_missing_tpid.py +124 -0
- endf_parserpy-0.19.0/tests/test_write_verbatim_sections.py +132 -0
- endf_parserpy-0.19.0/tests/test_writefile_no_partial.py +366 -0
- endf_parserpy-0.19.0/tests/test_zero_mismatch_variables.py +367 -0
- endf_parserpy-0.17.0/MANIFEST.in +0 -2
- endf_parserpy-0.17.0/PKG-INFO +0 -132
- endf_parserpy-0.17.0/README.md +0 -100
- endf_parserpy-0.17.0/endf_parserpy/cli/actions/match.py +0 -80
- endf_parserpy-0.17.0/endf_parserpy/cli/actions/validate.py +0 -98
- endf_parserpy-0.17.0/endf_parserpy/cli/cmd.py +0 -69
- endf_parserpy-0.17.0/endf_parserpy/cli/cmd_utils.py +0 -258
- endf_parserpy-0.17.0/endf_parserpy/compiler/code_generator_parsing.py +0 -636
- endf_parserpy-0.17.0/endf_parserpy/compiler/code_generator_writing_core.py +0 -115
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_boilerplate.py +0 -103
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_boilerplate_reading.py +0 -69
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_templates/endf_float_cpp.hpp +0 -141
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_templates/index_shifter.hpp +0 -179
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_templates/module_header.hpp +0 -90
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_templates/module_header_reading.hpp +0 -744
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_templates/module_header_writing.hpp +0 -539
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_matrix2d/assign.py +0 -232
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_matrix2d/definition.py +0 -123
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_vector/__init__.py +0 -10
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_vector/assign.py +0 -96
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_vector/definition.py +0 -143
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_nested_vector/query.py +0 -40
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_type_scalar/auxiliary.py +0 -29
- endf_parserpy-0.17.0/endf_parserpy/compiler/cpp_types/cpp_vartype_handling.py +0 -135
- endf_parserpy-0.17.0/endf_parserpy/compiler/endf2cpp.py +0 -125
- endf_parserpy-0.17.0/endf_parserpy/compiler/endf2cpp_aux.py +0 -286
- endf_parserpy-0.17.0/endf_parserpy/compiler/mode_management.py +0 -184
- endf_parserpy-0.17.0/endf_parserpy/cpp_parsers/__init__.py +0 -1
- endf_parserpy-0.17.0/endf_parserpy/cpp_parsers/endf_parser_cpp.py +0 -336
- endf_parserpy-0.17.0/endf_parserpy/endf_parser_base.py +0 -135
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/__init__.py +0 -4
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/catalogue.py +0 -29
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/endf6/endf_recipe_mf26.py +0 -48
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/endf6/endf_recipe_mf31.py +0 -28
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/recipe_cache/__init__.py +0 -2
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/test/__init__.py +0 -11
- endf_parserpy-0.17.0/endf_parserpy/endf_recipes/utils.py +0 -41
- endf_parserpy-0.17.0/endf_parserpy/interpreter/endf_recipe_utils.py +0 -120
- endf_parserpy-0.17.0/endf_parserpy/interpreter/endf_utils.py +0 -590
- endf_parserpy-0.17.0/endf_parserpy/interpreter/fortran_utils.py +0 -296
- endf_parserpy-0.17.0/endf_parserpy/tape/errors.py +0 -60
- endf_parserpy-0.17.0/endf_parserpy/tape/index.py +0 -601
- endf_parserpy-0.17.0/endf_parserpy/tape/material.py +0 -174
- endf_parserpy-0.17.0/endf_parserpy/tape/splitter.py +0 -99
- endf_parserpy-0.17.0/endf_parserpy.egg-info/PKG-INFO +0 -132
- endf_parserpy-0.17.0/endf_parserpy.egg-info/requires.txt +0 -2
- endf_parserpy-0.17.0/setup.py +0 -329
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/cli/actions/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compat_wrappers/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compat_wrappers/import_resources_new.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compat_wrappers/importlib_resources.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_primitives.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_templates/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_dtype_aux.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_scalar/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_scalar/definition.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_scalar/query.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_template/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_type_template/query.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/cpp_types/cpp_varaux.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/expr_utils/exceptions.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/compiler/lookahead_management.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf0_mt0.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf10.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf12.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf13.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf15.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt451.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt452.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt456.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt458.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf1_mt460.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf23.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf27.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf28.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf3.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf30_mt1.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf30_mt2.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf33.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf34.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf35.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf4.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf40.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf8.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf8_mt454.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf8_mt459.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6/endf_recipe_mf9.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf6_ext/endf_recipe_mf4.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/endf_lark_ebnf.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/errorr/endf_recipe_mf0_mt0.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/errorr/endf_recipe_mf1_mt451.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/errorr/endf_recipe_mf3.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/errorr/endf_recipe_mf33.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf1_mt451.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf23.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf2_mt152.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf2_mt153.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/endf_recipes/pendf/endf_recipe_mf3.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/interpreter/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/tape/cache.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy/utils/__init__.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy.egg-info/dependency_links.txt +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy.egg-info/entry_points.txt +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy.egg-info/not-zip-safe +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/endf_parserpy.egg-info/top_level.txt +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/setup.cfg +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_accessories.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_cli_equivalence.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_cli_multimaterial.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_crlf_line_endings.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_file_lazy.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_float_class.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_parser.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_recipe_elements_cpp.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_endf_recipe_elements_python.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_integer_field_strictness.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_multimaterial.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_nan_inf_handling.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_send_record_handling.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_tape_editing.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_tape_interop.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_tape_path_access.py +0 -0
- {endf_parserpy-0.17.0 → endf_parserpy-0.19.0}/tests/test_tape_query.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022-
|
|
3
|
+
Copyright (c) 2022-2026 International Atomic Energy Agency
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: endf-parserpy
|
|
3
|
+
Version: 0.19.0
|
|
4
|
+
Summary: A Python package for reading, writing, verifying and translating ENDF-6 files
|
|
5
|
+
Author: Georg Schnabel
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/iaea-nds/endf-parserpy
|
|
8
|
+
Project-URL: Documentation, https://endf-parserpy.readthedocs.io/en/stable/
|
|
9
|
+
Project-URL: Issues, https://github.com/iaea-nds/endf-parserpy/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Provides-Extra: fast
|
|
30
|
+
Requires-Dist: numpy>=1.20; extra == "fast"
|
|
31
|
+
Provides-Extra: cli
|
|
32
|
+
Requires-Dist: lark>=1.0.0; extra == "cli"
|
|
33
|
+
Provides-Extra: test
|
|
34
|
+
Requires-Dist: pytest; extra == "test"
|
|
35
|
+
Requires-Dist: lark>=1.1; extra == "test"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# endf-parserpy - an ENDF-6 toolkit for Python
|
|
39
|
+
|
|
40
|
+
[](https://pypi.org/project/endf-parserpy/)
|
|
41
|
+
[](https://pypi.org/project/endf-parserpy/)
|
|
42
|
+
[](https://github.com/IAEA-NDS/endf-parserpy/actions/workflows/test_package.yml)
|
|
43
|
+
[](https://endf-parserpy.readthedocs.io/en/latest/)
|
|
44
|
+
|
|
45
|
+
`endf-parserpy` is a Python package for reading
|
|
46
|
+
and writing [ENDF-6](https://doi.org/10.2172/2007538) files.
|
|
47
|
+
This functionality in combination with Python's
|
|
48
|
+
powerful facilities for data handling enables you to
|
|
49
|
+
perform various actions on ENDF-6 files, such as:
|
|
50
|
+
|
|
51
|
+
- Access any information easily
|
|
52
|
+
- Modify, delete, and insert data
|
|
53
|
+
- Perform format validation
|
|
54
|
+
- Convert to and from other file formats, such as JSON
|
|
55
|
+
- Merge data from multiple ENDF-6 files into a single file
|
|
56
|
+
- Read and write files containing multiple materials (tapes)
|
|
57
|
+
- Compare ENDF-6 files and generate meaningful reports of their differences
|
|
58
|
+
- Construct ENDF-6 files from scratch
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
Many of these actions can also be performed from the command line
|
|
62
|
+
through the `endf-cli` tool.
|
|
63
|
+
|
|
64
|
+
The support for the ENDF-6 format is comprehensive, and some special
|
|
65
|
+
NJOY2016 output formats are supported as well. The package has been
|
|
66
|
+
tested on the various sublibraries of the major nuclear data
|
|
67
|
+
libraries, such as
|
|
68
|
+
[ENDF/B](https://www.nndc.bnl.gov/endf/),
|
|
69
|
+
[JEFF](https://www.oecd-nea.org/dbdata/jeff/),
|
|
70
|
+
and [JENDL](https://wwwndc.jaea.go.jp/jendl/jendl.html).
|
|
71
|
+
Files that bundle several materials — including PENDF tapes
|
|
72
|
+
that repeat the same material at different temperatures — are
|
|
73
|
+
supported both as plain lists of materials and through a lazy,
|
|
74
|
+
memory-bounded `EndfFile` interface for large files.
|
|
75
|
+
Parsing and writing are heavily optimized; see
|
|
76
|
+
[Performance](#performance) below for concrete figures.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## Install endf-parserpy
|
|
80
|
+
|
|
81
|
+
This package is available on the
|
|
82
|
+
[Python Package Index](https://pypi.org/project/endf-parserpy/)
|
|
83
|
+
and can be installed using `pip`:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
python -m pip install endf-parserpy --upgrade
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The optional NumPy dependency, installed with
|
|
90
|
+
`python -m pip install "endf-parserpy[fast]"`, is needed for
|
|
91
|
+
`array_type="numpy"`, the fastest parsing mode, and speeds up the
|
|
92
|
+
scan of multi-material files, which otherwise runs in pure Python.
|
|
93
|
+
Parsing with the other array types does not need NumPy.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## Documentation
|
|
97
|
+
|
|
98
|
+
The documentation is available online
|
|
99
|
+
[@readthedocs](https://endf-parserpy.readthedocs.io).
|
|
100
|
+
See the `README.md` in the `docs/` subdirectory
|
|
101
|
+
for instructions on building the documentation locally.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Simple example
|
|
105
|
+
|
|
106
|
+
The following code snippet demonstrates
|
|
107
|
+
how to read an ENDF-6 file, change the
|
|
108
|
+
`AWR` variable in the MF3/MT1 section
|
|
109
|
+
and write the modified data to a new
|
|
110
|
+
ENDF-6 file:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
from endf_parserpy import EndfParserFactory
|
|
114
|
+
parser = EndfParserFactory.create()
|
|
115
|
+
# fastest variant, returning arrays of numbers as numpy arrays:
|
|
116
|
+
# parser = EndfParserFactory.create(array_type="numpy")
|
|
117
|
+
endf_dict = parser.parsefile('input.endf')
|
|
118
|
+
endf_dict[3][1]['AWR'] = 99.99
|
|
119
|
+
# raises FileExistsError if output.endf exists (overwrite=True replaces it)
|
|
120
|
+
parser.writefile('output.endf', endf_dict)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## How it works
|
|
125
|
+
|
|
126
|
+
Support for the ENDF-6 format in `endf-parserpy` is not hand-coded
|
|
127
|
+
section by section. The format is described by *recipes*, written in a
|
|
128
|
+
formal language that mirrors the record layout of the
|
|
129
|
+
[ENDF-6 formats manual](https://doi.org/10.2172/2007538). This is the
|
|
130
|
+
complete recipe for an MF3 section (cross sections):
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
[MAT, 3, MT/ ZA, AWR, 0, 0, 0, 0] HEAD
|
|
134
|
+
[MAT, 3, MT/ QM, QI, 0, LR, NR, NP / E / xs] TAB1 (xstable)
|
|
135
|
+
SEND
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This single description drives everything else:
|
|
139
|
+
|
|
140
|
+
- reading and writing in pure Python: `EndfParserPy` interprets the
|
|
141
|
+
recipe at run time,
|
|
142
|
+
- the C++ reading *and* writing code of the fast backend
|
|
143
|
+
(`EndfParserCpp`), generated by a compiler included in the package,
|
|
144
|
+
- the structure of the Python dictionaries you work with: the variable
|
|
145
|
+
names in the recipe are the keys in the dictionary, so the formats
|
|
146
|
+
manual directly documents the data you get. The recipe files also
|
|
147
|
+
carry the manual's variable descriptions as comments, making them
|
|
148
|
+
readable documentation of the format itself.
|
|
149
|
+
|
|
150
|
+
Because reading and writing in both parsers and the dictionary layout
|
|
151
|
+
all follow from the same recipe, they are consistent with each other
|
|
152
|
+
and with the format description by construction.
|
|
153
|
+
|
|
154
|
+
The recipes are ordinary data, and the same machinery is open to you:
|
|
155
|
+
custom or extended formats — special NJOY output, laboratory-internal
|
|
156
|
+
conventions, format extensions — can be described as recipes and used
|
|
157
|
+
directly with `EndfParserPy`, and a recipe can be compiled into a
|
|
158
|
+
dedicated fast C++ parser module with a documented procedure. See
|
|
159
|
+
[format extensions](https://endf-parserpy.readthedocs.io/en/latest/guide/format_extensions.html)
|
|
160
|
+
and
|
|
161
|
+
[accelerated parsing and writing](https://endf-parserpy.readthedocs.io/en/latest/guide/accelerated_parsing_and_writing.html)
|
|
162
|
+
in the documentation.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## Performance
|
|
166
|
+
|
|
167
|
+
With the C++ backend and `array_type="numpy"`, `endf-parserpy` reads
|
|
168
|
+
the complete neutron sublibrary of ENDF/B-VIII.1 — 558 files, 1.3 GB —
|
|
169
|
+
in about 2 seconds and writes it back to ENDF-6 text in about
|
|
170
|
+
8 seconds (single core of an Intel Core i7-1165G7 laptop, warm file
|
|
171
|
+
cache; measured on the development version of November 2026). Every
|
|
172
|
+
value is fully interpreted during parsing, and written output is
|
|
173
|
+
formatted field by field.
|
|
174
|
+
|
|
175
|
+
The [Performance](https://endf-parserpy.readthedocs.io/en/latest/performance.html)
|
|
176
|
+
page of the documentation gives the results for both parsers and all
|
|
177
|
+
array types, by sublibrary and file size, with the peak memory and the
|
|
178
|
+
command that reproduces them; they are refreshed for each release.
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## Citation
|
|
182
|
+
|
|
183
|
+
If you want to cite this package,
|
|
184
|
+
please use the following reference:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
G. Schnabel, D. L. Aldama, R. Capote, "How to explain ENDF-6 to computers: A formal ENDF format description language", arXiv:2312.08249, DOI:10.48550/arXiv.2312.08249
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
This code is distributed under the MIT license augmented
|
|
194
|
+
by an IAEA clause, see the accompanying license file for more information.
|
|
195
|
+
|
|
196
|
+
Copyright (c) 2022-2026 International Atomic Energy Agency (IAEA)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## Acknowledgments
|
|
200
|
+
|
|
201
|
+
Daniel Lopez Aldama made significant contributions
|
|
202
|
+
to the development of this package. He debugged the
|
|
203
|
+
ENDF-6 recipe files and helped in numerous discussions
|
|
204
|
+
to convey a good understanding of the technical details of
|
|
205
|
+
the ENDF-6 format that enabled the creation of this package.
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
## Development and AI assistance
|
|
209
|
+
|
|
210
|
+
endf-parserpy, including the formal recipe language, the parser
|
|
211
|
+
architecture and the compiler that translates recipes into C++ code,
|
|
212
|
+
was designed and developed without AI assistance from its beginning
|
|
213
|
+
in 2022 up to and including version 0.16 (May 2026). Starting with
|
|
214
|
+
version 0.17, AI coding assistance (Claude Fable 5 and Claude Opus 5.5
|
|
215
|
+
by Anthropic) has been used extensively, in particular, but not
|
|
216
|
+
exclusively, for the multi-material interface (`TapeIndex`, `EndfFile`
|
|
217
|
+
and the multi-material support of `endf-cli`, version 0.17), the
|
|
218
|
+
support for numpy arrays (`array_type="numpy"`, version 0.18), finding
|
|
219
|
+
and fixing bugs, and the performance optimization of the recipe
|
|
220
|
+
compiler and the generated C++ backend.
|
|
221
|
+
|
|
222
|
+
All AI-assisted changes were reviewed and tested before inclusion.
|
|
223
|
+
Beyond the test suite, changes to reading and writing were checked on
|
|
224
|
+
evaluated nuclear data files, by read-write-read round trips and by
|
|
225
|
+
comparing the parse results and the written output with those of the
|
|
226
|
+
previous version. For the larger changes, this covered all files of
|
|
227
|
+
the ENDF/B-VIII.1 neutron sublibrary and of the ENDF/B-VIII.0 thermal
|
|
228
|
+
scattering, decay data and electro-atomic sublibraries. The optimized
|
|
229
|
+
number conversion of the C++ parser is tested against a reference
|
|
230
|
+
conversion, exhaustively for the number layouts it accelerates, and
|
|
231
|
+
its vectorized variants against the scalar one.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# endf-parserpy - an ENDF-6 toolkit for Python
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/endf-parserpy/)
|
|
4
|
+
[](https://pypi.org/project/endf-parserpy/)
|
|
5
|
+
[](https://github.com/IAEA-NDS/endf-parserpy/actions/workflows/test_package.yml)
|
|
6
|
+
[](https://endf-parserpy.readthedocs.io/en/latest/)
|
|
7
|
+
|
|
8
|
+
`endf-parserpy` is a Python package for reading
|
|
9
|
+
and writing [ENDF-6](https://doi.org/10.2172/2007538) files.
|
|
10
|
+
This functionality in combination with Python's
|
|
11
|
+
powerful facilities for data handling enables you to
|
|
12
|
+
perform various actions on ENDF-6 files, such as:
|
|
13
|
+
|
|
14
|
+
- Access any information easily
|
|
15
|
+
- Modify, delete, and insert data
|
|
16
|
+
- Perform format validation
|
|
17
|
+
- Convert to and from other file formats, such as JSON
|
|
18
|
+
- Merge data from multiple ENDF-6 files into a single file
|
|
19
|
+
- Read and write files containing multiple materials (tapes)
|
|
20
|
+
- Compare ENDF-6 files and generate meaningful reports of their differences
|
|
21
|
+
- Construct ENDF-6 files from scratch
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Many of these actions can also be performed from the command line
|
|
25
|
+
through the `endf-cli` tool.
|
|
26
|
+
|
|
27
|
+
The support for the ENDF-6 format is comprehensive, and some special
|
|
28
|
+
NJOY2016 output formats are supported as well. The package has been
|
|
29
|
+
tested on the various sublibraries of the major nuclear data
|
|
30
|
+
libraries, such as
|
|
31
|
+
[ENDF/B](https://www.nndc.bnl.gov/endf/),
|
|
32
|
+
[JEFF](https://www.oecd-nea.org/dbdata/jeff/),
|
|
33
|
+
and [JENDL](https://wwwndc.jaea.go.jp/jendl/jendl.html).
|
|
34
|
+
Files that bundle several materials — including PENDF tapes
|
|
35
|
+
that repeat the same material at different temperatures — are
|
|
36
|
+
supported both as plain lists of materials and through a lazy,
|
|
37
|
+
memory-bounded `EndfFile` interface for large files.
|
|
38
|
+
Parsing and writing are heavily optimized; see
|
|
39
|
+
[Performance](#performance) below for concrete figures.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Install endf-parserpy
|
|
43
|
+
|
|
44
|
+
This package is available on the
|
|
45
|
+
[Python Package Index](https://pypi.org/project/endf-parserpy/)
|
|
46
|
+
and can be installed using `pip`:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
python -m pip install endf-parserpy --upgrade
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The optional NumPy dependency, installed with
|
|
53
|
+
`python -m pip install "endf-parserpy[fast]"`, is needed for
|
|
54
|
+
`array_type="numpy"`, the fastest parsing mode, and speeds up the
|
|
55
|
+
scan of multi-material files, which otherwise runs in pure Python.
|
|
56
|
+
Parsing with the other array types does not need NumPy.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Documentation
|
|
60
|
+
|
|
61
|
+
The documentation is available online
|
|
62
|
+
[@readthedocs](https://endf-parserpy.readthedocs.io).
|
|
63
|
+
See the `README.md` in the `docs/` subdirectory
|
|
64
|
+
for instructions on building the documentation locally.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## Simple example
|
|
68
|
+
|
|
69
|
+
The following code snippet demonstrates
|
|
70
|
+
how to read an ENDF-6 file, change the
|
|
71
|
+
`AWR` variable in the MF3/MT1 section
|
|
72
|
+
and write the modified data to a new
|
|
73
|
+
ENDF-6 file:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from endf_parserpy import EndfParserFactory
|
|
77
|
+
parser = EndfParserFactory.create()
|
|
78
|
+
# fastest variant, returning arrays of numbers as numpy arrays:
|
|
79
|
+
# parser = EndfParserFactory.create(array_type="numpy")
|
|
80
|
+
endf_dict = parser.parsefile('input.endf')
|
|
81
|
+
endf_dict[3][1]['AWR'] = 99.99
|
|
82
|
+
# raises FileExistsError if output.endf exists (overwrite=True replaces it)
|
|
83
|
+
parser.writefile('output.endf', endf_dict)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## How it works
|
|
88
|
+
|
|
89
|
+
Support for the ENDF-6 format in `endf-parserpy` is not hand-coded
|
|
90
|
+
section by section. The format is described by *recipes*, written in a
|
|
91
|
+
formal language that mirrors the record layout of the
|
|
92
|
+
[ENDF-6 formats manual](https://doi.org/10.2172/2007538). This is the
|
|
93
|
+
complete recipe for an MF3 section (cross sections):
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
[MAT, 3, MT/ ZA, AWR, 0, 0, 0, 0] HEAD
|
|
97
|
+
[MAT, 3, MT/ QM, QI, 0, LR, NR, NP / E / xs] TAB1 (xstable)
|
|
98
|
+
SEND
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This single description drives everything else:
|
|
102
|
+
|
|
103
|
+
- reading and writing in pure Python: `EndfParserPy` interprets the
|
|
104
|
+
recipe at run time,
|
|
105
|
+
- the C++ reading *and* writing code of the fast backend
|
|
106
|
+
(`EndfParserCpp`), generated by a compiler included in the package,
|
|
107
|
+
- the structure of the Python dictionaries you work with: the variable
|
|
108
|
+
names in the recipe are the keys in the dictionary, so the formats
|
|
109
|
+
manual directly documents the data you get. The recipe files also
|
|
110
|
+
carry the manual's variable descriptions as comments, making them
|
|
111
|
+
readable documentation of the format itself.
|
|
112
|
+
|
|
113
|
+
Because reading and writing in both parsers and the dictionary layout
|
|
114
|
+
all follow from the same recipe, they are consistent with each other
|
|
115
|
+
and with the format description by construction.
|
|
116
|
+
|
|
117
|
+
The recipes are ordinary data, and the same machinery is open to you:
|
|
118
|
+
custom or extended formats — special NJOY output, laboratory-internal
|
|
119
|
+
conventions, format extensions — can be described as recipes and used
|
|
120
|
+
directly with `EndfParserPy`, and a recipe can be compiled into a
|
|
121
|
+
dedicated fast C++ parser module with a documented procedure. See
|
|
122
|
+
[format extensions](https://endf-parserpy.readthedocs.io/en/latest/guide/format_extensions.html)
|
|
123
|
+
and
|
|
124
|
+
[accelerated parsing and writing](https://endf-parserpy.readthedocs.io/en/latest/guide/accelerated_parsing_and_writing.html)
|
|
125
|
+
in the documentation.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## Performance
|
|
129
|
+
|
|
130
|
+
With the C++ backend and `array_type="numpy"`, `endf-parserpy` reads
|
|
131
|
+
the complete neutron sublibrary of ENDF/B-VIII.1 — 558 files, 1.3 GB —
|
|
132
|
+
in about 2 seconds and writes it back to ENDF-6 text in about
|
|
133
|
+
8 seconds (single core of an Intel Core i7-1165G7 laptop, warm file
|
|
134
|
+
cache; measured on the development version of November 2026). Every
|
|
135
|
+
value is fully interpreted during parsing, and written output is
|
|
136
|
+
formatted field by field.
|
|
137
|
+
|
|
138
|
+
The [Performance](https://endf-parserpy.readthedocs.io/en/latest/performance.html)
|
|
139
|
+
page of the documentation gives the results for both parsers and all
|
|
140
|
+
array types, by sublibrary and file size, with the peak memory and the
|
|
141
|
+
command that reproduces them; they are refreshed for each release.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## Citation
|
|
145
|
+
|
|
146
|
+
If you want to cite this package,
|
|
147
|
+
please use the following reference:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
G. Schnabel, D. L. Aldama, R. Capote, "How to explain ENDF-6 to computers: A formal ENDF format description language", arXiv:2312.08249, DOI:10.48550/arXiv.2312.08249
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
This code is distributed under the MIT license augmented
|
|
157
|
+
by an IAEA clause, see the accompanying license file for more information.
|
|
158
|
+
|
|
159
|
+
Copyright (c) 2022-2026 International Atomic Energy Agency (IAEA)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## Acknowledgments
|
|
163
|
+
|
|
164
|
+
Daniel Lopez Aldama made significant contributions
|
|
165
|
+
to the development of this package. He debugged the
|
|
166
|
+
ENDF-6 recipe files and helped in numerous discussions
|
|
167
|
+
to convey a good understanding of the technical details of
|
|
168
|
+
the ENDF-6 format that enabled the creation of this package.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## Development and AI assistance
|
|
172
|
+
|
|
173
|
+
endf-parserpy, including the formal recipe language, the parser
|
|
174
|
+
architecture and the compiler that translates recipes into C++ code,
|
|
175
|
+
was designed and developed without AI assistance from its beginning
|
|
176
|
+
in 2022 up to and including version 0.16 (May 2026). Starting with
|
|
177
|
+
version 0.17, AI coding assistance (Claude Fable 5 and Claude Opus 5.5
|
|
178
|
+
by Anthropic) has been used extensively, in particular, but not
|
|
179
|
+
exclusively, for the multi-material interface (`TapeIndex`, `EndfFile`
|
|
180
|
+
and the multi-material support of `endf-cli`, version 0.17), the
|
|
181
|
+
support for numpy arrays (`array_type="numpy"`, version 0.18), finding
|
|
182
|
+
and fixing bugs, and the performance optimization of the recipe
|
|
183
|
+
compiler and the generated C++ backend.
|
|
184
|
+
|
|
185
|
+
All AI-assisted changes were reviewed and tested before inclusion.
|
|
186
|
+
Beyond the test suite, changes to reading and writing were checked on
|
|
187
|
+
evaluated nuclear data files, by read-write-read round trips and by
|
|
188
|
+
comparing the parse results and the written output with those of the
|
|
189
|
+
previous version. For the larger changes, this covered all files of
|
|
190
|
+
the ENDF/B-VIII.1 neutron sublibrary and of the ENDF/B-VIII.0 thermal
|
|
191
|
+
scattering, decay data and electro-atomic sublibraries. The optimized
|
|
192
|
+
number conversion of the C++ parser is tested against a reference
|
|
193
|
+
conversion, exhaustively for the number layouts it accelerates, and
|
|
194
|
+
its vectorized variants against the scalar one.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
endf-parserpy is distributed under the MIT license (see `LICENSE`).
|
|
4
|
+
This file lists third-party software whose code is included in, or was
|
|
5
|
+
adapted for, this package, together with the required notices.
|
|
6
|
+
|
|
7
|
+
## Lark
|
|
8
|
+
|
|
9
|
+
The `Tree` and `Token` classes in `endf_parserpy/recipe_parser/tree.py`
|
|
10
|
+
are adapted from the Lark parsing library
|
|
11
|
+
(https://github.com/lark-parser/lark), so that recipe parse trees behave
|
|
12
|
+
identically to those previously produced with Lark.
|
|
13
|
+
|
|
14
|
+
Lark is distributed under the MIT license:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Copyright (c) 2017 Erez Shinan
|
|
18
|
+
|
|
19
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
20
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
21
|
+
the Software without restriction, including without limitation the rights to
|
|
22
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
23
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
24
|
+
subject to the following conditions:
|
|
25
|
+
|
|
26
|
+
The above copyright notice and this permission notice shall be included in all
|
|
27
|
+
copies or substantial portions of the Software.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
31
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
32
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
33
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
34
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## fast_float
|
|
38
|
+
|
|
39
|
+
The table of powers of five used by the exact float-field conversion in
|
|
40
|
+
`endf_parserpy/compiler/cpp_templates/module_header_reading.hpp` (and in
|
|
41
|
+
the generated C++ parser sources built from it) matches the table of the
|
|
42
|
+
fast_float library (https://github.com/fastfloat/fast_float), which
|
|
43
|
+
implements the algorithm of D. Lemire, "Number parsing at a gigabyte per
|
|
44
|
+
second", Software: Practice and Experience 51(8), 2021. fast_float is
|
|
45
|
+
available under the Apache-2.0 (with LLVM exception), MIT or BSL-1.0
|
|
46
|
+
license at the user's choice; it is used here under the MIT license:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
MIT License
|
|
50
|
+
|
|
51
|
+
Copyright (c) 2021 The fast_float authors
|
|
52
|
+
|
|
53
|
+
Permission is hereby granted, free of charge, to any
|
|
54
|
+
person obtaining a copy of this software and associated
|
|
55
|
+
documentation files (the "Software"), to deal in the
|
|
56
|
+
Software without restriction, including without
|
|
57
|
+
limitation the rights to use, copy, modify, merge,
|
|
58
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
59
|
+
the Software, and to permit persons to whom the Software
|
|
60
|
+
is furnished to do so, subject to the following
|
|
61
|
+
conditions:
|
|
62
|
+
|
|
63
|
+
The above copyright notice and this permission notice
|
|
64
|
+
shall be included in all copies or substantial portions
|
|
65
|
+
of the Software.
|
|
66
|
+
|
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
68
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
69
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
70
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
71
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
72
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
73
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
74
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
75
|
+
DEALINGS IN THE SOFTWARE.
|
|
76
|
+
```
|
|
@@ -24,6 +24,22 @@ from .utils.user_tools import (
|
|
|
24
24
|
from .utils.endf6_plumbing import update_directory
|
|
25
25
|
from .utils.math_utils import EndfFloat
|
|
26
26
|
from .errors import EndfParserpyError
|
|
27
|
+
from .utils.tolerated_mismatches import EndfToleratedMismatchWarning
|
|
28
|
+
from .utils.tape_structure import (
|
|
29
|
+
TapeStructure,
|
|
30
|
+
section_label,
|
|
31
|
+
to_dict_form,
|
|
32
|
+
to_list_form,
|
|
33
|
+
)
|
|
34
|
+
from .utils.sections import (
|
|
35
|
+
iter_sections,
|
|
36
|
+
section_positions,
|
|
37
|
+
locate_section,
|
|
38
|
+
get_section,
|
|
39
|
+
set_section,
|
|
40
|
+
insert_section,
|
|
41
|
+
remove_section,
|
|
42
|
+
)
|
|
27
43
|
from .tape import (
|
|
28
44
|
parse_tape,
|
|
29
45
|
parse_tape_file,
|
|
@@ -37,10 +53,11 @@ from .tape import (
|
|
|
37
53
|
EndfMaterialPath,
|
|
38
54
|
TapeError,
|
|
39
55
|
TapeStructureError,
|
|
56
|
+
AmbiguousSectionError,
|
|
40
57
|
)
|
|
41
58
|
|
|
42
59
|
|
|
43
|
-
__version__ = "0.
|
|
60
|
+
__version__ = "0.19.0"
|
|
44
61
|
|
|
45
62
|
|
|
46
63
|
__all__ = (
|
|
@@ -52,12 +69,25 @@ __all__ = (
|
|
|
52
69
|
"EndfPath",
|
|
53
70
|
"EndfVariable",
|
|
54
71
|
"EndfFloat",
|
|
72
|
+
"TapeStructure",
|
|
73
|
+
"section_label",
|
|
74
|
+
"to_dict_form",
|
|
75
|
+
"to_list_form",
|
|
76
|
+
"iter_sections",
|
|
77
|
+
"section_positions",
|
|
78
|
+
"locate_section",
|
|
79
|
+
"get_section",
|
|
80
|
+
"set_section",
|
|
81
|
+
"insert_section",
|
|
82
|
+
"remove_section",
|
|
55
83
|
"compare_objects",
|
|
56
84
|
"list_parsed_sections",
|
|
57
85
|
"list_unparsed_sections",
|
|
58
86
|
"sanitize_fieldname_types",
|
|
59
87
|
# package-wide base exception
|
|
60
88
|
"EndfParserpyError",
|
|
89
|
+
# warning about the field mismatches tolerated in a parse
|
|
90
|
+
"EndfToleratedMismatchWarning",
|
|
61
91
|
# multi-material tape interface
|
|
62
92
|
"parse_tape",
|
|
63
93
|
"parse_tape_file",
|
|
@@ -71,6 +101,7 @@ __all__ = (
|
|
|
71
101
|
"EndfMaterialPath",
|
|
72
102
|
"TapeError",
|
|
73
103
|
"TapeStructureError",
|
|
104
|
+
"AmbiguousSectionError",
|
|
74
105
|
# deprecated aliases
|
|
75
106
|
"EndfParser",
|
|
76
107
|
"BasicEndfParser",
|