Skip to content

Commit

Permalink
Merge branch 'main' into bandit
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Jul 10, 2024
2 parents 89afea0 + 39d5cf2 commit 3b0af49
Show file tree
Hide file tree
Showing 294 changed files with 21,951 additions and 7,273 deletions.
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[run]
relative_files = True

[report]
include =
src/design/*
*/src/design/*
omit =
*/test*
*/upgrades/*
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CHANGES.rst merge=union
CHANGES.rst merge=union
8 changes: 4 additions & 4 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: [3.11]

steps:
# git checkout
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

# python cache
- uses: actions/cache@v1
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/test.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Tests
on:
push:
branches: ["main", "v5.x"]
pull_request:
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
config:
# [Python version, tox env]
# - ["2.7", "py27-plone52"]
# - ["3.7", "py37-plone52"]
- ["3.8", "py38-plone60"]
- ["3.9", "py39-plone60"]
- ["3.10", "py310-plone60"]
- ["3.11", "py311-plone60"]
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
eggs
.tox
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Upload coverage data to coveralls.io
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.config[1] }}
COVERALLS_PARALLEL: true

coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Finished
run: |
pip install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 0 additions & 27 deletions .github/workflows/toc.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.python-version
.coverage
coverage.json
*.egg-info
*.log
*.mo
Expand Down Expand Up @@ -30,6 +31,7 @@ log.html
output.xml
pip-selfcheck.json
report.html
.idea/
.vscode/
.tox/
reports/
Expand All @@ -44,3 +46,4 @@ reports/
!src/.bandit
pyvenv.cfg
.Python
.history/
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile = plone
55 changes: 55 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

default_language_version:
python: python3.9

default_stages: [commit, push]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
# args: ["--line-length=88", "--check", "--diff", "--force-exclude=migrations", "src/"]
args: ["--line-length=88", "--force-exclude=migrations", "src/"]
types: [python]
entry: black
- repo: https://github.com/PyCQA/flake8.git
rev: "7.0.0"
hooks:
- id: flake8
name: flake8
entry: flake8
additional_dependencies: ["flake8-django==0.0.4", "pylint-django==2.0.11"]
types: [python]
args: ["--max-complexity=30", "--max-line-length=88", "--ignore=DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--multi-line=3", "--lbt=1", "--trailing-comma", "--force-grid-wrap=0", "--use-parentheses", "--ensure-newline-before-comments", "--line-length=88"]
- repo: local
hooks:
- id: python-check-pdb
name: check pdb
description: 'PDB check inside code'
entry: '^\s?[^#]+\.set_trace\(\)'
language: pygrep
types: [python]
- repo: https://github.com/collective/zpretty
rev: 3.1.0
hooks:
- id: zpretty
name: zpretty
- repo: https://github.com/regebro/pyroma
rev: '4.2'
hooks:
- id: pyroma
Loading

0 comments on commit 3b0af49

Please sign in to comment.