-
Notifications
You must be signed in to change notification settings - Fork 328
Add pytest-durations to requirements for ROCm #810
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
Conversation
WalkthroughAdds pytest-durations as a new dependency in requirements-rocm.txt, inserted after pytest_xdist>=2.2.1. No other files or lines are modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
👋 Hi! Thank you for contributing to the TileLang project. Please remember to run We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀 |
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.
Summary of Changes
Hello @Alex4210987, 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 updates the ROCm-specific Python dependencies by including pytest-durations. This addition likely aims to enhance testing capabilities within the ROCm environment, enabling the tracking and analysis of test execution times, which can be crucial for performance optimization and identifying slow tests.
Highlights
- Dependency Update: The
pytest-durationspackage has been added to therequirements-rocm.txtfile.
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.
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 adds the pytest-durations package to the requirements-rocm.txt file. My review includes one suggestion to add a version specifier to this new dependency. This will improve consistency with other packages in the file and ensure more reproducible builds.
| numpy>=1.23.5 | ||
| pytest>=6.2.4 | ||
| pytest_xdist>=2.2.1 | ||
| pytest-durations |
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.
For consistency with other pytest packages in this file (e.g., pytest>=6.2.4), and to ensure reproducible builds, it's recommended to add a version specifier for pytest-durations. This will prevent potential issues if a future version of the package introduces breaking changes.
pytest-durations>=0.2.0
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.
| numpy>=1.23.5 | ||
| pytest>=6.2.4 | ||
| pytest_xdist>=2.2.1 | ||
| pytest-durations |
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.
💡 Verification agent
🧩 Analysis chain
Confirm plugin intent vs pytest’s built-in --durations; add a version bound aligned to supported Python.
- pytest-durations is real and actively maintained; it provides fixture/test breakdowns and xdist-aware reporting, unlike pytest’s built-in --durations. If you only need top-N slow tests, the builtin may suffice; if you want fixture-separated timing, keeping this plugin is correct. (pypi.org)
- Recommend pinning to a compatible range based on your supported Python version (plugin dropped Py3.8 in 1.5.1):
- If Python >= 3.9: prefer >=1.5.1.
- If Python 3.8 must be supported: cap to <1.5.1. (pypi.org)
Apply one of these (pick per your Python matrix):
-pytest-durations
+pytest-durations>=1.5.1 # uses fixture-aware timings; requires Python >=3.9-pytest-durations
+pytest-durations<1.5.1 # keep Py3.8 compatibilityVerification script to confirm Python versions used in CI and whether plugin flags are passed:
🏁 Script executed:
#!/bin/bash
# Show declared Python versions in workflows and configs
rg -nC2 -i 'python-version|python:|^requires-python|^python_requires|^classifiers.*Programming Language :: Python ::' .github workflows || true
rg -nC2 -i 'requires-python|python_requires|Programming Language :: Python ::' pyproject.toml setup.cfg setup.py || true
# Find pytest invocations and check if using builtin or plugin flags
rg -nC2 -i 'pytest(?!-duration)|--durations(=|\b)|--pytest-durations(=|\b)' .github scripts ci Makefile || trueLength of output: 2791
Pin pytest-durations to preserve Py3.8 support or require Python ≥3.9.
setup.py contains python_requires=">=3.8" and a Python 3.8 classifier — pytest-durations ≥1.5.1 dropped Py3.8, so pick one:
-pytest-durations
+pytest-durations<1.5.1 # keep Py3.8 compatibility-pytest-durations
+pytest-durations>=1.5.1 # requires Python >=3.9; also bump python_requires and CI📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pytest-durations | |
| pytest-durations<1.5.1 # keep Py3.8 compatibility |
| pytest-durations | |
| pytest-durations>=1.5.1 # requires Python >=3.9; also bump python_requires and CI |
🤖 Prompt for AI Agents
In requirements-rocm.txt at line 15, pytest-durations is unpinned and recent
releases (>=1.5.1) dropped Python 3.8 support which conflicts with setup.py's
python_requires=">=3.8"; either pin pytest-durations to a release that still
supports Py3.8 (e.g. add pytest-durations==1.5.0 or pytest-durations<1.5.1) in
requirements-rocm.txt, or if you intend to require Python ≥3.9, update setup.py
(python_requires and classifiers) and any docs to ≥3.9 and then leave or update
the dependency to a compatible newer version.
Summary by CodeRabbit
Tests
Chores