Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Mar 4, 2024
1 parent 7215e84 commit 6cace68
Show file tree
Hide file tree
Showing 18 changed files with 216 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "15ee26df315020399731c6291d61bef81a3fc5d3",
"commit": "e4ec95f4cfd03d4af0a8604d462ee11d07d63b42",
"context": {
"cookiecutter": {
"project_name": "dvc-render",
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"
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 0

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

Expand Down
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@v4
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@v3
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
51 changes: 26 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,39 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ['3.8', '3.9', '3.10', '3.11']
pyv: ['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@v4
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.4
- name: Upload coverage report
uses: codecov/codecov-action@v3

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

- name: Build docs
run: nox -s docs

- name: Build docs
run: nox -s docs
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@v4
- 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
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ 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.1.7'
rev: 'v0.3.0'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -30,3 +29,10 @@ repos:
hooks:
- id: codespell
additional_dependencies: ["tomli"]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-toml
args: [--autofix, --no-sort]
- id: pretty-format-yaml
args: [--autofix, --indent, '2', '--offset', '2', --preserve-quotes]
24 changes: 12 additions & 12 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ extra:
link: https://github.com/iterative/

plugins:
- search
- gen-files:
scripts:
- docs/gen_ref_pages.py
- section-index
- mkdocstrings:
handlers:
python:
rendering:
show_submodules: no
watch:
- src/dvc_render
- search
- gen-files:
scripts:
- docs/gen_ref_pages.py
- section-index
- mkdocstrings:
handlers:
python:
rendering:
show_submodules: no
watch:
- src/dvc_render
3 changes: 2 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Automation using nox."""

import glob
import os

Expand All @@ -15,7 +16,7 @@ def docs(session: nox.Session) -> None:
session.run("mkdocs", "build")


@nox.session(python=["3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9"])
@nox.session(python=["3.9", "3.10", "3.11", "3.12", "pypy3.9"])
def tests(session: nox.Session) -> None:
session.install(".[tests]")
session.run(
Expand Down
Loading

0 comments on commit 6cace68

Please sign in to comment.