forked from pypa/hatch
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit eef7d0c
Showing
283 changed files
with
34,868 additions
and
0 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,7 @@ | ||
# TODO: move this to pyproject.toml when supported, see https://github.com/PyCQA/flake8/issues/234 | ||
|
||
[flake8] | ||
select = B,C,E,F,W,B001,B003,B006,B007,B301,B305,B306,B902,Q000,Q001,Q002,Q003 | ||
ignore = E203,E722,W503 | ||
exclude = .tox,build,backend/hatchling/utils/compat.py | ||
max-line-length = 120 |
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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,4 @@ | ||
github: | ||
- ofek | ||
custom: | ||
- https://ofek.dev/donate/ |
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,7 @@ | ||
## Description | ||
<!--- A few words to describe your changes --> | ||
|
||
|
||
|
||
## Checklist | ||
<!--- We appreciate your help and please add yourself to the AUTHORS 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: build hatch | ||
|
||
on: | ||
push: | ||
tags: | ||
- hatch-v* | ||
|
||
concurrency: | ||
group: build-hatch-${{ github.head_ref }} | ||
|
||
jobs: | ||
build: | ||
name: Build wheels and source distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install build dependencies | ||
run: python -m pip install --upgrade build | ||
|
||
- name: Build source distribution | ||
run: python -m build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: dist/* | ||
if-no-files-found: error | ||
|
||
publish: | ||
name: Publish release | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: dist | ||
|
||
- name: Push build artifacts to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN_HATCH }} |
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,48 @@ | ||
name: build hatchling | ||
|
||
on: | ||
push: | ||
tags: | ||
- hatchling-v* | ||
|
||
concurrency: | ||
group: build-hatchling-${{ github.head_ref }} | ||
|
||
jobs: | ||
build: | ||
name: Build wheels and source distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install build dependencies | ||
run: python -m pip install --upgrade build | ||
|
||
- name: Build source distribution | ||
run: python -m build backend | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: backend/dist/* | ||
if-no-files-found: error | ||
|
||
publish: | ||
name: Publish release | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: dist | ||
|
||
- name: Push build artifacts to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN_HATCHLING }} |
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,81 @@ | ||
name: dev docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: docs-deploy | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Fetch all history for applying timestamps to every page | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Validate history | ||
run: python scripts/validate_history.py | ||
|
||
- name: Ensure latest pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install ourself | ||
run: pip install -e . | ||
|
||
- name: Configure Git for GitHub Actions bot | ||
run: | | ||
git config --local user.name 'github-actions[bot]' | ||
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Build documentation | ||
run: hatch run docs:ci-build dev | ||
|
||
- name: Create archive | ||
run: git archive -o site.zip gh-pages | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: documentation | ||
path: site.zip | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: | ||
- build | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: documentation | ||
|
||
- name: Unpack archive | ||
run: python -m zipfile -e site.zip site | ||
|
||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: site | ||
commit_message: ${{ github.event.head_commit.message }} | ||
# Write .nojekyll at the root, see: | ||
# https://help.github.com/en/github/working-with-github-pages/about-github-pages#static-site-generators | ||
enable_jekyll: false | ||
# Only deploy if there were changes | ||
allow_empty_commit: false |
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,83 @@ | ||
name: release docs | ||
|
||
on: | ||
create: | ||
tags: | ||
- hatch-v* | ||
- hatchling-v* | ||
|
||
concurrency: | ||
group: docs-deploy | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Fetch all history for applying timestamps to every page | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Validate history | ||
run: python scripts/validate_history.py | ||
|
||
- name: Ensure latest pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install ourself | ||
run: pip install -e . | ||
|
||
- name: Display full version | ||
run: hatch version | ||
|
||
- name: Set the version of docs to publish | ||
run: python scripts/set_release_version.py | ||
|
||
- name: Configure Git for GitHub Actions bot | ||
run: | | ||
git config --local user.name 'github-actions[bot]' | ||
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Deploy documentation | ||
run: hatch run docs:ci-build $HATCH_DOCS_VERSION latest | ||
|
||
- name: Create archive | ||
run: git archive -o site.zip gh-pages | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: documentation | ||
path: site.zip | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: documentation | ||
|
||
- name: Unpack archive | ||
run: python -m zipfile -e site.zip site | ||
|
||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: site | ||
commit_message: ${{ github.event.head_commit.message }} | ||
# Write .nojekyll at the root, see: | ||
# https://help.github.com/en/github/working-with-github-pages/about-github-pages#static-site-generators | ||
enable_jekyll: false | ||
# Only deploy if there were changes | ||
allow_empty_commit: false |
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,106 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: test-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
run: | ||
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Ensure latest pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install ourself | ||
run: pip install -e . | ||
|
||
- if: matrix.python-version == '3.9' && runner.os == 'Linux' | ||
name: Lint | ||
run: hatch run lint:all | ||
|
||
- name: Run tests | ||
env: | ||
HATCH_CI_PUBLISHER_TOKEN: ${{ secrets.HATCH_CI_PUBLISHER_TOKEN }} | ||
run: hatch run full | ||
|
||
downstream: | ||
name: Downstream builds with Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['2.7', '3.8'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install tools | ||
run: pip install --upgrade -r tests/backend/downstream/requirements.txt | ||
|
||
- name: Build downstream projects | ||
run: python tests/backend/downstream/integrate.py | ||
|
||
response-time: | ||
name: CLI responsiveness with latest Python | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PYTHON_VERSION: '3.10' | ||
HYPERFINE_VERSION: '1.12.0' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install hyperfine | ||
run: | | ||
wget https://github.com/sharkdp/hyperfine/releases/download/v${HYPERFINE_VERSION}/hyperfine_${HYPERFINE_VERSION}_amd64.deb | ||
sudo dpkg -i hyperfine_${HYPERFINE_VERSION}_amd64.deb | ||
- name: Install other tools | ||
run: pip install --upgrade flit poetry pipenv | ||
|
||
- name: Install ourself | ||
run: pip install . | ||
|
||
- name: Benchmark | ||
run: | | ||
hyperfine -m 100 --warmup 10 -i pipenv | ||
hyperfine -m 100 --warmup 10 poetry | ||
hyperfine -m 100 --warmup 10 -i flit | ||
hyperfine -m 100 --warmup 10 hatch |
Oops, something went wrong.