Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus authored Apr 17, 2023
2 parents b7dba24 + aa33315 commit 371956c
Show file tree
Hide file tree
Showing 275 changed files with 11,507 additions and 5,717 deletions.
1 change: 1 addition & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test_task:
- PYTHON: python3.8
- PYTHON: python3.9
- PYTHON: python3.10
- PYTHON: python3.11
install_prereqs_script:
- V=$(printf '%s' $PYTHON | tr -d '.[:alpha:]')
- pkg install -y python${V} py${V}-sqlite3
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ban-relative-imports = true
format-greedy = 1
inline-quotes = double
enable-extensions = TC, TC1
type-checking-exempt-modules = typing, typing-extensions
type-checking-strict = true
eradicate-whitelist-extend = ^-.*;
extend-ignore =
# E203: Whitespace before ':' (pycqa/pycodestyle#373)
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
include:
- os: Ubuntu
image: ubuntu-22.04
Expand All @@ -50,11 +50,11 @@ jobs:

- name: Get full Python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
run: echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT

- name: Bootstrap poetry
run: |
curl -sL https://install.python-poetry.org | python - -y
curl -sSL https://install.python-poetry.org | python - -y
- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
Expand All @@ -64,6 +64,12 @@ jobs:
if: ${{ matrix.os == 'Windows' }}
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH

- name: Enable long paths for git on Windows
if: ${{ matrix.os == 'Windows' }}
# Enable handling long path names (+260 char) on the Windows platform
# https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
run: git config --system core.longpaths true

- name: Configure poetry
run: poetry config virtualenvs.in-project true

Expand All @@ -83,10 +89,8 @@ jobs:
# Using `timeout` is a safeguard against the Poetry command hanging for some reason.
timeout 10s poetry run pip --version || rm -rf .venv
# XXX: https://github.com/pypa/pip/issues/11352 causes random failures -- remove once fixed in a release.
- name: Upgrade pip on Python 3.11
if: ${{ matrix.python-version == '3.11-dev' }}
run: poetry run pip install git+https://github.com/pypa/pip.git@f8a25921e5c443b07483017b0ffdeb08b9ba2fdf
- name: Check lock file
run: poetry lock --check

- name: Install dependencies
run: poetry install --with github-actions
Expand All @@ -103,8 +107,7 @@ jobs:
- name: Get Plugin Version (poetry-plugin-export)
id: poetry-plugin-export-version
run: |
echo ::set-output name=version::$(\
poetry show poetry-plugin-export | grep version | cut -d : -f 2 | xargs)
echo version=$(poetry show poetry-plugin-export | grep version | cut -d : -f 2 | xargs) >> $GITHUB_OUTPUT
- name: Checkout Plugin Source (poetry-plugin-export)
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
python-version: "3.10"

- name: Install Poetry
run: python install-poetry.py -y
run: |
curl -sSL https://install.python-poetry.org | python - -y
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
Expand All @@ -30,8 +31,7 @@ jobs:
- name: Check Version
id: check-version
run: |
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
|| echo ::set-output name=prerelease::true
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- run: exit 0
34 changes: 17 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand Down Expand Up @@ -32,35 +32,34 @@ repos:
hooks:
- id: yesqa
additional_dependencies: &flake8_deps
- flake8-annotations==2.9.0
- flake8-broken-line==0.5.0
- flake8-bugbear==22.7.1
- flake8-comprehensions==3.10.0
- flake8-eradicate==1.3.0
- flake8-quotes==3.3.1
- flake8-annotations==3.0.0
- flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-eradicate==1.4.0
- flake8-pie==0.16.0
- flake8-quotes==3.3.2
- flake8-simplify==0.19.3
- flake8-tidy-imports==4.8.0
- flake8-type-checking==2.1.2
- flake8-typing-imports==1.12.0
- flake8-type-checking==2.3.0
- flake8-typing-imports==1.14.0
- flake8-use-fstring==1.4
- pep8-naming==0.13.1
- flake8-pie==0.16.0
- pep8-naming==0.13.3

- repo: https://github.com/asottile/pyupgrade
rev: v3.1.0
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
exclude: ^(install|get)-poetry.py$

- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
rev: v2.1.2
hooks:
- id: pycln
args: [--all]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: "isort (python)"
Expand All @@ -77,17 +76,18 @@ repos:
args: [--lines-after-imports, "-1"]

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
# freeze to commit rev to prevent automatic updates, since newer versions of flake8 are not compatible with plugins
rev: 6027577d325b0dd8bf1e465ebd29b71b5f0d005b
hooks:
- id: flake8
additional_dependencies: *flake8_deps

- repo: https://github.com/pre-commit/pre-commit
rev: v2.20.0
rev: v2.21.0
hooks:
- id: validate_manifest
5 changes: 1 addition & 4 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@
description: run poetry check to validate config
entry: poetry check
language: python
language_version: python3
pass_filenames: false
files: ^pyproject.toml$
files: ^(.*/)?pyproject.toml$

- id: poetry-lock
name: poetry-lock
description: run poetry lock to update lock file
entry: poetry lock
language: python
language_version: python3
pass_filenames: false

- id: poetry-export
name: poetry-export
description: run poetry export to sync lock file with requirements.txt
entry: poetry export
language: python
language_version: python3
pass_filenames: false
files: ^poetry.lock$
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
Loading

0 comments on commit 371956c

Please sign in to comment.