Skip to content

MNT make init atomic#60

Merged
BenjaminBossan merged 6 commits intoskops-dev:mainfrom
adrinjalali:init-atomic
Aug 16, 2022
Merged

MNT make init atomic#60
BenjaminBossan merged 6 commits intoskops-dev:mainfrom
adrinjalali:init-atomic

Conversation

@adrinjalali
Copy link
Copy Markdown
Member

Fixes #42

Need to merge #45 first so that this can properly be tested.

@merveenoyan
Copy link
Copy Markdown
Collaborator

Super clean 🧼

@adrinjalali adrinjalali marked this pull request as ready for review August 12, 2022 12:52
@BenjaminBossan
Copy link
Copy Markdown
Collaborator

I see why the added test does not cover the Exception part: It fails outside of the try, namely here:

https://github.com/adrinjalali/skops/blob/593f605e3d364a77867b799f46b816e488b4e45d/skops/hub_utils/_hf_hub.py#L277-L279

So for the test to actually cover the line, the error would have to occur inside of _create_config. Perhaps the most robust way to achieve that would be to patch the function and make it raise?

@adrinjalali
Copy link
Copy Markdown
Member Author

It's all green now @BenjaminBossan

@BenjaminBossan
Copy link
Copy Markdown
Collaborator

Could you please resolve the merge conflict?

@adrinjalali
Copy link
Copy Markdown
Member Author

Done, and CI is green!

Copy link
Copy Markdown
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.

Thanks, looks good

@BenjaminBossan BenjaminBossan merged commit 5148eec into skops-dev:main Aug 16, 2022
@adrinjalali adrinjalali deleted the init-atomic branch August 16, 2022 13:05
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.

Make init function atomic

3 participants