Milab 4784 fix deduplication and update#39
Conversation
Summary of ChangesHello @aiturbidemil, 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 significantly enhances the dimensionality reduction block by introducing a more structured and maintainable workflow architecture through the adoption of Tengo templates. It expands the block's descriptive documentation to clearly outline its advanced capabilities, including PCA, t-SNE, UMAP, and Harmony batch correction. Additionally, the PR incorporates a broad set of dependency updates to ensure the project uses the latest stable versions of its underlying libraries. 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.
Code Review
This pull request introduces several valuable improvements, including a significant refactoring of the workflow logic into modular Tengo templates, which greatly enhances readability and maintainability. The block's documentation and descriptions have also been substantially updated, providing clearer and more comprehensive explanations. However, there is a critical issue in block/package.json where the version number has been incorrectly decremented. Additionally, there are a few opportunities to improve maintainability by replacing hardcoded values for resource allocation and cache durations with named constants or variables.
block/package.json
Outdated
There was a problem hiding this comment.
The package version has been decremented from 1.2.16 to 1.2.15. Package versions should follow Semantic Versioning and always be incremented for new changes. Please revert this to 1.2.16 and allow the automated release process to handle the version bump based on the changeset file.
| "version": "1.2.15", | |
| "version": "1.2.16", |
| saveFile("umap_dimensions.csv"). | ||
| saveFile("tsne_dimensions.csv"). | ||
| saveFile("harmony_results.csv"). | ||
| cache(24 * 60 * 60 * 1000). |
There was a problem hiding this comment.
| saveFile("umap_results.csv"). | ||
| saveFile("tsne_results.csv"). | ||
| saveFile("pca_results.csv"). | ||
| cache(24 * 60 * 60 * 1000). |
There was a problem hiding this comment.
| mem: "32GiB", | ||
| cpu: 16 |
There was a problem hiding this comment.
The memory (32GiB) and CPU (16) resources are hardcoded here and also in the batchCorrectionRender block. To improve maintainability and avoid duplication, consider defining these as constants at the top of the file and reusing them in both places.
For example:
// At the top of the file
defaultExecMem := "32GiB"
defaultExecCpu := 16
// ... then use them in the render blocks
mem: defaultExecMem,
cpu: defaultExecCpu
No description provided.