-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
494 additions
and
316 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[flake8] | ||
extend-select = | ||
# bugbear | ||
B | ||
# bugbear opinions | ||
B9 | ||
# implicit str concat | ||
ISC | ||
extend-ignore = | ||
# slice notation whitespace, invalid | ||
E203 | ||
# line length, handled by bugbear B950 | ||
E501 | ||
# bare except, handled by bugbear B001 | ||
E722 | ||
# zip with strict=, requires python >= 3.10 | ||
B905 | ||
# string formatting opinion, B028 renamed to B907 | ||
B028 | ||
B907 | ||
# up to 88 allowed by bugbear B950 | ||
max-line-length = 80 | ||
per-file-ignores = | ||
# __init__ exports names | ||
src/click/__init__.py: F401 |
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 |
---|---|---|
@@ -1,15 +1,25 @@ | ||
name: 'Lock threads' | ||
# Lock closed issues that have not received any further activity for | ||
# two weeks. This does not close open issues, only humans may do that. | ||
# We find that it is easier to respond to new issues with fresh examples | ||
# rather than continuing discussions on old issues. | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: lock | ||
|
||
jobs: | ||
lock: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/lock-threads@v3 | ||
- uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836 | ||
with: | ||
github-token: ${{ github.token }} | ||
issue-inactive-days: 14 | ||
pr-inactive-days: 14 |
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,72 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
hash: ${{ steps.hash.outputs.hash }} | ||
steps: | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
- uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b | ||
with: | ||
python-version: '3.x' | ||
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- run: pip install -r requirements/build.txt | ||
# Use the commit date instead of the current date during the build. | ||
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | ||
- run: python -m build | ||
# Generate hashes used for provenance. | ||
- name: generate hash | ||
id: hash | ||
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT | ||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce | ||
with: | ||
path: ./dist | ||
provenance: | ||
needs: ['build'] | ||
permissions: | ||
actions: read | ||
id-token: write | ||
contents: write | ||
# Can't pin with hash due to how this workflow works. | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | ||
with: | ||
base64-subjects: ${{ needs.build.outputs.hash }} | ||
create-release: | ||
# Upload the sdist, wheels, and provenance to a GitHub release. They remain | ||
# available as build artifacts for a while as well. | ||
needs: ['provenance'] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | ||
- name: create release | ||
run: > | ||
gh release create --draft --repo ${{ github.repository }} | ||
${{ github.ref_name }} | ||
*.intoto.jsonl/* artifact/* | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
publish-pypi: | ||
needs: ['provenance'] | ||
# Wait for approval before attempting to upload to PyPI. This allows reviewing the | ||
# files in the draft release. | ||
environment: 'publish' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | ||
# Try uploading to Test PyPI first, in case something fails. | ||
- uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d | ||
with: | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
packages_dir: artifact/ | ||
- uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
packages_dir: artifact/ |
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
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
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
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
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,63 @@ | ||
[project] | ||
name = "click" | ||
description = "Composable command line interface toolkit" | ||
readme = "README.rst" | ||
license = {text = "BSD-3-Clause"} | ||
maintainers = [{name = "Pallets", email = "[email protected]"}] | ||
authors = [{name = "Armin Ronacher", email = "[email protected]"}] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
] | ||
requires-python = ">=3.7" | ||
dependencies = [ | ||
"colorama; platform_system == 'Windows'", | ||
"importlib-metadata; python_version < '3.8'", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Donate = "https://palletsprojects.com/donate" | ||
Documentation = "https://click.palletsprojects.com/" | ||
Changes = "https://click.palletsprojects.com/changes/" | ||
"Source Code" = "https://github.com/pallets/click/" | ||
"Issue Tracker" = "https://github.com/pallets/click/issues/" | ||
Twitter = "https://twitter.com/PalletsTeam" | ||
Chat = "https://discord.gg/pallets" | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "click.__version__"} | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
filterwarnings = ["error"] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["click", "tests"] | ||
|
||
[tool.coverage.paths] | ||
source = ["src", "*/site-packages"] | ||
|
||
[tool.mypy] | ||
python_version = "3.7" | ||
files = ["src/click"] | ||
show_error_codes = true | ||
pretty = true | ||
strict = true | ||
local_partial_types = true | ||
warn_unreachable = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = [ | ||
"colorama.*", | ||
"importlib_metadata.*" | ||
] | ||
ignore_missing_imports = 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 @@ | ||
build |
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,17 @@ | ||
# SHA1:80754af91bfb6d1073585b046fe0a474ce868509 | ||
# | ||
# This file is autogenerated by pip-compile-multi | ||
# To update, run: | ||
# | ||
# pip-compile-multi | ||
# | ||
build==0.10.0 | ||
# via -r requirements\build.in | ||
colorama==0.4.6 | ||
# via build | ||
packaging==23.1 | ||
# via build | ||
pyproject-hooks==1.0.0 | ||
# via build | ||
tomli==2.0.1 | ||
# via build |
Oops, something went wrong.