Skip to content

feat(hubble): add public parameter to da.push#318

Merged
alaeddine-13 merged 1 commit intomainfrom
feat-hubble-push-public
May 4, 2022
Merged

feat(hubble): add public parameter to da.push#318
alaeddine-13 merged 1 commit intomainfrom
feat-hubble-push-public

Conversation

@delgermurun
Copy link
Copy Markdown
Contributor

Goals:

  • Added public parameter to push method for indicating docarray is public or private.

@codecov
Copy link
Copy Markdown

codecov bot commented May 2, 2022

Codecov Report

Merging #318 (b09f2cd) into main (b418858) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage   84.16%   84.16%           
=======================================
  Files         134      134           
  Lines        6314     6314           
=======================================
  Hits         5314     5314           
  Misses       1000     1000           
Flag Coverage Δ
docarray 84.16% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/__init__.py 100.00% <100.00%> (ø)
docarray/array/mixins/io/pushpull.py 87.23% <100.00%> (ø)
docarray/array/mixins/post.py 12.50% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 117fd67...b09f2cd. Read the comment docs.

@delgermurun delgermurun marked this pull request as draft May 2, 2022 13:32
@delgermurun delgermurun marked this pull request as ready for review May 2, 2022 15:13

def push(self, name: str, show_progress: bool = False) -> Dict:
def push(
self, name: str, *, public: bool = True, show_progress: bool = False
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why did you add * ? are we expecting extra positional args in the future ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@delgermurun delgermurun force-pushed the feat-hubble-push-public branch from b024959 to a19aabd Compare May 3, 2022 07:38
@delgermurun delgermurun force-pushed the feat-hubble-push-public branch from a19aabd to 8ba0e50 Compare May 4, 2022 08:14
@delgermurun delgermurun force-pushed the feat-hubble-push-public branch from 8ba0e50 to b09f2cd Compare May 4, 2022 08:16
@delgermurun delgermurun requested a review from alaeddine-13 May 4, 2022 08:16
Copy link
Copy Markdown
Member

@alaeddine-13 alaeddine-13 left a comment

Choose a reason for hiding this comment

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

LGTM

@alaeddine-13 alaeddine-13 merged commit c9a9b35 into main May 4, 2022
@alaeddine-13 alaeddine-13 deleted the feat-hubble-push-public branch May 4, 2022 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants