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
53 changes: 29 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,55 @@ concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CONDA_EXE: mamba

on:
push:
branches:
- main
pull_request:
branches:
- '*'
merge_group:

jobs:

run-type-checking:

name: Run tests for type-checking
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
with:
version: "0.9.9"
enable-cache: true
- name: Install just
uses: extractions/setup-just@v3
- run: just typing

run-tests:

name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
env:
CONDA_EXE: mamba

strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2.2.0
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v7
with:
auto-update-conda: false
version: "0.9.9"
enable-cache: true
python-version: ${{ matrix.python-version }}
channels: conda-forge,nodefaults
miniforge-variant: Mambaforge

- name: Install core dependencies.
shell: bash -l {0}
run: mamba install -c conda-forge tox-conda coverage

- name: Run end-to-end tests.
shell: bash -l {0}
run: tox -e pytest -- tests -m end_to_end --cov=./ --cov-report=xml -n auto

- name: Upload coverage reports of end-to-end tests.
if: runner.os == 'Linux' && matrix.python-version == '3.9'
shell: bash -l {0}
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c
- name: Install just
uses: extractions/setup-just@v3
- name: Run end-to-end tests
run: just test

- name: Upload coverage reports of tests.
if: runner.os == 'Linux' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v5
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
Expand Down Expand Up @@ -135,7 +134,6 @@ coverage.*
# Folders
.idea
.ipynb_checkpoints
.tox
.vscode
_build
__pycache__
Expand Down
52 changes: 17 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude: |

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=25']
Expand All @@ -15,7 +15,6 @@ repos:
- id: check-yaml
exclude: |
(?x)^(
{{cookiecutter.package_name}}/environment.yml|
{{cookiecutter.package_name}}/.pre-commit-config.yaml
)$
- id: debug-statements
Expand All @@ -34,76 +33,60 @@ repos:
- id: python-no-log-warn
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
args: [--py37-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
rev: v3.2.0
hooks:
- id: setup-cfg-fmt
exclude: |
(?x)^(
{{cookiecutter.package_name}}/setup.cfg
)$
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.241
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.2
hooks:
- id: ruff
- id: ruff
args: [--fix, hooks, tests]
pass_filenames: false
- id: ruff-format
args: [hooks, tests]
pass_filenames: false
- repo: https://github.com/dosisod/refurb
rev: v1.10.0
rev: v2.3.0
hooks:
- id: refurb
args: [--ignore, FURB126]
exclude: ({{cookiecutter.package_name}})
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
rev: 1.7.0
hooks:
- id: interrogate
args: [-v, --fail-under=40]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies: [
mdformat-gfm,
mdformat-black,
]
additional_dependencies: [mdformat-gfm]
args: [--wrap, "88"]
files: (README\.md)
exclude: |
(?x)^(
{{cookiecutter.package_name}}/README.md
)$
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies: [
mdformat-myst,
mdformat-black,
]
additional_dependencies: [mdformat-myst]
args: [--wrap, "88"]
files: (docs/.)
# Exclude files with admonitions.
# exclude: |
# (?x)^(
# path/to/file.py
# )$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies: [tomli]
exclude: (^|/)uv\.lock$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.991'
rev: 'v1.19.1'
hooks:
- id: mypy
args: [
Expand All @@ -115,4 +98,3 @@ repos:
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
# - id: identity # Prints all files passed to pre-commits. Debugging.
20 changes: 14 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
version: 2

build:
image: latest
os: ubuntu-24.04
tools:
python: "3.11"
jobs:
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- UV_NO_EDITABLE=1 UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs
install:
- "true"

python:
version: 3.8

conda:
environment: docs/rtd_environment.yml
sphinx:
configuration: docs/source/conf.py
fail_on_warning: false
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![image](https://img.shields.io/github/actions/workflow/status/pytask-dev/cookiecutter-pytask-plugin/main.yml?branch=main)](https://github.com/pytask-dev/cookiecutter-pytask-plugin/actions?query=branch%3Amain)
[![image](https://codecov.io/gh/pytask-dev/cookiecutter-pytask-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/pytask-dev/cookiecutter-pytask-plugin)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/pytask-dev/cookiecutter-pytask-plugin/main.svg)](https://results.pre-commit.ci/latest/github/pytask-dev/cookiecutter-pytask-plugin/main)
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![code style: ruff](https://img.shields.io/badge/code%20style-ruff-261230.svg)](https://github.com/astral-sh/ruff)

This repository contains a minimal cookiecutter template for a plugin for
[pytask](https://github.com/pytask-dev/pytask) .
Expand All @@ -16,8 +16,6 @@ First, install cookiecutter.

```console
$ pip install cookiecutter

$ conda install -c conda-forge cookiecutter
```

Then, set up the template for the new plugin with
Expand Down
3 changes: 0 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ coverage:
threshold: 1%
flags:
- end_to_end

ignore:
- ".tox/**/*"
3 changes: 0 additions & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"github_username": "{{ cookiecutter.author.lower().replace(' ', '') }}",
"github_email": "{{ cookiecutter.email }}",
"python_version": "3.10",
"add_tox": ["yes", "no"],
"add_github_actions": ["yes", "no"],
"add_readthedocs": ["yes", "no"],
"add_codecov": ["yes", "no"],
Expand All @@ -19,8 +18,6 @@
"Not open source"
],
"make_initial_commit": ["no", "yes"],
"conda_environment_name": "{{ cookiecutter.package_name }}",
"create_conda_environment_at_finish": ["no", "yes"],
"_copy_without_render": [
".github/workflows/main.yml", ".github/workflows/publish-to-pypi.yml"
],
Expand Down
23 changes: 0 additions & 23 deletions docs/rtd_environment.yml

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html

"""

# -- Project information -----------------------------------------------------
from __future__ import annotations

Expand Down
37 changes: 0 additions & 37 deletions environment.yml

This file was deleted.

Loading