You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
"I'm always frustrated when" I want to instantiate an Isotope, but have to remember that it lives at montepy.data_inputs.isotope.Isotope. It should be a top-level object.
Also annoying is that the representation uses the "Element-Z" convention, but instantiation has to use ZAID.
Example
>>>montepy.data_inputs.isotope.Isotope("1001.00c")
Isotope('H-1.00c')
>>>Isotope('H-1.00c')
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>NameError: name'Isotope'isnotdefined>>>montepy.data_inputs.isotope.Isotope("H-1.00c")
Traceback (mostrecentcalllast):
File"montepy/data_inputs/isotope.py", line34, in__init__int(parts[0])
ValueError: invalidliteralforint() withbase10: 'H-1'Duringhandlingoftheaboveexception, anotherexceptionoccurred:
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"montepy/data_inputs/isotope.py", line36, in__init__raiseValueError(f"ZAID: {ZAID} could not be parsed as a valid isotope")
ValueError: ZAID: H-1.00ccouldnotbeparsedasavalidisotope
Describe the solution you'd like
Import the Isotope class into the top-level namespace, in montepy/init.py
Allow instantiation from, e.g., montepy.Isotope("H-1.00c"), montepy.Isotope("H1.01c"), etc.
Additional context Someone changed the repr in #473, but didn't bother to update __init__ accordingly.
The text was updated successfully, but these errors were encountered:
Side note: montepy.particle.Particle is annoying. I think we need to make basically everything a top level object. At the very least module.Class for particle.Particle is really annoying.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
"I'm always frustrated when" I want to instantiate an
Isotope
, but have to remember that it lives atmontepy.data_inputs.isotope.Isotope
. It should be a top-level object.Also annoying is that the representation uses the "Element-Z" convention, but instantiation has to use ZAID.
Example
Describe the solution you'd like
Isotope
class into the top-level namespace, in montepy/init.pymontepy.Isotope("H-1.00c")
,montepy.Isotope("H1.01c")
, etc.Additional context
Someone changed the
repr
in #473, but didn't bother to update__init__
accordingly.The text was updated successfully, but these errors were encountered: