-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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.
centraldogma/dogma.py
Outdated
merge_sources: List[MergeSource], | ||
json_paths: List[str] = None, | ||
revision: Optional[int] = None, | ||
) -> MergedEntry[T]: |
There was a problem hiding this comment.
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?
) -> MergedEntry[T]: | |
) -> MergedEntry[Any]: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this 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 🙏
There was a problem hiding this 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.
Co-authored-by: Seunggon Kim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CentralDogma
has a feature calledmergeFiles
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.