Skip to content

Commit

Permalink
Configuring with plone/meta
Browse files Browse the repository at this point in the history
  • Loading branch information
petschki committed Nov 22, 2023
1 parent 6c53806 commit e4df8a4
Show file tree
Hide file tree
Showing 39 changed files with 969 additions and 405 deletions.
49 changes: 44 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,54 @@
[*]
indent_style = space
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# See the inline comments on how to expand/tweak this configuration file
#
# 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
# file types

# top-most EditorConfig file:
# 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
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[{*.py,*.cfg}]
[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

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

[Makefile]
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss,html}] # Frontend development
# 2 space indentation
indent_size = 2
max_line_length = 80

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset


##
# Add extra configuration options in .meta.toml:
# [editorconfig]
# extra_lines = """
# _your own configuration lines_
# """
##
22 changes: 22 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -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_
# """
##
60 changes: 60 additions & 0 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# See the inline comments on how to expand/tweak this configuration file
name: Meta
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

##
# To set environment variables for all jobs, add in .meta.toml:
# [github]
# env = """
# debug: 1
# image-name: 'org/image'
# image-tag: 'latest'
# """
##

jobs:
qa:
uses: plone/meta/.github/workflows/qa.yml@main
release_ready:
uses: plone/meta/.github/workflows/release_ready.yml@main

##
# To modify the list of default jobs being created add in .meta.toml:
# [github]
# jobs = [
# "qa",
# "test",
# "coverage",
# "dependencies",
# "release_ready",
# "circular",
# ]
##

##
# To request that some OS level dependencies get installed
# when running tests/coverage jobs, add in .meta.toml:
# [github]
# os_dependencies = "git libxml2 libxslt"
##


##
# Specify additional jobs in .meta.toml:
# [github]
# extra_lines = """
# another:
# uses: org/repo/.github/workflows/file.yml@main
# """
##
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- "6.0-dev"

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

- name: Setup Plone ${{ matrix.plone }} with Python ${{ matrix.python }}
id: setup
uses: plone/setup-plone@v1.0.0
uses: plone/setup-plone@v2.0.0
with:
python-version: ${{ matrix.python }}
plone-version: ${{ matrix.plone }}
Expand All @@ -41,7 +41,7 @@ jobs:
make VENV=off lint
- name: Install Chromedriver
uses: nanasess/setup-chromedriver@v1
uses: nanasess/setup-chromedriver@v2

- name: Start Browser
run: |
Expand Down
97 changes: 49 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
*.py[co]
*.mo
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# See the inline comments on how to expand/tweak this configuration file
# python related
*.egg-info
*.egg
*.EGG
*.EGG-INFO
build
downloads/*
eggs/*
fake-eggs/*
node_modules/*
parts/*
develop-eggs
dist
.installed.cfg
.mr.developer.cfg
.hg
.bzr
.svn
*.pyc
*.pyo
*.LCK
*.lck
*~
*.bak

# translation related
*.mo

# tools related
build/
.coverage
.coverage.*
*.pyd
*.so
*.orig
*.rej
.metadata
.secret.cfg
.settings
.project
.pydevproject
.DS_Store
venv
bin
devsrc
buildout-cache
lib*
local
include
var
buildout.cfg
pip-selfcheck.json
reports
.idea
src/plone*
.*project
coverage.xml
dist/
docs/_build
__pycache__/
.tox
.vscode/
node_modules/

# venv / buildout related
bin/
develop-eggs/
eggs/
.eggs/
etc/
.installed.cfg
include/
lib/
lib64
.mr.developer.cfg
parts/
pyvenv.cfg
share/
.make-sentinels/
var/

# mxdev
/instance/
/.make-sentinels/
/*-mxdev.txt
/reports/
/sources/
/venv/
.installed.txt

test_*
robot_*
forest.*

##
# Add extra configuration options in .meta.toml:
# [gitignore]
# extra_lines = """
# _your own configuration lines_
# """
##
22 changes: 22 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -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
[meta]
template = "default"
commit-id = "8c30aa23"

[pyproject]
codespell_skip = "*.js,*.min.js,*.min.js.map,*.css.map,yarn.lock,robot_*,test_*"

[gitignore]
extra_lines = """
test_*
robot_*
forest.*
"""

[github]
jobs = [
"qa",
"release_ready",
]
94 changes: 94 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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_
# """
##
Loading

0 comments on commit e4df8a4

Please sign in to comment.