diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index d188e91..360b72f 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -100,7 +100,7 @@ jobs: - name: Run tests run: | - pytest --disable-warnings src/plone_edu/tests + pytest --disable-warnings tests release: runs-on: ubuntu-latest diff --git a/backend/.flake8 b/backend/.flake8 new file mode 100644 index 0000000..1165a53 --- /dev/null +++ b/backend/.flake8 @@ -0,0 +1,22 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +# See the inline comments on how to expand/tweak this configuration file +[flake8] +doctests = 1 +ignore = + # black takes care of line length + E501, + # black takes care of where to break lines + W503, + # black takes care of spaces within slicing (list[:]) + E203, + # black takes care of spaces after commas + E231, + +## +# Add extra configuration options in .meta.toml: +# [flake8] +# extra_lines = """ +# _your own configuration lines_ +# """ +## \ No newline at end of file diff --git a/backend/.pre-commit-config.yaml b/backend/.pre-commit-config.yaml new file mode 100644 index 0000000..f13d059 --- /dev/null +++ b/backend/.pre-commit-config.yaml @@ -0,0 +1,94 @@ +# Generated from: +# https://github.com/plone/meta/tree/master/config/default +# See the inline comments on how to expand/tweak this configuration file +ci: + autofix_prs: false + autoupdate_schedule: monthly + +repos: +- repo: https://github.com/asottile/pyupgrade + rev: v3.15.0 + hooks: + - id: pyupgrade + args: [--py38-plus] +- repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort +- repo: https://github.com/psf/black + rev: 23.10.1 + hooks: + - id: black +- repo: https://github.com/collective/zpretty + rev: 3.1.0 + hooks: + - id: zpretty + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# zpretty_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/PyCQA/flake8 + rev: 6.1.0 + hooks: + - id: flake8 + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# flake8_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# codespell_extra_lines = """ +# _your own configuration lines_ +# """ +## +- repo: https://github.com/mgedmin/check-manifest + rev: "0.49" + hooks: + - id: check-manifest +- repo: https://github.com/regebro/pyroma + rev: "4.2" + hooks: + - id: pyroma +- repo: https://github.com/mgedmin/check-python-versions + rev: "0.22.0" + hooks: + - id: check-python-versions + args: ['--only', 'setup.py,pyproject.toml'] +- repo: https://github.com/collective/i18ndude + rev: "6.1.0" + hooks: + - id: i18ndude + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# i18ndude_extra_lines = """ +# _your own configuration lines_ +# """ +## + + +## +# Add extra configuration options in .meta.toml: +# [pre_commit] +# extra_lines = """ +# _your own configuration lines_ +# """ +## diff --git a/backend/Makefile b/backend/Makefile index a61b562..4c429ab 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -8,6 +8,8 @@ SHELL:=bash MAKEFLAGS+=--warn-undefined-variables MAKEFLAGS+=--no-builtin-rules +CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + # We like colors # From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects RED=`tput setaf 1` diff --git a/backend/src/plone/edu/__init__.py b/backend/src/plone/edu/__init__.py index 9000961..26a0f20 100644 --- a/backend/src/plone/edu/__init__.py +++ b/backend/src/plone/edu/__init__.py @@ -4,7 +4,6 @@ from plone.app.dexterity.textindexer import utils from zope.i18nmessageid import MessageFactory - import logging diff --git a/backend/version.txt b/backend/version.txt new file mode 100644 index 0000000..cb372c0 --- /dev/null +++ b/backend/version.txt @@ -0,0 +1 @@ +6.0.11 \ No newline at end of file