Skip to content

Commit

Permalink
Configuring with plone/meta
Browse files Browse the repository at this point in the history
  • Loading branch information
gforcada committed Jan 21, 2024
1 parent 80af290 commit 51a36ec
Show file tree
Hide file tree
Showing 8 changed files with 183 additions and 33 deletions.
7 changes: 4 additions & 3 deletions .editorconfig
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
#
# EditorConfig Configuration file, for more details see:
Expand Down Expand Up @@ -29,13 +29,14 @@ max_line_length = off
# 4 space indentation
indent_size = 4

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

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

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
Expand Down
2 changes: 1 addition & 1 deletion .flake8
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[flake8]
doctests = 1
Expand Down
56 changes: 48 additions & 8 deletions .github/workflows/meta.yml
@@ -1,5 +1,5 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
name: Meta
on:
Expand All @@ -13,16 +13,56 @@ on:
- 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@master
uses: plone/meta/.github/workflows/qa.yml@main
test:
uses: plone/meta/.github/workflows/test.yml@master
uses: plone/meta/.github/workflows/test.yml@main
coverage:
uses: plone/meta/.github/workflows/coverage.yml@master
uses: plone/meta/.github/workflows/coverage.yml@main
dependencies:
uses: plone/meta/.github/workflows/dependencies.yml@master
release-ready:
uses: plone/meta/.github/workflows/release_ready.yml@master
uses: plone/meta/.github/workflows/dependencies.yml@main
release_ready:
uses: plone/meta/.github/workflows/release_ready.yml@main
circular:
uses: plone/meta/.github/workflows/circular.yml@master
uses: plone/meta/.github/workflows/circular.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
# """
##
7 changes: 6 additions & 1 deletion .gitignore
@@ -1,14 +1,18 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
# python related
*.egg-info
*.pyc
*.pyo

# translation related
*.mo

# tools related
build/
.coverage
.*project
coverage.xml
dist/
docs/_build
Expand All @@ -31,6 +35,7 @@ lib64
parts/
pyvenv.cfg
var/
local.cfg

# mxdev
/instance/
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
@@ -1,6 +1,6 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "7723aeaf"
commit-id = "6e36bcc4"
36 changes: 27 additions & 9 deletions .pre-commit-config.yaml
@@ -1,26 +1,26 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/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.4.0
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.12.1
hooks:
- id: black
- repo: https://github.com/collective/zpretty
rev: 3.1.0a2
rev: 3.1.0
hooks:
- id: zpretty

Expand All @@ -32,11 +32,19 @@ repos:
# """
##
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
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.4
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -58,15 +66,25 @@ repos:
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.21.2"
rev: "0.22.0"
hooks:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
- repo: https://github.com/collective/i18ndude
rev: "6.0.0"
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]
Expand Down
30 changes: 28 additions & 2 deletions pyproject.toml
@@ -1,6 +1,9 @@
# Generated from:
# https://github.com/plone/meta/tree/master/config/default
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[build-system]
requires = ["setuptools>=68.2"]

[tool.towncrier]
directory = "news/"
filename = "CHANGES.rst"
Expand Down Expand Up @@ -37,12 +40,36 @@ directory = "tests"
name = "Tests"
showcontent = true

##
# Add extra configuration options in .meta.toml:
# [pyproject]
# towncrier_extra_lines = """
# extra_configuration
# """
##

[tool.isort]
profile = "plone"

##
# Add extra configuration options in .meta.toml:
# [pyproject]
# isort_extra_lines = """
# extra_configuration
# """
##

[tool.black]
target-version = ["py38"]

##
# Add extra configuration options in .meta.toml:
# [pyproject]
# black_extra_lines = """
# extra_configuration
# """
##

[tool.codespell]
ignore-words-list = "discreet,"
skip = "*.po,"
Expand Down Expand Up @@ -101,7 +128,6 @@ python-dateutil = ['dateutil']
# "gitpython = ['git']",
# "pygithub = ['github']",
# ]
# """
##

[tool.check-manifest]
Expand Down

0 comments on commit 51a36ec

Please sign in to comment.