Skip to content
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

Remove deprecated arguments from SN model initialisers #356

Merged
merged 6 commits into from
Aug 15, 2024

Conversation

JostMigenda
Copy link
Member

This PR is intended to remove deprecations in the SN model initialisers, including initialising from a file name and inconsistent keyword arguments.

There are still a couple of @deprecated decorators we should remove before merging this. (E.g. for many models, the eos keyword is marked as deprecated, because there is only a single possible value; so it shouldn’t be required as part of the __init__.)
I think the best way to proceed there would be to remove eos from the parameter list and manually set self.metadata["eos"] in the __init__ to the fixed value instead. I’ll do that tomorrow and mark this as a draft PR until then; but wanted to get it out now before I go to bed, in case you want to review this during your daytime, @Sheshuk. (Yay for timezones! 😉)

(Also: Yes, I’ve currently marked the branch from #353 as a base for this PR for simplicity; but can rebase it onto the release_v2.0 branch tomorrow.)

@Sheshuk Sheshuk linked an issue Aug 14, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

@Sheshuk Sheshuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good so far, and we're heading towards a cleaner and more beautiful future interface!
Looks like you've got everything, concerning with legacy_filename_initialization.

I agree with the plan to remove the deprecated parameters and putting them directly into the metadata.

Base automatically changed from JostMigenda/variousDeprecations to release_v2.0 August 14, 2024 14:51
@JostMigenda
Copy link
Member Author

Ready for review now!

@JostMigenda JostMigenda marked this pull request as ready for review August 14, 2024 15:31
@JostMigenda
Copy link
Member Author

Oh, the integration tests are failing slightly earlier now; I’ll put in a fix for that in a minute …

@JostMigenda
Copy link
Member Author

Okay, now the integration tests are back to failing in get_transformed_spectra (where we expect them to fail until the flavour transformations are updated to three flavours) and it’s actually ready to review.

Copy link
Contributor

@sybenzvi sybenzvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are mostly removal of unused packages, options, and legacy interfaces. Looks good.

@JostMigenda JostMigenda merged commit 52f1582 into release_v2.0 Aug 15, 2024
3 of 6 checks passed
@JostMigenda JostMigenda deleted the JostMigenda/deleteDeprecations branch August 15, 2024 19:12
@JostMigenda JostMigenda mentioned this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Models: Remove deprecated arguments in constructors
3 participants