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

Config with default template #509

Closed
wants to merge 11 commits into from
Closed
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
8 changes: 6 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# EditorConfig Configurtaion file, for more details see:
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
Expand All @@ -8,6 +11,7 @@
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
Expand All @@ -24,7 +28,7 @@ max_line_length = off
# 4 space indentation
indent_size = 4

[*.{yml}]
[*.{yml,zpt,pt,dtml,zcml}]
# 2 space indentation
indent_size = 2

Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/black.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
name: Coverage
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
coverage:
uses: plone/meta/.github/workflows/coverage.yml@master
8 changes: 5 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:

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

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -23,10 +23,12 @@ jobs:
pip install tox tox-gh-actions

# python cache
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Test with tox
run: |
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/isort.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/plone_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.8", "3.9"]
plone-version: ["5.2", "6.0"]

steps:
- uses: actions/checkout@v3
- name: Install system libraries
run: sudo apt-get install libxml2-dev libxslt1-dev libjpeg-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
171 changes: 171 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
[meta]
template = "default"
commit-id = "54c96fb5"

[editorconfig]
extra_lines = """
[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false"""

[setup]
check_manifest_ignore = """
*.cfg
constraints_plone52.txt
constraints_plone60.txt
constraints.txt
fix-converted-myst.py
Makefile
netlify.toml
requirements-docs.txt
requirements.txt"""
extra_lines = """
[coverage:run]
branch = True
source =
src

omit =
*.rst
*/doctests/*
*/tests/*

[coverage:report]
precision = 2
include = src
omit =
*.rst
*/doctests/*
*/tests/*

[coverage:html]
directory = _build/coverage"""

[tox]
envlist_lines = """
py{38,39}-plone{52}
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not test Plone 5.2 on Python 3.9. But that is already happening on current master I think, so could be handled separately.

py{38,39}-plone{60}
# towncrier
# coverage-report
linkcheck
plone6docs
docs"""
config_lines = "skip_missing_interpreters = True"
testenv_lines = "skip_install = True"
extra_lines = """
[gh-actions]
python =
3.8: py38
3.9: py39

[gh-actions:env]
PLONE =
52: plone52
60: plone60

commands =
python -VV
pip install -r requirements.txt
pip list
{envbindir}/buildout -c /{toxinidir}/{env:BUILDOUT_FILE} buildout:directory={envdir} buildout:develop={toxinidir} install test
{envbindir}/buildout -c {toxinidir}/{env:BUILDOUT_FILE} buildout:directory={envdir} buildout:develop={toxinidir} annotate
{envbindir}/test

setenv =
BUILDOUT_FILE=test_plone-60.cfg
plone52: BUILDOUT_FILE=test_plone-52.cfg

deps =
pdbpp
manuel

[testenv:coverage-report]
basepython = python3.9
deps = coverage

setenv =
COVERAGE_FILE=.coverage

skip_install = True

commands =
python -VV
coverage erase
coverage combine
coverage report
coverage html
coverage xml

[testenv:plone6docs]
# New docs with sphinx-book-theme
# See [testenv:docs] for classic documentation
basepython = python3.9
skip_install = False
usedevelop = True
extras =
tests

deps =
-r requirements-docs.txt

commands =
python -VV
mkdir -p {toxinidir}/_build/plone6docs
sphinx-build -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html

allowlist_externals =
mkdir


[testenv:docs]
basepython = python3.9
skip_install = False
usedevelop = True
extras =
tests

deps =
-r requirements-docs.txt

commands =
python -VV
mkdir -p {toxinidir}/_build/docs
sphinx-build -b html -D html_theme=alabaster -d _build/docs/doctrees docs _build/docs/html

allowlist_externals =
mkdir


[testenv:linkcheck]
basepython = python
skip_install = False
usedevelop = True
extras =
{[testenv:plone6docs]extras}
deps =
{[testenv:plone6docs]deps}
commands =
python -VV
mkdir -p {toxinidir}/_build/plone6docs
sphinx-build -b linkcheck -d _build/plone6docs/doctrees docs _build/plone6docs/linkcheck
allowlist_externals =
mkdir


[testenv:towncrier]
basepython = python
skip_install = True

deps=
towncrier

commands =
towncrier --draft"""

[pre_commit]
codespell_extra_lines = " exclude: .*\\.po(t)*$"
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
ci:
autofix_prs: false
autoupdate_schedule: monthly

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.2
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.3.0
hooks:
- id: black
- repo: https://github.com/collective/zpretty
rev: 3.0.4
hooks:
- id: zpretty
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude: .*\.po(t)*$
- 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
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ Bug fixes:
- Simplify the ``plone.api.content.delete`` method.
[thet]

- content.copy with safe_id=False should raise it's own exeception. Fixes #340
- content.copy with safe_id=False should raise it's own exception. Fixes #340
[jaroel]


Expand Down
Loading