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

Fixing spelling of Boltzmann constant typo in MDAnalysis.units is an API break #4229

Closed
hmacdope opened this issue Aug 9, 2023 · 7 comments · Fixed by #4230
Closed

Fixing spelling of Boltzmann constant typo in MDAnalysis.units is an API break #4229

hmacdope opened this issue Aug 9, 2023 · 7 comments · Fixed by #4230
Labels
Milestone

Comments

@hmacdope
Copy link
Member

hmacdope commented Aug 9, 2023

Fixing #4213 with #4214 by @xhgchen adjusting the spelling of Boltzmann constant typo in MDAnalysis.units is technically an API break, in that if anyone relied on pulling the constant by name we broke that for them.

Pinging @MDAnalysis/coredevs do we think this is an issue or not.

@xhgchen
Copy link
Member

xhgchen commented Aug 9, 2023

I used git grep to find all instances of the typo in the MDAnalysis repo itself and made the changes accordingly, so I do not think I broke anything in the core library. The question now is whether any MDAKits or other software used it. I think an easy fix would be to allow both the correct and incorrect spellings as keys (and perhaps deprecate the incorrect spelling).

@hmacdope
Copy link
Member Author

hmacdope commented Aug 9, 2023

Thats sounds like a perfectly reasonable and easy fix, along with a deprecation warning for the old spelling.

@xhgchen
Copy link
Member

xhgchen commented Aug 9, 2023

I would be happy to look into making this change tomorrow, unless someone else is keen on it or has a better approach :)

@IAlibay IAlibay added this to the 2.6.0 milestone Aug 9, 2023
@IAlibay
Copy link
Member

IAlibay commented Aug 9, 2023

I'm going to let the other @MDAnalysis/coredevs weigh in here - please work out if you this needs changing & make sure it is actioned by end of week. (it's blocking the next release)

@orbeckst
Copy link
Member

orbeckst commented Aug 9, 2023

I agree with @xhgchen — make the wrong spelling available again for the next two 2.x releases.

Add a deprecation note to CHANGELOG and docs.

I’d skip having code issue a warning as it sounds like a very low impact deprecation… or am I wrong there?

@orbeckst orbeckst added the API label Aug 9, 2023
@IAlibay
Copy link
Member

IAlibay commented Aug 9, 2023

I’d skip having code issue a warning as it sounds like a very low impact deprecation… or am I wrong there?

Subclassing the dictionary and wrapping __getitem__ with a warning is a suitably low cost thing, I'd say let's just have the warning if we can.

@tylerjereddy
Copy link
Member

If you consider it a "bug fix" the API break should formally be allowed I think, since bug fixes > API issues, but making the incorrect spelling available for a bit longer seems reasonable if folks want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants