-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: Update pre-commit * ci: Run ruff formatter * build: Move package in to src dir * test: Update requirements building * chore: Keeping git happy after moving to src * ci: Add dependabot config * ci: Update tests to run tox * build: Project config * test: Update tox setup * build: Update setup to build_meta * ci: Update pypi workflows * ci: Update linter to ruff * chore: Fix RUF012 * ci: Update linter trigger * chore: Drop python 3.8 * chore: Drop python 3.8 * chore: Adjust coverage config
- Loading branch information
Showing
197 changed files
with
1,664 additions
and
454 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,30 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
flake8: | ||
name: flake8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install flake8 | ||
run: pip install --upgrade flake8 | ||
- name: Run flake8 | ||
uses: liskin/gh-problem-matcher-wrap@v1 | ||
with: | ||
linters: flake8 | ||
run: flake8 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
isort: | ||
jobs: | ||
ruff: | ||
name: ruff | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- run: python -m pip install isort | ||
- name: isort | ||
uses: liskin/gh-problem-matcher-wrap@v1 | ||
uses: actions/setup-python@v4 | ||
with: | ||
linters: isort | ||
run: isort -c -rc -df djangocms_snippet | ||
python-version: "3.11" | ||
cache: 'pip' | ||
- run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
- name: Run Ruff | ||
working-directory: ./src | ||
run: ruff djangocms_snippet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,79 @@ | ||
name: CodeCov | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ${{ matrix.os }} | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
dj22_cms37.txt, | ||
dj22_cms38.txt, | ||
dj30_cms37.txt, | ||
dj30_cms38.txt, | ||
dj31_cms38.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
python-version: | ||
- 3.9 | ||
- '3.10' | ||
- '3.11' | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
- uses: actions/checkout@v4 | ||
|
||
uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
cache: pip | ||
cache-dependency-path: 'tests/requirements/*.txt' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tests/requirements/${{ matrix.requirements-file }} | ||
python setup.py install | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade 'tox>=4.0.0rc3' | ||
- name: Run tox targets for ${{ matrix.python-version }} | ||
run: tox run -f py$(echo ${{ matrix.python-version }} | tr -d .) | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-data | ||
path: '.coverage.*' | ||
|
||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-22.04 | ||
needs: unit-tests | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: python -m pip install --upgrade coverage[toml] | ||
|
||
- name: Download data | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-data | ||
|
||
- name: Run coverage | ||
run: coverage run setup.py test | ||
- name: Combine coverage | ||
run: | | ||
python -m coverage combine | ||
python -m coverage html --skip-covered --skip-empty | ||
python -m coverage report | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
- name: Upload HTML report | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: html-report | ||
path: htmlcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,50 @@ | ||
ci: | ||
autofix_commit_msg: | | ||
ci: auto fixes from pre-commit hooks | ||
for more information, see https://pre-commit.ci | ||
autofix_prs: true | ||
autoupdate_commit_msg: 'ci: pre-commit autoupdate' | ||
autoupdate_schedule: monthly | ||
|
||
repos: | ||
# Need to drop python 3.5 and 3.6 before we include python upgrade | ||
# - repo: https://github.com/asottile/pyupgrade | ||
# rev: v2.31.0 | ||
# hooks: | ||
# - id: pyupgrade | ||
# args: ["--py37-plus"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.4.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py38-plus"] | ||
|
||
- repo: https://github.com/adamchainz/django-upgrade | ||
rev: '1.6.1' | ||
rev: '1.13.0' | ||
hooks: | ||
- id: django-upgrade | ||
args: [--target-version, "2.2"] | ||
args: [--target-version, "3.2"] | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.0.270" | ||
hooks: | ||
- id: flake8 | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.3.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.2 | ||
hooks: | ||
- id: yesqa | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: mixed-line-ending | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v1.3.0 | ||
# hooks: | ||
# - id: mypy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
prune tests | ||
include CHANGELOG.rst | ||
include LICENSE | ||
include pyproject.toml | ||
include README.rst | ||
recursive-include djangocms_snippet/locale * | ||
recursive-include djangocms_snippet/templates * | ||
recursive-exclude * *.py[co] | ||
include src/*/py.typed |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.