-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
MAINT: deprecate some methods before v1 #412
Conversation
- the problem was happening when the angle was negative. - i.e. the operator // didn't work - I added some unit tests to cover the problematic cases Everything running properly now
To discuss before review:
I know that @GabrielBarberini would be (or already is) specially interested in using such methods. |
What about the |
It's not documented tho. |
I have no clue if it works. It might run but I also would have no clue if what it does is even correct I've never seen it being used, and as far as I know, it was never finished |
Yes I agree removing it then. I just read it and there's no sense for that method to be defined inside the Rocket.py file. I'm still waiting for a review here, so I can fix all the review comments at the same time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand why these functions are @static_methods
and I think this is fine as is, but just for the sake of questioning
Why are these function @static_methods
and not functions in utilities.py
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question!
1- They are used inside other RocketPy classes, so there's no possibility
2- one could suggest to store these methods in tools.py tho. However, I think they are quite related to the Environment class, so it makes more sense if they stay here at this file, together with similar methods. As another example, you can see the reshape_thrust_curve method of the motor class. But this is just a matter of preference tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems good here. I couldn't find anything else that needed deprecation in the code. Just needs to remove add_fin
and its ready to go
Pull request type
Please check the type of change your PR introduces:
Pull request checklist
Please check if your PR fulfills the following requirements, depending on the type of PR:
Code base additions (for bug fixes / features):
black rocketpy
) has passed locally and any fixes were madepytest --runslow
) have passed locallyWhat is the current behavior?
There are some functions in rocketpy that either does not work correctly or are already deprecated.
What is the new behavior?
I tried to search in the code for any function or method that we may need to deprecate in the short/medium term future.
I also converted some Environment methods to static methods, avoiding future breaking changes.
Does this introduce a breaking change?
Other information
it is not an easy task to imagine if a function would be deprecated in the future or not, but I tried my best here.
If reviewers find time, I also recommend reading all the classes to ensure there's nothing that we could easily modify right now.
** The idea is to prevent for future breaking changes.**