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
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: [huxuan]
github:
- huxuan
3 changes: 2 additions & 1 deletion .github/FUNDING.yml.jinja
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: [{{ repo_namespace }}]
github:
- {{ repo_namespace }}
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@
name: CI

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
cache: pip
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: make dev-lint
- run: make lint
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
cache: pip
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: make dev-tests
- run: make tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.python-version }}
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
name: CI
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
20 changes: 9 additions & 11 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -15,11 +6,18 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"
cache: pip
python-version: 3.x
- run: make dev-package
- run: make build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
name: Upload Python Package
on:
release:
types:
- published
permissions:
contents: read
17 changes: 7 additions & 10 deletions .github/workflows/readthedocs-preview.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: serious-scaffold-python
name: Read the Docs Pull Request Preview

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "serious-scaffold-python"
17 changes: 7 additions & 10 deletions .github/workflows/readthedocs-preview.yml.jinja
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: {{ repo_name }}
name: Read the Docs Pull Request Preview

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
documentation-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "{{ repo_name }}"
96 changes: 52 additions & 44 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- hooks:
- id: check-added-large-files
- id: check-docstring-first
- id: check-json
Expand All @@ -14,55 +12,65 @@ repos:
- id: mixed-line-ending
- id: name-tests-test
- id: no-commit-to-branch
stages: [push]
- id: pretty-format-json
args: [--autofix]
- id: requirements-txt-fixer
args:
[
constraints/default.txt,
requirements.txt,
requirements/docs.txt,
requirements/lint.txt,
requirements/package.txt,
requirements/tests.txt,
]
- id: sort-simple-yaml
files: .pre-commit-config.yaml
stages:
- push
- args:
- '--autofix'
id: pretty-format-json
- args:
- constraints/default.txt
- requirements.txt
- requirements/docs.txt
- requirements/lint.txt
- requirements/package.txt
- requirements/tests.txt
id: requirements-txt-fixer
- files: .pre-commit-config.yaml
id: sort-simple-yaml
- id: trailing-whitespace
- repo: local
hooks:
- id: black
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- hooks:
- entry: pipenv run python -m black
id: black
language: system
name: black
types:
- python
- args:
- '--filter-files'
entry: pipenv run python -m isort
id: isort
language: system
entry: pipenv run python -m black
types: [python]
- id: isort
name: isort
language: system
entry: pipenv run python -m isort
require_serial: true
types_or: [cython, pyi, python]
args: ["--filter-files"]
- id: mypy
name: mypy
types_or:
- cython
- pyi
- python
- entry: make mypy
id: mypy
language: system
entry: make mypy
types: [python]
require_serial: true
name: mypy
pass_filenames: false
- id: ruff
require_serial: true
types:
- python
- entry: pipenv run python -m ruff
id: ruff
language: system
name: ruff
types:
- python
- entry: pipenv run toml-sort -a -i
id: toml-sort
language: system
entry: pipenv run python -m ruff
types: [python]
- id: toml-sort
name: toml-sort
language: system
entry: pipenv run toml-sort -a -i
types: [toml]
- id: forbidden-files
name: forbidden files
entry: found Copier update rejection files; review them and remove them
types:
- toml
- entry: found Copier update rejection files; review them and remove them
files: \.rej$
id: forbidden-files
language: fail
files: "\\.rej$"
name: forbidden files
repo: local
12 changes: 5 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
version: 2

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

python: '3'
python:
install:
- method: pip
path: .
extra_requirements:
- extra_requirements:
- docs
method: pip
path: .
version: 2
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"recommendations": [
"PascalReitermann93.vscode-yaml-sort",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"ms-python.black-formatter",
"ms-python.python",
"richie5um2.vscode-sort-json",
"shuworks.vscode-table-formatter",
"streetsidesoftware.code-spell-checker",
"trond-snekvik.simple-rst"
]
Expand Down
20 changes: 19 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[yaml]": {
"editor.defaultFormatter": "PascalReitermann93.vscode-yaml-sort"
},
"cSpell.words": [
"autofix",
"automodule",
Expand Down Expand Up @@ -58,5 +61,20 @@
"sortJSONTypeReverse": false,
"sortJSONValues": false,
"sortJSONValuesReverse": false
}
},
"vscode-yaml-sort.customSortKeywords_2": [
"_exclude",
"project_name",
"project_description",
"repo_namespace",
"author_name",
"author_email",
"repo_name",
"package_name",
"module_name"
],
"vscode-yaml-sort.noCompatMode": true,
"vscode-yaml-sort.sortOnSave": 2,
"vscode-yaml-sort.useAsFormatter": true,
"vscode-yaml-sort.useLeadingDashes": false
}
Loading