Skip to content

Commit

Permalink
Merge pull request #406 from collective/config-with-default-template-…
Browse files Browse the repository at this point in the history
…fe7a1752

Config with default template fe7a1752
  • Loading branch information
wesleybl authored Nov 7, 2023
2 parents 1fc442c + c804a66 commit 640543d
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 13 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ indent_size = 2
[*.{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)
Expand Down
42 changes: 41 additions & 1 deletion .github/workflows/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ 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@main
Expand All @@ -22,7 +32,37 @@ jobs:
uses: plone/meta/.github/workflows/coverage.yml@main
dependencies:
uses: plone/meta/.github/workflows/dependencies.yml@main
release-ready:
release_ready:
uses: plone/meta/.github/workflows/release_ready.yml@main
circular:
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
# """
##
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
*.pyc
*.pyo

# translation related
*.mo

# tools related
build/
.coverage
.*project
coverage.xml
dist/
docs/_build
Expand Down
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "cfffba8c"
commit-id = "fe7a1752"

[pre_commit]
codespell_extra_lines = """
Expand Down
24 changes: 17 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.14.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -16,11 +16,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/collective/zpretty
rev: 3.1.0a2
rev: 3.1.0
hooks:
- id: zpretty

Expand All @@ -32,7 +32,7 @@ repos:
# """
##
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8

Expand All @@ -44,7 +44,7 @@ repos:
# """
##
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
Expand All @@ -67,15 +67,25 @@ repos:
hooks:
- id: pyroma
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.21.2"
rev: "0.21.3"
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
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Changelog
- Complete spanish translation.
[erral]

- Compelete basque translation.
- Complete basque translation.
[erral]

- Include plone.app.caching translations.
Expand Down
Empty file added news/.gitkeep
Empty file.
2 changes: 2 additions & 0 deletions news/fe7a1752.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update configuration files.
[plone devs]
4 changes: 3 additions & 1 deletion 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
# 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 @@ -125,7 +128,6 @@ python-dateutil = ['dateutil']
# "gitpython = ['git']",
# "pygithub = ['github']",
# ]
# """
##

[tool.check-manifest]
Expand Down
31 changes: 29 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ commands =
echo "Unrecognized environment name {envname}"
false

##
# Add extra configuration options in .meta.toml:
# [tox]
# testenv_options = """
# basepython = /usr/bin/python3.8
# """
##

[testenv:init]
description = Prepare environment
skip_install = true
commands =
echo "Initial setup complete"


[testenv:format]
description = automatically reformat code
skip_install = true
Expand All @@ -58,7 +73,7 @@ deps =
build
z3c.dependencychecker==2.11
commands =
python -m build --sdist --no-isolation
python -m build --sdist
dependencychecker

[testenv:dependencies-graph]
Expand Down Expand Up @@ -86,11 +101,20 @@ set_env =
# test_environment_variables = """
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
# """
#
# Set constrain_package_deps .meta.toml:
# [tox]
# constrain_package_deps = "false"
##
deps =
zope.testrunner
-c https://dist.plone.org/release/6.0-dev/constraints.txt

##
# Specify additional deps in .meta.toml:
# [tox]
# test_deps_additional = "-esources/plonegovbr.portal_base[test]"
#
# Specify a custom constraints file in .meta.toml:
# [tox]
# constraints_file = "https://my-server.com/constraints.txt"
Expand Down Expand Up @@ -128,6 +152,7 @@ deps =
coverage
zope.testrunner
-c https://dist.plone.org/release/6.0-dev/constraints.txt

commands =
coverage run --branch --source plone.app.locales {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.app.locales {posargs}
coverage report -m --format markdown
Expand All @@ -144,12 +169,13 @@ deps =
build
towncrier
-c https://dist.plone.org/release/6.0-dev/constraints.txt

commands =
# fake version to not have to install the package
# we build the change log as news entries might break
# the README that is displayed on PyPI
towncrier build --version=100.0.0 --yes
python -m build --sdist --no-isolation
python -m build --sdist
twine check dist/*

[testenv:circular]
Expand All @@ -171,6 +197,7 @@ deps =
pipdeptree
pipforester
-c https://dist.plone.org/release/6.0-dev/constraints.txt

commands =
# Generate the full dependency tree
sh -c 'pipdeptree -j > forest.json'
Expand Down

0 comments on commit 640543d

Please sign in to comment.