feat: add humanize library to commit0 benchmark#115
Open
07Kaustubh wants to merge 1 commit intocommit-0:mainfrom
Open
feat: add humanize library to commit0 benchmark#11507Kaustubh wants to merge 1 commit intocommit-0:mainfrom
07Kaustubh wants to merge 1 commit intocommit-0:mainfrom
Conversation
Add python-humanize/humanize (v4.15.0) as a new benchmark entry: - 34 functions stubbed across 5 modules (filesize, i18n, lists, number, time) - 737 tests, all passing at reference commit - Python 3.12, requires gettext for i18n translation compilation Adds SPLIT_HUMANIZE constant, updates SPLIT_ALL and SPLIT dict, and includes humanize.bz2 test IDs file (737 pytest node IDs).
There was a problem hiding this comment.
Pull request overview
Adds the humanize repository as a new selectable Commit0 benchmark target by registering it in the harness repo splits and providing its precomputed pytest node IDs.
Changes:
- Added
humanizetoSPLIT_ALLand introducedSPLIT_HUMANIZE, wiring it into theSPLITmapping. - Added
commit0/data/test_ids/humanize.bz2containing the (bz2-compressed) pytest node IDs for the benchmark.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| commit0/harness/constants.py | Registers the new humanize repo split and includes it in the “all” set. |
| commit0/data/test_ids/humanize.bz2 | Adds compressed pytest node IDs used by the harness to run the benchmark’s tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add python-humanize/humanize (v4.15.0) as a new benchmark entry for the commit0 dataset.
Library Details
python-humanize/humanizefilesize.py,i18n.py,lists.py,number.py,time.pyCommits
reference_commit2ddb5903cdc1c7e6eb6b083f4f99f73db50aecd9base_commit7a405e3f49b907db112ff08d9096720a37f60447passDataset Entry
{ "instance_id": "commit-0/humanize", "repo": "commit-0/humanize", "original_repo": "python-humanize/humanize", "base_commit": "7a405e3f49b907db112ff08d9096720a37f60447", "reference_commit": "2ddb5903cdc1c7e6eb6b083f4f99f73db50aecd9", "setup": { "install": "pip install -e .", "packages": null, "pip_packages": ["freezegun", "pytest", "pytest-cov"], "pre_install": [ "export SETUPTOOLS_SCM_PRETEND_VERSION=4.15.0", "apt-get update && apt-get install -y gettext", "bash scripts/generate-translation-binaries.sh" ], "python": "3.12", "specification": "https://humanize.readthedocs.io/" }, "test": { "test_cmd": "pytest", "test_dir": "tests/" }, "src_dir": "src/humanize/" }Verification
import humanizesucceeds at base_commit (stubs are syntactically valid).mofiles)src/humanize/modified between reference → base; zero test file changesChanges in This PR
commit0/harness/constants.py— AddSPLIT_HUMANIZE, append"humanize"toSPLIT_ALL, add entry toSPLITdictcommit0/data/test_ids/humanize.bz2— 737 pytest node IDs (bz2-compressed)Additional Integration Required
For full integration, maintainers will also need to:
python-humanize/humanizeto thecommit-0GitHub org (stubs branch available at 07Kaustubh/humanize@commit0-stubs)commit0/commit0andwentingzhao/commit0_combined)wentingzhao/humanize:v0Design Notes
i18n.pybeforenumber.py/time.py/filesize.pywill function._ngettext_nooppreserved: Called at module level innumber.pyto buildhuman_powerstuple — stubbing it would cause ImportError.pre_installrationale:gettext+generate-translation-binaries.shcompiles.po→.mofiles needed by 59 i18n tests.SETUPTOOLS_SCM_PRETEND_VERSIONis needed because the shallow Docker clone lacks git tags.