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

Implement merge files #34

Merged
merged 8 commits into from
Aug 2, 2022
Merged

Implement merge files #34

merged 8 commits into from
Aug 2, 2022

Conversation

jrhee17
Copy link
Contributor

@jrhee17 jrhee17 commented Jul 26, 2022

CentralDogma has a feature called mergeFiles which lets users "merge" files and retrieve the result easily.

https://github.com/line/centraldogma/blob/0c397eb1f5aa99cec586adcf5417464032ce117f/client/java/src/main/java/com/linecorp/centraldogma/client/CentralDogma.java#L247-L269

It might be useful to implement this feature for the python client as well.

@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2022

Codecov Report

Merging #34 (acd9932) into main (a7be1bc) will increase coverage by 0.06%.
The diff coverage is 94.23%.

@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   93.38%   93.44%   +0.06%     
==========================================
  Files          21       23       +2     
  Lines         650      702      +52     
==========================================
+ Hits          607      656      +49     
- Misses         43       46       +3     
Impacted Files Coverage Δ
centraldogma/data/merged_entry.py 92.30% <92.30%> (ø)
centraldogma/content_service.py 90.47% <94.11%> (+0.70%) ⬆️
centraldogma/data/merge_source.py 100.00% <100.00%> (ø)
centraldogma/dogma.py 100.00% <100.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 a7be1bc...acd9932. Read the comment docs.

@jrhee17 jrhee17 requested review from ikhoon, hexoul and minwoox July 26, 2022 05:45
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Welcome Python master! 🐍
Left one minor comment.

merge_sources: List[MergeSource],
json_paths: List[str] = None,
revision: Optional[int] = None,
) -> MergedEntry[T]:
Copy link
Contributor

Choose a reason for hiding this comment

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

T is only bound to the return type which seems not to tell any useful type information.
How about replacing T with Any type?

Suggested change
) -> MergedEntry[T]:
) -> MergedEntry[Any]:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just removed the generic argument altogether 😅
Although the java api is defined with a generic type, I'm not foreseeing many changes to the merge feature (and I guess we can make a breaking change if necessary)

Copy link
Contributor

Choose a reason for hiding this comment

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

We need to evolve our API design until 1.0 is released.

Copy link
Collaborator

@hexoul hexoul left a comment

Choose a reason for hiding this comment

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

Thanks for the first PR! Please take a look 🙏

@hexoul hexoul added this to the 0.2.0 milestone Jul 27, 2022
Copy link
Collaborator

@hexoul hexoul left a comment

Choose a reason for hiding this comment

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

Mostly LGTM. Thanks a lot @jrhee17 🎊! Please check minor comments for documentation.

Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Thanks, @jrhee17 and @hexoul 🙇‍♂️

@ikhoon ikhoon merged commit 1499b64 into line:main Aug 2, 2022
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.

4 participants