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

FEA update_env implementation #136

Merged
merged 3 commits into from
Sep 19, 2022

Conversation

merveenoyan
Copy link
Collaborator

Closes #133
This one replaces existing requirements with the new one user gives. Let me know if you'd rather have something that adds new dependencies on top of old requirements instead (or simply changes versions).

@merveenoyan
Copy link
Collaborator Author

merveenoyan commented Sep 14, 2022

mypy is complaining even though I'm just passing positional arguments 🥲 https://github.com/python/mypy/issues/13627 it's said it should be only shooting that error for python versions older than 3.10 but it shoots it now for 3.10.

Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for taking this. I made two minor comments, but feel free to ignore them.

Regarding the mypy error, it sounds like they're working on a fix. Let's maybe just wait for the fix? I don't believe it's worth it to take extra measures here for an error that's (hopefully) going away very quickly.

config["sklearn"]["environment"] = requirements

with open(Path(path) / "config.json", mode="w") as f:
json.dump(config, f, sort_keys=True, indent=4)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just throwing an idea out there: Do we want to factor this line out into a small utility function, since it's used twice now (other being _create_config)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@@ -402,7 +402,14 @@ def update_env(
-------
None
"""
pass

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Also, can we remove the "Returns" section from the docstring, since nothing is returned?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just did!

Copy link
Collaborator

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe give this 1 week to see if the mypy issue is solved by then?

@adrinjalali
Copy link
Member

Is there an open issue on mypy side? If not, we can just add type: ignore there.

@merveenoyan
Copy link
Collaborator Author

merveenoyan commented Sep 14, 2022

@adrinjalali there is: https://github.com/python/mypy/issues / 13627 but I don't want to reference their issue here :D

@BenjaminBossan
Copy link
Collaborator

but I don't want to reference their issue here :D

Note that pasting the link did create a reference in that issue ^^ I think they changed something on GH to enable this "feature".

@merveenoyan
Copy link
Collaborator Author

I wonder why two tests are cancelled without any tests failing, I'll trigger CI again :D

@BenjaminBossan BenjaminBossan merged commit cfea7cb into skops-dev:main Sep 19, 2022
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.

implement existing empty hub_utils.update_env
3 participants