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

Backwards compatibility and deprecation policy #1120

Closed
seisman opened this issue Mar 25, 2021 · 15 comments
Closed

Backwards compatibility and deprecation policy #1120

seisman opened this issue Mar 25, 2021 · 15 comments
Labels
maintenance Boring but important stuff for the core devs
Milestone

Comments

@seisman
Copy link
Member

seisman commented Mar 25, 2021

As stated in many places, PyGMT is still not a finished project:

All of the API (functions/classes/interfaces) is subject to change until we reach v1.0.0 as per the semantic versioning specification. There may be non-backward compatible changes as we experiment with new design ideas and implement new features.

So we're allowed to break backward-compatibility in any major and minor versions. However, from users' point of view, they would be disappointed when they find that their scripts break after upgrading PyGMT. There are always be some trade-offs between users' and developers' experiences.

We now already have some open issues that might break backward-compatibility, e.g.,

It's time for us to discuss about how we will handle backward compatibility and how to deprecate/remove existing features.

Resources:

@seisman seisman added the question Further information is requested label Mar 25, 2021
@michaelgrund
Copy link
Member

michaelgrund commented Mar 26, 2021

I'm definitely a fan of backwards compatibility, however, if some points are changed to improve the overall product one has to think about how this should be handled. For example, when I started using PyGMT in 2019 several aliases were not implemented but now they are. Of course we support both, original GMT shortcuts and aliases and thus my notebooks will still work, however, some other things like how data is passed into a module slightly changed and there might appear issues.

Therefore, as @seisman mentioned, supporting backwards compatibility is (in my opinion) necessary, especially to avoid disappointed early stage users which potentially have not the time to adjust their scripts every few months. I think a good balance between useful improvements and some kind of backwards compatibility would be a good choice (no idea how to handle that 😄).

@seisman
Copy link
Member Author

seisman commented Mar 26, 2021

IMHO, we should try our best to:

  1. Keep backward-compatibility
  2. Raise deprecation warnings if users are using the old syntax
  3. Fully deprecate old syntax or remove unsupported features after X minor versions or X months.

@seisman
Copy link
Member Author

seisman commented Apr 3, 2021

IMHO, we should try our best to:

  1. Keep backward-compatibility
  2. Raise deprecation warnings if users are using the old syntax
  3. Fully deprecate old syntax or remove unsupported features after X minor versions or X months.

Ping @GenericMappingTools/pygmt-contributors for thoughts.

@maxrjones
Copy link
Member

IMHO, we should try our best to:

  1. Keep backward-compatibility
  2. Raise deprecation warnings if users are using the old syntax
  3. Fully deprecate old syntax or remove unsupported features after X minor versions or X months.

Ping @GenericMappingTools/pygmt-contributors for thoughts.

I agree. I think we talked about quarterly releases at the last community meeting, so I think 4 minor versions or 12 months would be a good guideline for full deprecation.

@weiji14
Copy link
Member

weiji14 commented Apr 3, 2021

IMHO, we should try our best to:

  1. Keep backward-compatibility
  2. Raise deprecation warnings if users are using the old syntax
  3. Fully deprecate old syntax or remove unsupported features after X minor versions or X months.

Ping @GenericMappingTools/pygmt-contributors for thoughts.

I agree. I think we talked about quarterly releases at the last community meeting, so I think 4 minor versions or 12 months would be a good guideline for full deprecation.

Since we're at v0.x.y, I think 1 or 2 minor versions should be enough (3-6 months). NumPy has some good notes at NEP23 https://numpy.org/neps/nep-0023-backwards-compatibility.html on how to handle deprecation, but I think we can apply a simpler/shorter deprecation cycle for the alias name changes. More complex changes could span 3-4 minor versions as Meghan noted.

@seisman
Copy link
Member Author

seisman commented Apr 6, 2021

I prefer at least 2 minor versions, just in case that people install v0.4.0 and we release v0.5.0 next day 😄

@willschlitzer
Copy link
Contributor

willschlitzer commented Apr 9, 2021

I think a way we can negate some of the problems with breaking backwards compatibility is to make it prominent in our release notes what breaking changes are included, and maybe include a page in the documentation that lists what "broke" in between different releases, as well as clear instructions on how to install old versions if necessary.

I'm sure there will still be people unhappy with breaking changes, but I think this at least gives someone a tutorial on how to make their scripts works when they're hurriedly trying to finish their thesis and they updated PyGMT without realizing what would break.

@seisman
Copy link
Member Author

seisman commented Apr 10, 2021

to make it prominent in our release notes what breaking changes are included,

Yes, breaking changes will be included in the release notes. When we deprecate a feature but keep backwards compatibility, the changes will be in the "Deprecation" section. When we fully remove a feature, the changes will be highlighted in the "Breaking changes" section.

and maybe include a page in the documentation that lists what "broke" in between different releases, as well as clear instructions on how to install old versions if necessary.

Since breaking changes are documented in the release notes, I feel it's unnecessary to have another page listing "breaking changes".

I'm sure there will still be people unhappy with breaking changes, but I think this at least gives someone a tutorial on how to make their scripts works when they're hurriedly trying to finish their thesis and they updated PyGMT without realizing what would break.

Currently, most of the breaking changes are renaming function parameters, so the warning message should be enough to help the script migration. For more complicated breaking changes, a detailed tutorial sounds like a good idea.

See #1160 for a draft deprecation policy and comments are welcomed.

@weiji14
Copy link
Member

weiji14 commented Apr 13, 2021

So can we get a consensus on the number of minor versions to raise the FutureWarning for? Let's vote @GenericMappingTools/pygmt-team (specifically for long the FutureWarning should show up for alias name changes):

🎉 4 minor versions as per #1120 (comment)
👀 2 minor versions as per #1120 (comment)
🚀 0 minor versions as per #1120 (comment)

Rules: You may vote for more than one option. Voting time ends on Thursday 15 Apr 2021 (midnight UTC time).

@maxrjones
Copy link
Member

So can we get a consensus on the number of minor versions to raise the FutureWarning for? Let's vote (specifically for the alias name change case):

🎉 3-4 minor versions as per #1120 (comment)
👀 1-2 minor versions as per #1120 (comment)
🚀 0 minor versions as per #1120 (comment)

Rules: You may vote for more than one option. Voting time ends on Thursday 15 Apr 2021 (midnight UTC time).

I prefer 2 minor releases for alias updates, but not 1. Sorry to break your poll. My reasoning here is that it usually takes longer than 3 months to get a paper back, so I could imagine someone easily missing a minor release if they have moved on to teaching or some other tasks and then scrambling to update their broken aliases.

@weiji14
Copy link
Member

weiji14 commented Apr 13, 2021

Ok, will make it more clear-cut then. Updated to be 0, 2 and 4 only.

@seisman
Copy link
Member Author

seisman commented Apr 13, 2021

Are we voting for alias name changes or any incompatible changes? 2 minor releases is enough for alias changes, but for other changes (I/O changes), 4 releases is better.

@core-man
Copy link
Member

Are we voting for alias name changes or any incompatible changes? 2 minor releases is enough for alias changes, but for other changes (I/O changes), 4 releases is better.

I agree. The alias name is easy to be revised in our scripts, but the I/O changes may not.

@seisman
Copy link
Member Author

seisman commented Apr 17, 2021

I think we all agree that we should raise the FutureWarning for at least two minor versions. Please give #1160 a final review, so that we can merge the @deprecate_parameter decorator and change some parameter names in #1118, #1042.

@seisman seisman added maintenance Boring but important stuff for the core devs and removed question Further information is requested labels Apr 17, 2021
@seisman seisman added this to the 0.4.0 milestone Apr 17, 2021
@seisman
Copy link
Member Author

seisman commented Apr 19, 2021

Closed by #1160.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

No branches or pull requests

6 participants