Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ trim_trailing_whitespace = false
[*.py]
indent_size = 4

[*.yml]
[*.{yaml,yml}]
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
*.py text eol=lf
*.toml text eol=lf
*.txt text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
52 changes: 13 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- workflow_call

env:
CI_POETRY_VERSION: "1.7.1"
CI_UV_VERSION: "0.9.18"

jobs:
ci-checks:
Expand All @@ -15,51 +15,25 @@ jobs:
- name: Check out source tree
uses: actions/checkout@v4

- name: Load cached Poetry installation
id: load-cached-poetry
uses: actions/cache@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
path: ~/.local
key: poetry-release-v${{ env.CI_POETRY_VERSION }}

- name: Update PATH
if: steps.load-cached-poetry.outputs.cache-hit == 'true'
run: |
echo ~/.local/bin >> "${GITHUB_PATH}"

- name: Install Poetry
uses: snok/install-poetry@v1
if: steps.load-cached-poetry.outputs.cache-hit != 'true'
with:
version: ${{ env.CI_POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
version: ${{ env.CI_UV_VERSION }}

- name: Print current package version
run: poetry version --no-ansi --no-interaction

- name: Use specified Python version
uses: actions/setup-python@v5
with:
cache: poetry
python-version-file: .python-version

- name: Install dependencies
# See also:
# https://github.com/python-poetry/poetry/issues/7184
run: poetry install --no-ansi --no-interaction --no-root

- name: Install target package
run: poetry install --no-ansi --no-interaction
run: uv tree -d 0

- name: Run static typechecking
run: poetry run poe typecheck
run: uv run poe typecheck

- name: Run linter
run: poetry run poe linter
run: uv run poe linter

- name: Check for formatting style violations not covered by the linter
run: uv run poe formatcheck

- name: Run unit tests
run: poetry run poe tests
run: uv run poe tests

- name: Run man page generator
run: poetry run poe doc
- name: Run man page and HTML documentation generator
run: uv run poe doc
31 changes: 8 additions & 23 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
inputs:
target_version:
description: |-
New version number for the release (or a Poetry bump rule)
New version number for the release (or `major`, `minor`, `patch`)
required: true

env:
CI_POETRY_VERSION: "1.7.1"
CI_UV_VERSION: "0.9.18"

jobs:
bump-version:
Expand All @@ -20,39 +20,24 @@ jobs:
- name: Check out source tree
uses: actions/checkout@v4

- name: Load cached Poetry installation
id: load-cached-poetry
uses: actions/cache@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
path: ~/.local
key: poetry-release-v${{ env.CI_POETRY_VERSION }}

- name: Update PATH
if: steps.load-cached-poetry.outputs.cache-hit == 'true'
run: |
echo ~/.local/bin >> "${GITHUB_PATH}"

- name: Install Poetry
uses: snok/install-poetry@v1
if: steps.load-cached-poetry.outputs.cache-hit != 'true'
with:
version: ${{ env.CI_POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
version: ${{ env.CI_UV_VERSION }}

- name: Print current package version
run: poetry version --no-ansi --no-interaction
run: uv tree -d 0

- name: Bump package version
env:
TARGET_VERSION: ${{ inputs.target_version }}
run: poetry version --no-ansi --no-interaction "${TARGET_VERSION}"
run: uvx bump-my-version bump "${TARGET_VERSION}"

- id: gather_new_version
name: Gather bumped package version
run: |
env -i >> "${GITHUB_OUTPUT}" \
"new_version=$(poetry version --no-ansi --no-interaction --short)"
"new_version=$(uvx bump-my-version show current_version)"

- name: Print bumped package version
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/debian/python3-qualify.*.debhelper
/debian/python3-qualify.substvars
/dist/
/doc/sphinx/autoapi/
/.pc/
/.venv/
*.egg-info
Expand Down
7 changes: 2 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ load-plugins=
# Pickle collected data for later comparisons.
persistent=yes

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
Expand Down Expand Up @@ -70,7 +66,8 @@ disable=raw-checker-failed,
use-symbolic-message-instead,
docstring-first-line-empty,
consider-alternative-union-syntax,
useless-import-alias
useless-import-alias,
empty-comment

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8
3.9
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

python:
install:
- requirements: doc/requirements.txt

sphinx:
configuration: doc/sphinx/conf.py
8 changes: 5 additions & 3 deletions .redport/cookiecutter_replay/cookiecutter-python-package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"cookiecutter": {
"project_title": "qualify",
"project_slug": "python_qualify",
"pypi_package_name": "python-qualify",
"python_package_name": "python_qualify",
"project_description": "Collection of convenience functions to patch `pyproject.toml` in place",
"first_module_name": "api",
"project_version": "0.1.0",
"project_license": "Apache-2.0",
"python_version": "3.8",
"python_version": "3.9",
"author_full_name": "Claudia Pellegrino",
"author_email": "clau@tiqua.de",
"copyright_holder_full_name": "Claudia Pellegrino",
Expand All @@ -27,7 +28,8 @@
},
"_cookiecutter": {
"project_title": "",
"project_slug": "{{ cookiecutter.project_title.lower().replace(' ', '_').replace('-', '_') }}",
"pypi_package_name": "{{ cookiecutter.project_title.lower().replace(' ', '-').replace('_', '-') }}",
"python_package_name": "{{ cookiecutter.pypi_package_name.replace('-', '_') }}",
"project_description": "",
"first_module_name": "api",
"project_version": "0.1.0",
Expand Down
10 changes: 3 additions & 7 deletions .redport/manifest.rpt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
"upstream": {
"type": "cookiecutter-template",
"source": "https://github.com/claui/cookiecutter-python-package.git",
"commit": "3ab6969a03cfa353e1f520522b02ad69f4cdc08b",
"commit": "5a628b81c9ede61fa6f10531f363c28184694e24",
"replay": "cookiecutter_replay/cookiecutter-python-package.json",
"patches": [
"patches/disable-install-step.patch"
],
"nextPatches": [
"patches/disable-install-step.patch"
]
"patches": [],
"nextPatches": []
}
}
86 changes: 0 additions & 86 deletions .redport/patches/disable-install-step.patch

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"code-runner.clearPreviousOutput": true,
"code-runner.executorMap": {
"python": "poetry run python"
"python": "uv run python"
},
"code-runner.ignoreSelection": true,
"code-runner.saveFileBeforeRun": true,
Expand Down
8 changes: 4 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"tasks": [
{
"label": "qualify: Install/update local dependencies",
"type": "shell",
"command": "poetry",
"type": "process",
"command": "uv",
"args": [
"update"
],
Expand All @@ -20,7 +20,7 @@
{
"label": "qualify: Browse HTML documentation",
"type": "process",
"command": "poetry",
"command": "uv",
"args": [
"run",
"poe",
Expand All @@ -36,7 +36,7 @@
{
"label": "qualify: Run static type checker",
"type": "process",
"command": "poetry",
"command": "uv",
"args": [
"run",
"poe",
Expand Down
Loading