-
Notifications
You must be signed in to change notification settings - Fork 5
GH-53: Endpoint implementation for get all available years for a dataset #58
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ChanukaUOJ, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant new feature by providing an API endpoint that allows users to query the available years for datasets associated with a specific category. The implementation involves creating a dedicated data service responsible for orchestrating calls to the underlying OpenGIN service, enriching the retrieved data, and presenting it in a user-friendly format. The design prioritizes performance through parallel processing and includes thorough testing to cover various scenarios and edge cases. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a new endpoint to retrieve all available years for a dataset, which is a valuable addition. The implementation correctly uses asyncio to perform API calls in parallel, minimizing latency, and is well-supported by a comprehensive set of new test cases. My feedback focuses on opportunities to enhance code clarity, maintainability, and robustness. Specifically, I've suggested simplifying some asyncio patterns, improving dependency injection for services, replacing magic strings with constants, and ensuring unused imports are removed from test files. Overall, this is a solid contribution that adds important functionality.
|
/gemini review |
1 similar comment
|
/gemini review |
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.
Code Review
This pull request introduces a new endpoint to fetch available years for a set of datasets. The implementation correctly uses asyncio for parallel fetching of dataset entities, and is well-covered by unit tests.
My review includes a few suggestions for improvement:
- A critical fix to prevent an
IndexErrorwhen a dataset's parent category cannot be found. - A high-priority change to correctly handle
NotFoundErrorfrom downstream services, ensuring the API returns a 404 instead of a 500 error. - Some medium-severity suggestions to improve code clarity and documentation.
Overall, this is a good contribution. Addressing these points will make the implementation more robust and maintainable.
This PR closes: #53
IS_ATTRIBUTErelations for the given category and then takes the relation start time. then takes the year from the relation start times and send it as a list in the final response.