idaholab / MontePy

MontePy is the most user friendly Python library (API) to read, edit, and write MCNP input files.
https://www.montepy.org/
MIT License
32 stars 7 forks source link

Deprecation in support of material redesign #506

Closed MicahGale closed 2 months ago

MicahGale commented 3 months ago

Assuming #504 is true and a major release is needed, deprecation warnings are needed. I think Material.material_components should raise a DeprecationWarning pointing to #504 with release 0.4.1.

Also I think with the next major release a lot of the DeprecationWarnings from Montepy 0.2.0 can be removed now. Just as: montepy.data_cards. I think at least the ones that are raised as an Error because changing a DeprecationWarning for an AttributeError won't be too bad.

I'm not sure if these new Deprecations should occur before or after a migration plan is in place. The migration plan would need to have the new interface pretty well pinned down, so I'm hesitant to wait. Maybe we could at least make a landing page in the documentation that we can explain the issues, and possible migration, alpha testing etc.

MicahGale commented 2 months ago

This should also raise an Exception when this sort of bug in #504 actually occurs.

MicahGale commented 2 months ago

Given the update in #504 that duplicate nuclides can actually still appear, the Exception isn't needed.