-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from princeton-nlp/pypi
Add PyPI Library Build Logic to Main Repo
- Loading branch information
Showing
55 changed files
with
447 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# !bin/bash | ||
|
||
python3 -m build | ||
|
||
python3 -m twine upload --skip-existing --repository pypi dist/* | ||
# python3 -m twine upload --skip-existing --repository testpypi dist/* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ['setuptools>=42'] | ||
build-backend = 'setuptools.build_meta' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[metadata] | ||
version = attr: swebench.__version__ | ||
license_files = LICENSE |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import setuptools | ||
|
||
with open('README.md', 'r', encoding='utf-8') as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name='swebench', | ||
author='John Yang', | ||
author_email='byjohnyang@gmail.com', | ||
description='The official SWE-bench package - a benchmark for evaluating LMs on software engineering', | ||
keywords='nlp, benchmark, code', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://swebench.com', | ||
project_urls={ | ||
'Documentation': 'https://github.com/princeton-nlp/SWE-bench', | ||
'Bug Reports': 'http://github.com/princeton-nlp/SWE-bench/issues', | ||
'Source Code': 'http://github.com/princeton-nlp/SWE-bench', | ||
'Website': 'https://swebench.com', | ||
}, | ||
packages=setuptools.find_packages(), | ||
classifiers=[ | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
], | ||
python_requires='>=3.8', | ||
install_requires=[ | ||
'beautifulsoup4', | ||
'chardet', | ||
'datasets', | ||
'ghapi', | ||
'GitPython', | ||
'python-dotenv', | ||
'requests', | ||
'rich', | ||
], | ||
include_package_data=True, | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
__version__ = "1.0.1" | ||
|
||
from swebench.collect.build_dataset import main as build_dataset | ||
from swebench.collect.get_tasks_pipeline import main as get_tasks_pipeline | ||
from swebench.collect.print_pulls import main as print_pulls | ||
|
||
from swebench.harness.constants import ( | ||
KEY_INSTANCE_ID, | ||
KEY_MODEL, | ||
KEY_PREDICTION, | ||
MAP_REPO_TO_TEST_FRAMEWORK, | ||
MAP_VERSION_TO_INSTALL, | ||
) | ||
|
||
from swebench.harness.run_evaluation import ( | ||
main as run_evaluation, | ||
) | ||
|
||
from swebench.harness.utils import ( | ||
get_environment_yml, | ||
get_instances, | ||
get_requirements, | ||
) | ||
|
||
from swebench.metrics.conversion import ( | ||
convert_log_to_ground_truth | ||
) | ||
|
||
from swebench.metrics.getters import ( | ||
get_diffs, | ||
get_logs_eval, | ||
get_logs_gold, | ||
) | ||
|
||
from swebench.metrics.log_parsers import ( | ||
MAP_REPO_TO_PARSER, | ||
) | ||
|
||
from swebench.metrics.metrics import ( | ||
compute_fail_to_pass, | ||
compute_fail_to_pass_unweighted, | ||
compute_fail_to_pass_weighted, | ||
compute_pass_to_pass, | ||
compute_pass_to_pass_unweighted, | ||
compute_pass_to_pass_weighted, | ||
get_resolution_status, | ||
) | ||
|
||
from swebench.metrics.monitor import ( | ||
monitor_validation, | ||
monitor_logs_same_diff, | ||
) | ||
|
||
from swebench.metrics.report import ( | ||
get_eval_report, | ||
get_eval_reports_for_logs, | ||
get_eval_reports_for_dir, | ||
get_model_eval_summary, | ||
get_model_report, | ||
) | ||
|
||
from swebench.versioning.constants import ( | ||
MAP_REPO_TO_VERSION_PATHS, | ||
MAP_REPO_TO_VERSION_PATTERNS, | ||
) | ||
|
||
from swebench.versioning.get_versions import ( | ||
get_version, | ||
map_version_to_task_instances, | ||
get_versions_from_build, | ||
get_versions_from_web, | ||
) | ||
|
||
from swebench.versioning.utils import ( | ||
split_instances, | ||
) |
File renamed without changes.
Empty file.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
This file contains 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
Oops, something went wrong.