Skip to content

Commit 8cdeabf

Browse files
authored
Merge pull request #1 from 2i2c-org/minus-vc
Update template
2 parents c77ad63 + c3c1fda commit 8cdeabf

55 files changed

Lines changed: 400 additions & 4586 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.all-contributorsrc

Lines changed: 0 additions & 116 deletions
This file was deleted.

.flake8

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# flake8 is a Python linting tool run by pre-commit as declared by our
2+
# pre-commit-config.yaml file.
3+
#
4+
# This configuration is compatible with the autoformatter tool black, and
5+
# further relaxed to not bug us with too small details.
6+
#
7+
# flake8 configuration reference:
8+
# https://flake8.pycqa.org/en/latest/user/configuration.html
9+
#
10+
[flake8]
11+
max-line-length = 88
12+
extend-ignore = C, E, W
13+
14+
# Adjustments to linting the binderhub repo
15+
builtins = c, load_subconfig
16+
exclude = versioneer.py,binderhub/_version.py

.github/workflows/main.yml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,15 @@
1-
name: CI-CD
1+
name: CI
22

33
on:
44
push:
55
branches:
6-
- main
6+
- main
7+
- dev
78
pull_request:
89
branches:
9-
- main
10+
- main
11+
- dev
1012

1113
jobs:
12-
test:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python-version: ["3.10", "3.13"]
19-
20-
steps:
21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
22-
23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
28-
- name: Install dependencies
29-
run: |
30-
python -m pip install --upgrade pip
31-
python -m pip install hatch
32-
33-
- name: Test suite
34-
run: hatch run +py=${{ matrix.python-version }} test:run -- -vv -s
14+
prerequisites:
15+
uses: ./.github/workflows/test.yml

.github/workflows/test.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Test Suite
2+
3+
on:
4+
workflow_dispatch: {}
5+
workflow_call: {}
6+
7+
jobs:
8+
lint:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest]
14+
python-version: ["3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install hatch
24+
uses: pypa/hatch@install
25+
26+
# - name: Check docstrings
27+
# run: hatch run style:docstrings
28+
29+
# - name: Build documentation
30+
# run: hatch run docs:build
31+
test:
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-latest]
37+
python-version: ["3.12", "3.13", "3.14"]
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Install hatch
47+
uses: pypa/hatch@install
48+
49+
- name: Check installation
50+
run: hatch run install:check
51+
52+
- name: Check dependencies
53+
run: hatch run audit:check
54+
- name: Test suite
55+
run: hatch run +py=${{ matrix.python-version }} test:run
56+
57+
# - name: Upload coverage reports to Codecov
58+
# uses: codecov/codecov-action@v5
59+
# with:
60+
# token: ${{ secrets.CODECOV_TOKEN }}
61+
62+
- name: Check types
63+
run: hatch run types:check

template/{% if use_precommit %}.pre-commit-config.yaml{% endif %}.jinja renamed to .pre-commit-config.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
repos:
2-
{%- if use_lint %}
32
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.6.0
3+
rev: v5.0.0
54
hooks:
65
- id: check-case-conflict
76
- id: check-ast
@@ -16,29 +15,35 @@ repos:
1615
- id: debug-statements
1716
- id: end-of-file-fixer
1817
- id: trailing-whitespace
19-
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.6.0
18+
- repo: https://github.com/psf/black
19+
rev: 24.10.0
2120
hooks:
22-
- id: ruff
23-
args: ["--fix", "--exit-non-zero-on-fix"]
24-
- id: ruff-format
21+
- id: black
22+
- repo: https://github.com/pycqa/isort
23+
rev: 5.13.2
24+
hooks:
25+
- id: isort
26+
- repo: https://github.com/PyCQA/flake8
27+
rev: "7.1.1"
28+
hooks:
29+
- id: flake8
30+
- repo: https://github.com/PyCQA/autoflake
31+
rev: v2.3.1
32+
hooks:
33+
- id: autoflake
34+
args: [--remove-all-unused-imports, --in-place]
2535
- repo: https://github.com/jsh9/pydoclint
26-
rev: 0.5.6
36+
rev: 0.6.0
2737
hooks:
2838
- id: pydoclint
2939
- repo: https://github.com/python-jsonschema/check-jsonschema
30-
rev: 0.29.1
40+
rev: 0.31.0
3141
hooks:
32-
{%- if dev_platform == "GitHub" %}
3342
- id: check-github-workflows
34-
{%- elif dev_platform == "GitLab" %}
35-
- id: check-gitlab-ci
36-
{%- endif %}
3743
- id: check-readthedocs
3844
- repo: https://github.com/executablebooks/mdformat
39-
rev: 0.7.17
45+
rev: 0.7.21
4046
hooks:
4147
- id: mdformat
4248
additional_dependencies:
43-
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
44-
{%- endif %}
49+
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]

CHANGELOG.md

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,5 @@
1-
# pyOpenSci packaging template Changelog
1+
# Changelog
22

33
## [Unreleased]
44

5-
## [v0.6.8]
6-
7-
### Fixed
8-
* Bug: small bug in the release ci and update conf.py (@lwasser, #140)
9-
10-
## [v0.6.8]
11-
* Fix docs CI builds to to simplify maintenance and feedback on jobs (@lwasser, #127, #138)
12-
13-
## [v0.6.7]
14-
15-
### Fixed
16-
* Fix RTD build for Sphinx and move docs dependencies to `optional-dependencies` (@lwasser, #126, #130, #131)
17-
* Remove typing annotations in FULL template mode (@lwasser, #134)
18-
* Make `test_audit` script that doesn't fail (@erik-whiting, #120)
19-
* Remove readthedocs.io URL from pyproject.toml for minimal version (@Michael-Howes, #119)
20-
* Move all dependencies to `optional-dependencies` and use hatch features (@lwasser, #132)
21-
* bug: ensure sphinx build works by @lwasser in https://github.com/pyOpenSci/pyos-package-template/pull/130
22-
* Move all dependencies to `optional.deps` and use hatch features (@lwasser, #131)
23-
24-
### Added
25-
* Add and configure Dependabot (@agriyakhetarpal, #79)
26-
27-
### Contributors
28-
* @erik-whiting made their first contribution in #120
29-
* @Michael-Howes made their first contribution in #119
30-
* @agriyakhetarpal made their first contribution in #79
31-
* @dependabot[bot] made their first contribution in #128
32-
33-
## New Contributors
34-
* @erik-whiting made their first contribution in https://github.com/pyOpenSci/pyos-package-template/pull/120
35-
* @Michael-Howes made their first contribution in https://github.com/pyOpenSci/pyos-package-template/pull/119
36-
* @agriyakhetarpal made their first contribution in https://github.com/pyOpenSci/pyos-package-template/pull/79
37-
38-
39-
## [0.6.0]
40-
41-
### Added
42-
43-
* Update release workflow to follow PyPA / PyPI recommended practices (@lwasser, #48)
44-
* development instructions for hatch envt by @lwasser in #115
45-
* uv by @lwasser in #116
5+
- Upcoming features and fixes

0 commit comments

Comments
 (0)