Open
Conversation
SenyuXie
reviewed
Feb 25, 2026
Collaborator
SenyuXie
left a comment
There was a problem hiding this comment.
整体上没啥问题,可以看看有没有相关的库能做pb和内部BaseModel的转换的,类似于Java中的MapStruct,这样converter会好写一点
Collaborator
There was a problem hiding this comment.
这里其实不需要这个gitignore,前端的lib/grpc/generated在trip-next-frontend里面.gitignore了,libs/tripsphere在各个python服务里面的libs/tripsphere下面.gitignore掉
SenyuXie
reviewed
Feb 25, 2026
| ) | ||
|
|
||
|
|
||
| def _parse_date(date_str: str) -> date_pb2.Date: |
Collaborator
There was a problem hiding this comment.
像这种time date 啥的,我们在Python服务/Agent内部的BaseModel的字段尽量用类型更强的Datetime或者别的标准库类型,不用str了这样类型信息更强一点
SenyuXie
reviewed
Feb 25, 2026
| @@ -0,0 +1,83 @@ | |||
| """Convert Pydantic itinerary models to protobuf messages for gRPC persistence.""" | |||
Collaborator
There was a problem hiding this comment.
google.protobuf官方有一个MessageToDict的工具方法好像,用这个不知道可不可以简化一点converters/mappers的代码?(性能开销目前不重要)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.