-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 306ded4
Showing
18 changed files
with
2,688 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 @@ | ||
/Users/jan/repos/poetry-brew/.assets/homebrew-formula-help.svg |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
liberapay: janw | ||
ko_fi: janwxyz |
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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- dependencies | ||
commit-message: | ||
prefix: "build(deps)" |
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,54 @@ | ||
name: Linters | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
commitizen: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
pyproject.toml | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Install commitizen | ||
run: pipx install commitizen | ||
|
||
- run: cz check --rev-range origin/main..HEAD | ||
shell: bash | ||
|
||
pre-commit-extras: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install commitizen | ||
run: pipx install poetry | ||
|
||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: 'poetry' | ||
|
||
- run: poetry install --with=dev | ||
|
||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: > | ||
rich-codex | ||
mypy | ||
--all-files | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: assets | ||
path: | | ||
.assets/* | ||
retention-days: 3 | ||
if: always() |
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,50 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Build package | ||
run: poetry build -vvv | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: package | ||
path: | | ||
README.md | ||
pyproject.toml | ||
dist/* | ||
if-no-files-found: error | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
pypi: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
environment: release | ||
needs: build | ||
steps: | ||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: package | ||
|
||
- run: ls dist/* | ||
|
||
- name: Publish package | ||
run: poetry publish | ||
env: | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} |
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,62 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- "*" | ||
|
||
env: | ||
POETRY_EDGE_SOURCE: 'git+https://github.com/python-poetry/poetry.git' | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13-dev" | ||
poetry-version: | ||
- "1.6" | ||
- "1.7" | ||
- "edge" | ||
|
||
name: pytest-${{ matrix.python-version }}-${{ matrix.poetry-version }} | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: poetry | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-root --with=tests --sync | ||
|
||
- name: Install poetry version under test | ||
run: | | ||
if [ "${{ matrix.poetry-version }}" = "edge" ]; then | ||
poetry run pip install -U "${{ env.POETRY_EDGE_SOURCE }}"; | ||
else | ||
poetry run pip install -U "poetry~=${{ matrix.poetry-version }}"; | ||
fi | ||
- run: poetry run pytest --cov-report=xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
name: coverage-${{ matrix.python-version }}-${{ matrix.poetry-version }} |
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,5 @@ | ||
.ruff_cache/ | ||
dist/ | ||
|
||
.coverage | ||
coverage.xml |
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,55 @@ | ||
ci: | ||
autofix_prs: false | ||
autoupdate_schedule: quarterly | ||
autoupdate_commit_msg: 'build(pre-commit): [pre-commit.ci] pre-commit autoupdate' | ||
skip: # see linters.yaml -> pre-commit-extras job | ||
- "rich-codex" | ||
- "mypy" | ||
|
||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: 'v0.1.11' | ||
hooks: | ||
- id: ruff | ||
args: [ --fix, --exit-non-zero-on-fix ] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v4.4.0" | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude_types: [svg] | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: check-ast | ||
|
||
- repo: https://github.com/python-poetry/poetry | ||
rev: '1.7.1' | ||
hooks: | ||
- id: poetry-check | ||
|
||
- repo: local | ||
hooks: | ||
- id: rich-codex | ||
name: rich-codex | ||
language: system | ||
entry: > | ||
env | ||
FORCE_COLOR=1 | ||
TERMINAL_WIDTH=140 | ||
poetry run rich-codex | ||
--skip-git-checks | ||
--no-confirm | ||
--terminal-theme MONOKAI | ||
--created-files .assets/created.txt | ||
pass_filenames: false | ||
types: [markdown] | ||
files: '(\.md|cli\.py|config\.py)$' | ||
|
||
- id: mypy | ||
name: mypy | ||
entry: poetry run mypy | ||
language: system | ||
require_serial: true | ||
pass_filenames: false |
Oops, something went wrong.