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

Fix incorrect docstrings for atomic rate base classes #432

Merged
merged 2 commits into from
May 10, 2024

Conversation

vsnever
Copy link
Member

@vsnever vsnever commented Apr 27, 2024

This updates the docstrings for the atomic process rate base classes and fixes #431.

@vsnever vsnever linked an issue Apr 28, 2024 that may be closed by this pull request
@vsnever vsnever requested a review from jacklovell May 2, 2024 09:01
Copy link
Member

@Mateasek Mateasek left a comment

Choose a reason for hiding this comment

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

Seems good to me

Copy link
Member

@jacklovell jacklovell left a comment

Choose a reason for hiding this comment

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

Changing the names of the arguments is technically a breaking change for anybody passing arguments as keywords to these functions. I get that aesthetically it's nicer to have a uniform convention of density and temperature as names, but have you checked there's nowhere else in the code that calls these by keyword (may not be covered by existing unit tests)?

I'd be inclined to leave the argument names as they are and only update the docstrings.

@vsnever
Copy link
Member Author

vsnever commented May 9, 2024

Thanks for the reviews, @Mateasek, @jacklovell.

Changing the names of the arguments is technically a breaking change for anybody passing arguments as keywords to these functions. I get that aesthetically it's nicer to have a uniform convention of density and temperature as names, but have you checked there's nowhere else in the code that calls these by keyword (may not be covered by existing unit tests)?
I'd be inclined to leave the argument names as they are and only update the docstrings.

Yes, indeed, in Python positional arguments can also be passed by keyword, and changing the name of a positional argument can cause a TypeError. I did not think about that. I returned the arguments to their old names.

@jacklovell jacklovell merged commit 3f642b3 into cherab:development May 10, 2024
8 checks passed
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.

Obsolete docstrings in the interface classes for atomic rates
3 participants