Skip to content

Commit

Permalink
Merge pull request #20 from plone/config-with-default-template-0039996b
Browse files Browse the repository at this point in the history
Config with default template
  • Loading branch information
jensens authored Oct 4, 2023
2 parents 32672a7 + 51a16fe commit a58538d
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ indent_size = 4
# 2 space indentation
indent_size = 2

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

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
Expand Down
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,11 @@ ignore =
E203,
# black takes care of spaces after commas
E231,

##
# Add extra configuration options in .meta.toml:
# [flake8]
# extra_lines = """
# _your own configuration lines_
# """
##
12 changes: 6 additions & 6 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ on:

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
uses: plone/meta/.github/workflows/dependencies.yml@main
release-ready:
uses: plone/meta/.github/workflows/release_ready.yml@master
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
54 changes: 49 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
# 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
*.mo
*.py?
.tox
*.pyc
*.pyo

# tools related
build/
.coverage
coverage.xml
dist/
!.gitattributes
!.gitignore
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
var/

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


##
# Add extra configuration options in .meta.toml:
# [gitignore]
# extra_lines = """
# _your own configuration lines_
# """
##
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# See the inline comments on how to expand/tweak this configuration file
[meta]
template = "default"
commit-id = "b940914a"
commit-id = "cfffba8c"
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,26 @@ repos:
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:
Expand Down
2 changes: 2 additions & 0 deletions news/cfffba8c.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update configuration files.
[plone devs]
27 changes: 26 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,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 @@ -111,9 +135,9 @@ ignore = [
".pre-commit-config.yaml",
"tox.ini",
".flake8",
"mx.ini",

]

##
# Add extra configuration options in .meta.toml:
# [pyproject]
Expand All @@ -123,6 +147,7 @@ ignore = [
# """
##


##
# Add extra configuration options in .meta.toml:
# [pyproject]
Expand Down
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
from pathlib import Path
from setuptools import find_packages
from setuptools import setup


version = "2.0.1.dev0"

long_description = (
f"{Path('README.rst').read_text()}\n{Path('CHANGES.rst').read_text()}"
)

setup(
name="plone.event",
version=version,
description="Event and calendaring related tools not bound to Plone",
long_description=(open("README.rst").read() + "\n" + open("CHANGES.rst").read()),
long_description=long_description,
long_description_content_type="text/x-rst",
# Get more strings from
# https://pypi.org/classifiers/
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Plone",
Expand Down
72 changes: 65 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ envlist =
# """
##

[testenv]
skip_install = true
allowlist_externals =
echo
false
# Make sure typos like `tox -e formaat` are caught instead of silently doing nothing.
# See https://github.com/tox-dev/tox/issues/2858.
commands =
echo "Unrecognized environment name {envname}"
false

[testenv:format]
description = automatically reformat code
skip_install = true
Expand Down Expand Up @@ -51,7 +62,8 @@ commands =
dependencychecker

[testenv:dependencies-graph]
description = generate a graph out of the package's dependencies
description = generate a graph out of the dependencies of the package
skip_install = false
allowlist_externals =
sh
deps =
Expand All @@ -63,31 +75,67 @@ commands =
[testenv:test]
description = run the distribution tests
use_develop = true
skip_install = false
constrain_package_deps = true
set_env = ROBOT_BROWSER=headlesschrome
set_env =
ROBOT_BROWSER=headlesschrome

##
# Specify extra test environment variables in .meta.toml:
# [tox]
# test_environment_variables = """
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
# """
##
deps =
zope.testrunner
-c https://dist.plone.org/release/6.0-dev/constraints.txt
##
# Specify a custom constraints file in .meta.toml:
# [tox]
# constraints_file = "https://my-server.com/constraints.txt"
##
commands =
zope-testrunner --all --test-path={toxinidir} -s plone.event {posargs}
extras =
test

##
# Add extra configuration options in .meta.toml:
# [tox]
# test_extras = """
# tests
# widgets
# """
##

[testenv:coverage]
description = get a test coverage report
use_develop = true
skip_install = false
constrain_package_deps = true
set_env = ROBOT_BROWSER=headlesschrome
set_env =
ROBOT_BROWSER=headlesschrome

##
# Specify extra test environment variables in .meta.toml:
# [tox]
# test_environment_variables = """
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
# """
##
deps =
coverage
zope.testrunner
-c https://dist.plone.org/release/6.0-dev/constraints.txt
commands =
coverage run {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.event {posargs}
coverage run --branch --source plone.event {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir} -s plone.event {posargs}
coverage report -m --format markdown
coverage xml
extras =
test


[testenv:release-check]
description = ensure that the distribution is ready to release
skip_install = true
Expand All @@ -106,7 +154,17 @@ commands =

[testenv:circular]
description = ensure there are no cyclic dependencies
usedevelop = true
use_develop = true
skip_install = false
set_env =

##
# Specify extra test environment variables in .meta.toml:
# [tox]
# test_environment_variables = """
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
# """
##
allowlist_externals =
sh
deps =
Expand All @@ -119,13 +177,13 @@ commands =
# Generate a DOT graph with the circular dependencies, if any
pipforester -i forest.json -o forest.dot --cycles
# Report if there are any circular dependencies, i.e. error if there are any
pipforester -i forest.json --check-cycles
pipforester -i forest.json --check-cycles -o /dev/null


##
# Add extra configuration options in .meta.toml:
# [tox]
# extra_lines = """
# my_other_environment
# _your own configuration lines_
# """
##

0 comments on commit a58538d

Please sign in to comment.