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 Jul 2, 2024
1 parent 3e8211e commit ef61dd6
Show file tree
Hide file tree
Showing 10 changed files with 227 additions and 96 deletions.
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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 All @@ -13,7 +13,8 @@
root = true


[*] # For All Files
[*]
# Default settings for all files.
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
Expand All @@ -29,13 +30,15 @@ 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
Original file line number Diff line number Diff line change
@@ -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
66 changes: 58 additions & 8 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -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,66 @@ 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
with:

py-versions: '["3.12", "3.11", "3.10", "3.9", "3.8"]'
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"
##

##
# To test against a specific matrix of python versions
# when running tests jobs, add in .meta.toml:
# [github]
# py_versions = "['3.12', '3.11']"
##


##
# Specify additional jobs in .meta.toml:
# [github]
# extra_lines = """
# another:
# uses: org/repo/.github/workflows/file.yml@main
# """
##
28 changes: 0 additions & 28 deletions .github/workflows/tests.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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 @@ -24,12 +28,14 @@ eggs/
.eggs/
etc/
.installed.cfg
include/
lib/
lib64
.mr.developer.cfg
parts/
pyvenv.cfg
var/
local.cfg

# mxdev
/instance/
Expand Down
25 changes: 5 additions & 20 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
# 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 = "237ff4c8"
commit-id = "4b86f8f1"

[pyproject]
dependencies_ignores = "['zope.testing']"
codespell_ignores = "whit"

[tox]
envlist_lines = """
py38,
py39,
py310,
py311,
pypy,
pypy3,
"""
config_lines = """
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy3.9: pypy3
"""
[github]
py_versions = "[\"3.12\", \"3.11\", \"3.10\", \"3.9\", \"3.8\"]"
20 changes: 19 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
ci:
autofix_prs: false
Expand Down Expand Up @@ -35,6 +35,14 @@ repos:
rev: 7.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.3.0
hooks:
Expand Down Expand Up @@ -67,6 +75,16 @@ repos:
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
11 changes: 11 additions & 0 deletions dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Generated from:
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
43 changes: 38 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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,14 +40,38 @@ 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,"
ignore-words-list = "discreet,assertin,whit"
skip = "*.po,"
##
# Add extra configuration options in .meta.toml:
Expand Down Expand Up @@ -102,26 +129,32 @@ ignore-packages = ['zope.testing']
# "gitpython = ['git']",
# "pygithub = ['github']",
# ]
# """
##

[tool.check-manifest]
ignore = [
".editorconfig",
".flake8",
".meta.toml",
".pre-commit-config.yaml",
"tox.ini",
".flake8",
"dependabot.yml",
"mx.ini",
"tox.ini",

]

##
# Add extra configuration options in .meta.toml:
# [pyproject]
# check_manifest_ignores = """
# "*.map.js",
# "*.pyc",
# """
# check_manifest_extra_lines = """
# ignore-bad-ideas = [
# "some/test/file/PKG-INFO",
# ]
# """
##


Expand Down
Loading

0 comments on commit ef61dd6

Please sign in to comment.