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

MNT Swap the names of _get_state <=> get_state & _get_instance <=> get_instance #161

Merged

Conversation

BenjaminBossan
Copy link
Collaborator

The functions that should be actually used everywhere are _get_state and _get_instance, not get_state and get_instance. This is inconvenient and confusing. Therefore, swap out the names so that the functions being used everywhere now have the "public" name and the other ones the "private" name.

This was discussed here.

The functions that should be actually used everywhere are _get_state and
_get_instance, not get_state and get_instance. This is inconvenient and
confusing. Therefore, swap out the names so that the functions being
used everywhere now have the "public" name and the other ones the
"private" name.

This was discussed here:

skops-dev#143 (comment)
@BenjaminBossan
Copy link
Collaborator Author

Ready for review @skops-dev/maintainers

@@ -54,7 +54,7 @@ def save(obj, file):
"""
with tempfile.TemporaryDirectory() as dst:
with open(Path(dst) / "schema.json", "w") as f:
state = get_state(obj, dst)
state = _get_state(obj, dst)
Copy link
Member

Choose a reason for hiding this comment

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

why aren't we using get_state (with the new def) here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that should work, I did a simple search/replace here, I made the change now.

@adrinjalali adrinjalali changed the title Swap the names of _get_state <=> get_state & _get_instance <=> get_instance MNT Swap the names of _get_state <=> get_state & _get_instance <=> get_instance Sep 30, 2022
@adrinjalali adrinjalali merged commit e4efbc8 into skops-dev:main Sep 30, 2022
@BenjaminBossan BenjaminBossan deleted the rename-get-state-and-get-instance branch September 30, 2022 15:43
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.

2 participants