Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update template #23

Merged
merged 1 commit into from
Mar 25, 2024
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
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "c4e24f909659b6ce9c34a1da631290f0c70ff2f2",
"commit": "e4ec95f4cfd03d4af0a8604d462ee11d07d63b42",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -14,7 +14,7 @@
"copyright_year": "2022",
"license": "Apache-2.0",
"docs": "False",
"short_description": "More FSSpec filesystems",
"short_description": "A collection of self-contained fsspec-based filesystems",
"development_status": "Development Status :: 4 - Beta",
"_template": "https://github.com/iterative/py-template"
}
Expand Down
13 changes: 0 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,10 @@ updates:
interval: "weekly"
labels:
- "maintenance"
# Update via cruft
ignore:
- dependency-name: "mkdocs*"
- dependency-name: "pytest*"
- dependency-name: "pylint"
- dependency-name: "mypy"

- directory: "/"
package-ecosystem: "github-actions"
schedule:
interval: "weekly"
labels:
- "maintenance"
# Update via cruft
ignore:
- dependency-name: "actions/checkout"
- dependency-name: "actions/setup-python"
- dependency-name: "pypa/gh-action-pypi-publish"
- dependency-name: "codecov/codecov-action"
- dependency-name: "peter-evans/create-pull-request"
36 changes: 18 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Upgrade pip and nox
run: |
pip install --upgrade pip nox
pip --version
nox --version
- name: Upgrade pip and nox
run: |
pip install --upgrade pip nox
pip --version
nox --version

- name: Build package
run: nox -s build
- name: Build package
run: nox -s build

- name: Upload package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 23 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ['3.8', '3.9', '3.10', '3.11']
pyv: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- {os: ubuntu-latest, pyv: 'pypy3.8'}
- {os: ubuntu-latest, pyv: 'pypy3.8'}

steps:
- name: Check out the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.pyv }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyv }}
- name: Set up Python ${{ matrix.pyv }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyv }}

- name: Upgrade pip and nox
run: |
python -m pip install --upgrade pip nox
pip --version
nox --version
- name: Upgrade pip and nox
run: |
python -m pip install --upgrade pip nox
pip --version
nox --version

- name: Lint code and check dependencies
run: nox -s lint safety
- name: Lint code and check dependencies
run: nox -s lint safety

- name: Run tests
run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml
- name: Run tests
run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml

- name: Upload coverage report
uses: codecov/codecov-action@v3.1.1
- name: Upload coverage report
uses: codecov/codecov-action@v3

- name: Build package
run: nox -s build
- name: Build package
run: nox -s build
8 changes: 4 additions & 4 deletions .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Check out the repository
uses: actions/checkout@v4

- name: Update template
uses: iterative/py-template@main
- name: Update template
uses: iterative/py-template@main
40 changes: 12 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand All @@ -17,38 +13,26 @@ repos:
args: ['--assume-in-merge']
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.3.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: ["tomli"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.1.20
- flake8-comprehensions==3.10.1
- flake8-debugger==4.1.2
- flake8-string-format==0.3.0
- repo: https://github.com/pycqa/bandit
rev: 1.7.8
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: ["toml"]
- id: pretty-format-toml
args: [--autofix, --no-sort]
- id: pretty-format-yaml
args: [--autofix, --indent, '2', '--offset', '2', --preserve-quotes]
5 changes: 3 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
locations = "src", "tests"


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9"])
@nox.session(
python=["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"]
)
def tests(session: nox.Session) -> None:
session.install(".[tests]")
session.run(
Expand All @@ -30,7 +32,6 @@ def lint(session: nox.Session) -> None:
args = *(session.posargs or ("--show-diff-on-failure",)), "--all-files"
session.run("pre-commit", "run", *args)
session.run("python", "-m", "mypy")
session.run("python", "-m", "pylint", "src")


@nox.session
Expand Down
Loading
Loading