separate file types#86
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @az-smartling, 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 refactors the handling of file types for Machine Translation (MT) and Batch file uploads by standardizing the import aliases for the Smartling API SDK. The changes involve updating the api-sdk-go module to a newer version and adjusting all relevant code to use a consistent api alias for batch and MT-related API calls. This improves code consistency and prepares the codebase for potential future API changes or consolidations.
Highlights
- Standardized API Import Aliases: The import alias for the Smartling API SDK's batch and MT packages has been standardized to
apiacross multiple files, simplifying API calls and improving code readability. - API SDK Version Update: The project's dependency on
github.com/Smartling/api-sdk-gohas been updated to a newer version, ensuring compatibility with the latest API features and potentially incorporating bug fixes or performance improvements. - API Type and Function References Updated: References to API types and functions, such as
CreateJobResponse,CreateJobPayload,CreateBatchPayload,TypeByExt, andUploadFilePayload, have been updated to reflect the newapialias, streamlining the use of the SDK's functionalities.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request updates the github.com/Smartling/api-sdk-go dependency and refactors the code to use the new API structure for file types. The changes correctly move from using sdktype.TypeByExt to api.TypeByExt from the respective batches and mt packages.
My main feedback is regarding the use of the generic alias api for the github.com/Smartling/api-sdk-go/api/batches package in cmd/files/cmd_files.go and services/files/run_push.go. Using a more descriptive alias like batchesapi would improve code clarity and maintainability. I've added specific suggestions to address this.
Different file types for MT and Batch file uploads