Skip to content

Conversation

@sven-oly
Copy link
Collaborator

@sven-oly sven-oly commented Aug 8, 2025

This adds a command line option to verifier.py to set the order of platform columns in the test output.

--platform_order Options include:

  • None - alphabetic by name of executor
  • "alphabetic" - alphabetic by name of executor
  • "component_count" - put platforms with most test cases on the left
  • list of platforms in the order to show then (left to right), e.g., ICU4X NodeJS ICU4J Dart_Web ICU4C

These are set to default values in the main generate scripts.

Note that if a platform with test cases is not mentioned in this list, it will be appended at the right of the dashboard.

Copy link

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

Summary of Changes

Hello @sven-oly, 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!

I've implemented a new feature that allows users to control the display order of platform columns in the test output summary dashboard. This provides flexibility beyond the default alphabetic sorting, enabling ordering by component count or a custom list of platforms. This change enhances the readability and customizability of the test reports, making it easier to analyze results based on specific platform priorities.

Highlights

  • New Command-Line Option: I've introduced a new --platform_order command-line option to verifier.py, allowing users to specify how platform columns are arranged in the test output summary dashboard.
  • Flexible Ordering Options: This new option supports flexible ordering methods, including 'alphabetic' (default), 'component_count' (sorting by the number of test cases), or a custom, user-defined list of platform names.
  • Default Configuration in Generation Scripts: The generation scripts (genData100.sh and generateDataAndRun.sh) have been updated to utilize this new option, setting a predefined default order for platforms.
  • Dynamic HTML Rendering: The summary_template.html has been enhanced with JavaScript to dynamically sort and display platform columns according to the specified order, ensuring that all platforms are shown, even if not explicitly listed in a custom order.
  • Backend Integration: Modifications were made in testreport.py and verifier.py to properly handle and pass the new platform_order argument throughout the test reporting system.
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 or fill out our survey to provide feedback.

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.

@sven-oly
Copy link
Collaborator Author

sven-oly commented Aug 8, 2025

image

Copy link

@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 introduces a new feature to control the order of platform columns in the test summary output. The changes are well-implemented across shell scripts, Python backend, and the HTML/JS frontend. My review focuses on improving code robustness, readability, and maintainability. I've suggested a few minor fixes, including correcting a typo in a help message, making the JavaScript code more robust for future platform names, and refactoring some Python code to improve clarity and reduce duplication.

new Set(Array.from(exec_set));
for (let platform of platform_order) {
// remove the underscores, too.
const pl2 = platform.replace('_', ' ');

Choose a reason for hiding this comment

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

medium

The replace('_', ' ') call will only replace the first underscore in a platform name. If a platform name could ever contain multiple underscores (e.g., My_Awesome_Platform), this would lead to incorrect behavior. Using replaceAll() would be more robust for future changes.

                      const pl2 = platform.replaceAll('_', ' ');

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch.

Copy link
Collaborator

@echeran echeran left a comment

Choose a reason for hiding this comment

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

LGTM

@sven-oly sven-oly merged commit a6ee92f into unicode-org:main Aug 8, 2025
10 checks passed
@sven-oly sven-oly deleted the set_platform_order branch August 8, 2025 21:11
@echeran echeran linked an issue Aug 11, 2025 that may be closed by this pull request
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.

Specify order of library/platforms in dashboard

3 participants