Commit graph

43 commits

Author SHA1 Message Date
GuySten
a11021cd07
Consistent XML parsing using functions from _xml module (#3517)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2025-08-08 17:47:55 +00:00
GuySten
4500f07b44
Remove reorder_attributes from openmc._xml (#3519) 2025-08-08 16:59:22 +07:00
Jonathan Shimwell
5d2b352025
f strings instead of .format for string editing (#2987) 2024-04-29 16:45:37 -05:00
Paul Romano
85c963e223
Move 'import lxml' to third-party block of imports (#2803) 2023-12-13 14:11:32 +00:00
Paul Romano
94f02ae10b
Bump version to 0.14.0-dev (#2740) 2023-10-31 16:55:19 -05:00
Patrick Myers
1cb22075ef
Changed xml to lxml (#2489) 2023-05-09 10:41:04 -05:00
Paul Romano
b86e03d849
Fix typo (thanks @gridley)
Co-authored-by: Gavin Ridley <gavin.keith.ridley@gmail.com>
2023-04-21 16:16:43 -05:00
Paul Romano
9ec43809db Change DataLibrary to behave like list and add remove_by_material method 2023-04-11 13:33:11 -05:00
Paul Romano
a074e0a5cf Use openmc.config['cross_sections'] instead of OPENMC_CROSS_SECTIONS 2022-09-07 16:46:10 -05:00
Paul Romano
0d83672544 Resolve a few TODOs related to Python 3.6 2021-07-27 22:50:28 -05:00
Paul Romano
16d7ec0641 Sort XML attributes to preserve pre-Python 3.8 XML writing behavior 2020-06-17 22:08:09 -05:00
Paul Romano
5547ecf88f Add versionadded directive for new arguments/functions in 0.12 2020-04-10 21:52:43 -05:00
Ethan Peterson
2b1380519d Adding data_type kwarg to DataLibrary.get_by_material
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>

Update tests/unit_tests/test_data_misc.py

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2020-01-03 10:16:50 -05:00
PullRequestOpen
6d0aa86cef Cosmetic fixes from PullRequest [2019-12-05] 2019-12-05 22:22:43 -06:00
Andrew Johnson
52ff408651
Better exporting/importing of depletion_chain in DataLibrary
Use str(path) in the path attribute when registering.
This preserves the full path, not just the basename.

Give special depletion_chain tag when exporting a library
of type depletion_chain, rather than using previous library tag
2019-06-13 19:33:17 -04:00
Andrew Johnson
ac4056e96d
Support depletion_chain in DataLibrary to/from xml and register
DataLibrary.from_xml looks for depletion_chain node in the
cross sections xml file. If found the path to this file is added
to the list of libraries. An empty list of materials is used
for consistency with other libraries. Type and path attributes
are consistent.

DataLibrary.export_to_xml does not write the materials
attribute if the value stored in that library evaluates to False,
e.g. for the empty list stored in the depletion chain.

DataLibrary.register_file has a conditional wherein a passed xml
file is treated as the depletion_chain and hdf5 files are
treated as material/isotopic cross section files.
2019-06-11 12:23:38 -04:00
Andrew Johnson
3c223248a8
Support Path objects for DataLibrary.register_filename
HDF5 File object supports reading from file-like objects,
which includes pathlib.Path.
Retain the filename of the path in the libraries list
2019-06-11 11:51:34 -04:00
Paul Romano
dd9463c288 Make sure filetype gets set correctly for data libraries 2018-11-06 09:01:37 -06:00
Paul Romano
05e66155a2 Support pathlib in openmc.data 2018-11-06 09:01:37 -06:00
Paul Romano
0bd3448193 Support registering a multipole library to cross_sections.xml 2018-11-06 09:01:37 -06:00
Paul Romano
fbf7713a33 Split up Geometry.from_xml, rename clean_xml -> _xml 2018-08-21 07:47:29 -05:00
amandalund
85205b338c Address #1023 comments 2018-07-18 07:55:00 -05:00
amandalund
c912cdce70 Merge branch 'develop' into photon-new 2018-06-28 16:19:54 -05:00
Paul Romano
c80379a488 Docfix for openmc.data.Library.get_by_material 2018-04-13 15:04:04 -05:00
Paul Romano
460452d4f7 Merge branch 'develop' into photon-alund 2018-03-11 13:10:00 -05:00
Paul Romano
c428cee667 Remove __future__ and six imports 2018-02-05 23:14:30 -05:00
Paul Romano
cb0ebe62fb Improvements in scripts, remove append argument of DataLibrary.export_to_xml 2017-07-19 16:24:38 -05:00
samuelshaner
836a983609 fixed typo in library.py 2017-07-05 09:05:23 -04:00
samuelshaner
5da591d36a created script for adding photo data to cross_sections.xml and turned on photon transport 2017-07-03 17:01:46 -04:00
Paul Romano
2622489b3b Read photon cross sections at XML-read time, support particle type in source 2017-06-29 10:31:49 -05:00
Adam Nelson
b4c556db82 incorporated MT=5, simplified yield usage in the plotter 2016-11-18 19:55:24 -05:00
Adam Nelson
625903e968 One more minor typo 2016-11-14 20:48:13 -05:00
Adam Nelson
d4f4166ba7 resolved most of the comments from @samuelshaner 2016-11-11 20:37:03 -05:00
Adam Nelson
93597752f2 Resolved @paulromano comments 2016-11-09 18:19:13 -05:00
Adam Nelson
cdae8f70f7 resolved @paulromano comments 2016-11-08 18:45:17 -05:00
Adam Nelson
fb512fb1ef Added DataLibrary from_xml function 2016-11-07 19:01:35 -05:00
Paul Romano
fbcb15f8c5 Simplify usage of DataLibrary.register_file() 2016-09-23 06:26:33 -05:00
Adam Nelson
6403216911 Renamed Equality to EqualityMixin 2016-08-19 06:58:17 -04:00
Adam Nelson
89778d422e Missed an import of mixin 2016-08-17 18:55:08 -04:00
Adam Nelson
f2fc06d960 Replaced prior __eq__ classes with the equality mixin 2016-08-17 05:15:57 -04:00
Paul Romano
e9acaba58c Respond to @smharper comments on #684 2016-07-18 11:00:37 -05:00
Paul Romano
495556a2f5 Cleanup openmc.data based on pylint 2016-07-15 08:26:30 -05:00
Paul Romano
e19291118e Refactor use of ACE tables to generate neutron/thermal scattering data 2016-07-14 15:19:52 -05:00