Skip to content

Conversation

@XiaoBoAI
Copy link
Collaborator

OpenJudge Version

[The version of OpenJudge you are working on, e.g. import openjudge; print(openjudge.__version__)]

Description

[Please describe the background, purpose, changes made, and how to test this PR]

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with pre-commit run --all-files command
  • All tests are passing
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

Pin the exact streamlit version to ensure consistent UI appearance
across different server environments.
Pin additional UI-related dependencies to ensure consistent
appearance across different server environments:
- altair==5.5.0 (chart rendering)
- nest-asyncio==1.6.0 (async support)
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @XiaoBoAI, 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 focuses on enhancing the stability and predictability of the UI environment by explicitly pinning key Python dependencies to specific versions. This change aims to prevent potential compatibility issues that might arise from automatic updates of these libraries, ensuring a more consistent development and deployment experience for the Streamlit-based user interface.

Highlights

  • Dependency Version Pinning: The streamlit dependency has been explicitly pinned to version 1.46.1 to ensure consistent behavior and prevent unexpected changes from newer versions.
  • New Dependency Added: The altair library, a Streamlit chart library, has been added and pinned to version 5.5.0 to guarantee consistent chart rendering across environments.
  • Asyncio Dependency Pinning: The nest-asyncio dependency has also been pinned to version 1.6.0 for stability in asynchronous operations within the Streamlit application.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 pins the versions for streamlit and nest-asyncio, and adds a pinned version of altair. This is an excellent change that improves the reproducibility of the environment by locking dependencies. The changes are a clear improvement. I've added one suggestion to consider using a tool like pip-tools to further enhance dependency management by automatically pinning all transitive dependencies, which would be beneficial for long-term maintainability.

Comment on lines +5 to +11
streamlit==1.46.1

# Streamlit chart library (pin to ensure consistent chart rendering)
altair==5.5.0

# For async support in Streamlit
nest-asyncio>=1.6.0
nest-asyncio==1.6.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Pinning direct dependencies with == is a great step towards creating reproducible environments. To further improve this and ensure long-term maintainability, consider using a tool like pip-tools.

With pip-tools, you would maintain a requirements.in file with your high-level dependencies. Running pip-compile would then automatically generate a fully-pinned requirements.txt file, including all transitive dependencies (like altair).

This approach automates pinning, simplifies updates, and makes the entire dependency tree explicit and locked. It's a valuable practice for ensuring robust and maintainable dependency management as the project grows.

@XieLipeng0830 XieLipeng0830 merged commit b2e11ec into main Jan 27, 2026
2 checks passed
@XiaoBoAI XiaoBoAI deleted the fix/pin-streamlit-version branch January 28, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants