-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update template to 2020.7.15 * Remove command-line interface * Remove click from dependencies * Update poetry.lock * Add implementation * Use this project in its own noxfile.py * Ignore E402 * Add nox 2020.5.24 * Import nox_poetry from the Nox installation * Install nox-poetry in Tests workflow * Add fake tests * Update cookiecutter-hypermodern-python to 2020.9.15 * Update tests * Use package instead of __init__ in API reference * Do not run typeguard by default * Do not run typeguard in CI * Update README.rst
- Loading branch information
Showing
24 changed files
with
1,339 additions
and
597 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
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/docs" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily |
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,3 +1,4 @@ | ||
pip==20.1 | ||
nox==2019.11.9 | ||
poetry==1.0.5 | ||
pip==20.2.3 | ||
nox==2020.8.22 | ||
poetry==1.0.10 | ||
virtualenv==20.0.31 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,42 +1,78 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.1.0 | ||
- uses: actions/setup-python@v2 | ||
- name: Check out the repository | ||
uses: actions/checkout@v2.3.2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2.1.2 | ||
with: | ||
python-version: "3.8" | ||
- run: | | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip install --constraint=.github/workflows/constraints.txt nox poetry | ||
- name: Compute cache key prefix | ||
if: matrix.os != 'windows-latest' | ||
id: cache_key_prefix | ||
shell: python | ||
pip --version | ||
- name: Install Poetry | ||
run: | | ||
import hashlib | ||
import sys | ||
pip install --constraint=.github/workflows/constraints.txt poetry | ||
poetry --version | ||
python = "py{}.{}".format(*sys.version_info[:2]) | ||
payload = sys.version.encode() + sys.executable.encode() | ||
digest = hashlib.sha256(payload).hexdigest() | ||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest[:8]) | ||
- name: Check if there is a parent commit | ||
id: check-parent-commit | ||
run: | | ||
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)" | ||
print("::set-output name=result::{}".format(result)) | ||
- uses: actions/cache@v1.2.0 | ||
if: matrix.os != 'windows-latest' | ||
- name: Detect and tag new version | ||
id: check-version | ||
if: steps.check-parent-commit.outputs.sha | ||
uses: salsify/action-detect-and-tag-new-version@v2.0.1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ steps.cache_key_prefix.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ steps.cache_key_prefix.outputs.result }}- | ||
- run: nox --force-color | ||
- run: poetry build --ansi | ||
- uses: pypa/gh-action-pypi-publish@v1.1.0 | ||
version-command: | | ||
bash -o pipefail -c "poetry version | awk '{ print \$2 }'" | ||
- name: Bump version for developmental release | ||
if: "! steps.check-version.outputs.tag" | ||
run: | | ||
poetry version patch && | ||
version=$(poetry version | awk '{ print $2 }') && | ||
poetry version $version.dev.$(date +%s) | ||
- name: Build package | ||
run: | | ||
poetry build --ansi | ||
- name: Publish package on PyPI | ||
if: steps.check-version.outputs.tag | ||
uses: pypa/gh-action-pypi-publish@v1.3.1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish package on TestPyPI | ||
if: "! steps.check-version.outputs.tag" | ||
uses: pypa/gh-action-pypi-publish@v1.3.1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish the release notes | ||
uses: release-drafter/release-drafter@v5.11.0 | ||
with: | ||
publish: ${{ steps.check-version.outputs.tag != '' }} | ||
tag: ${{ steps.check-version.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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.