feat(hubble): add public parameter to da.push#318
Conversation
Codecov Report
@@ Coverage Diff @@
## main #318 +/- ##
=======================================
Coverage 84.16% 84.16%
=======================================
Files 134 134
Lines 6314 6314
=======================================
Hits 5314 5314
Misses 1000 1000
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
docarray/array/mixins/io/pushpull.py
Outdated
|
|
||
| def push(self, name: str, show_progress: bool = False) -> Dict: | ||
| def push( | ||
| self, name: str, *, public: bool = True, show_progress: bool = False |
There was a problem hiding this comment.
why did you add * ? are we expecting extra positional args in the future ?
There was a problem hiding this comment.
Yeah, we might need to add new parameters in the future.
I added public before the show_progress param because it is more important than show_progress.
I think it is more intuitive.
Since show_progress is a boolean and was a 2nd positional param, I changed those to keyword params.
Otherwise, the old code will work incorrectly, if show_progress was true.
I think it's better to fail than to work incorrectly.
Also, it will be easier to add new parameters in the future. We will just add keyword parameters without worrying about the order.
b024959 to
a19aabd
Compare
a19aabd to
8ba0e50
Compare
8ba0e50 to
b09f2cd
Compare
Goals:
publicparameter topushmethod for indicating docarray is public or private.