Skip to content

Commit

Permalink
Config with default template 721299ce (#3)
Browse files Browse the repository at this point in the history
* Configuring with plone/meta

* meta fixup

* deps

* manifest

* readme

* black

* black
  • Loading branch information
mamico authored May 20, 2024
1 parent 50beb09 commit c936401
Show file tree
Hide file tree
Showing 16 changed files with 114 additions and 113 deletions.
10 changes: 6 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,11 +30,12 @@ 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
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
17 changes: 13 additions & 4 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -1,16 +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
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]
Expand All @@ -32,8 +34,8 @@ jobs:
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@main
circular:
uses: plone/meta/.github/workflows/circular.yml@main

##
# To modify the list of default jobs being created add in .meta.toml:
Expand All @@ -55,6 +57,13 @@ jobs:
# 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:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
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
# python related
*.egg-info
Expand Down Expand Up @@ -35,6 +35,7 @@ lib64
parts/
pyvenv.cfg
var/
local.cfg

# mxdev
/instance/
Expand All @@ -44,7 +45,7 @@ var/
/sources/
/venv/
.installed.txt
forest.*


##
# Add extra configuration options in .meta.toml:
Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -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 = "8c30aa23"
commit-id = "721299ce"
17 changes: 6 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 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.15.0
rev: v3.15.2
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.10.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/collective/zpretty
Expand All @@ -32,7 +32,7 @@ repos:
# """
##
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8

Expand Down Expand Up @@ -71,15 +71,10 @@ repos:
- id: check-python-versions
args: ['--only', 'setup.py,pyproject.toml']
- repo: https://github.com/collective/i18ndude
rev: "6.1.0"
rev: "6.2.0"
hooks:
- id: i18ndude

- repo: https://github.com/PyCQA/bandit
rev: "1.7.5"
hooks:
- id: bandit
args: ['-c', 'pyproject.toml', '-r']

##
# Add extra configuration options in .meta.toml:
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ recursive-include tests *.py
recursive-include tests *.gitkeep
recursive-include tests *.json
recursive-include tests *.yml
recursive-include news *.gitkeep
recursive-include news *.internal
recursive-include news *.jinja
# --
include *.yml
include base.cfg
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/pas.plugins.passwordstrength)](https://pypi.org/project/pas.plugins.passwordstrength/)

[![Meta](https://github.com/mamico/pas.plugins.passwordstrength/actions/workflows/meta.yml/badge.svg)](https://github.com/mamico/pas.plugins.passwordstrength/actions/workflows/meta.yml)
[![Meta](https://github.com/RedTurtle/pas.plugins.passwordstrength/actions/workflows/meta.yml/badge.svg)](https://github.com/RedTurtle/pas.plugins.passwordstrength/actions/workflows/meta.yml)
![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)

[![GitHub contributors](https://img.shields.io/github/contributors/mamico/pas.plugins.passwordstrength)](https://github.com/mamico/pas.plugins.passwordstrength)
[![GitHub Repo stars](https://img.shields.io/github/stars/mamico/pas.plugins.passwordstrength?style=social)](https://github.com/mamico/pas.plugins.passwordstrength)
[![GitHub contributors](https://img.shields.io/github/contributors/RedTurtle/pas.plugins.passwordstrength)](https://github.com/RedTurtle/pas.plugins.passwordstrength)
[![GitHub Repo stars](https://img.shields.io/github/stars/RedTurtle/pas.plugins.passwordstrength?style=social)](https://github.com/RedTurtle/pas.plugins.passwordstrength)

# pas.plugins.passwordstrength

Expand Down Expand Up @@ -73,9 +73,9 @@ Put your name here, you deserve it!
## Contribute

- Issue Tracker:
<https://github.com/mamico/pas.plugins.passwordstrength/issues>
<https://github.com/RedTurtle/pas.plugins.passwordstrength/issues>
- Source Code:
<https://github.com/mamico/pas.plugins.passwordstrength>
<https://github.com/RedTurtle/pas.plugins.passwordstrength>
- Documentation: <https://docs.plone.org/foo/bar>

## Support
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"
1 change: 1 addition & 0 deletions news/+meta.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update configuration files @plone
29 changes: 12 additions & 17 deletions pyproject.toml
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
[build-system]
requires = ["setuptools>=68.2"]
Expand All @@ -11,7 +11,6 @@ start_string = "<!-- towncrier release notes start -->\n"
title_format = "## {version} ({project_date})"
template = "news/.changelog_template.jinja"
underlines = ["", "", ""]
issue_format = "[#{issue}](https://github.com/collective/pas.plugins.passwordstrength/issues/{issue})"

[[tool.towncrier.type]]
directory = "breaking"
Expand Down Expand Up @@ -74,8 +73,8 @@ target-version = ["py38"]
##

[tool.codespell]
ignore-words-list = "discreet,vew"
skip = "*.po,*.min.js,*.pot,*.po,*.yaml,*.json"
ignore-words-list = "discreet,"
skip = "*.po,"
##
# Add extra configuration options in .meta.toml:
# [pyproject]
Expand Down Expand Up @@ -122,8 +121,6 @@ Zope = [
'Products.CMFCore', 'Products.CMFDynamicViewFTI',
]
python-dateutil = ['dateutil']
ignore-packages = ['plone.restapi', 'plone.volto', 'zestreleaser.towncrier', 'zest.releaser', 'pytest', 'pytest-cov', 'pytest-plone', 'pytest-docker', 'pytest-vcr', 'pytest-mock', 'gocept.pytestlayer', 'requests-mock', 'vcrpy']
Plone = ['Products.CMFPlone', 'Products.CMFCore', 'Products.GenericSetup', 'Products.PluggableAuthService', 'Products.PlonePAS']

##
# Add extra configuration options in .meta.toml:
Expand All @@ -138,31 +135,29 @@ Plone = ['Products.CMFPlone', 'Products.CMFCore', 'Products.GenericSetup', 'Prod
[tool.check-manifest]
ignore = [
".editorconfig",
".flake8",
".meta.toml",
".pre-commit-config.yaml",
"tox.ini",
".flake8",
"dependabot.yml",
"mx.ini",
"news/*",
"constraints-mxdev.txt",
"requirements-mxdev.txt",
"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",
# ]
# """
##

[tool.coverage.run]
omit = ["*/locales/*"]

[tool.bandit]
targets = "src"
exclude_dirs = ["tests", "src/pas/plugins/passwordstrength/locales"]

##
# Add extra configuration options in .meta.toml:
Expand Down
24 changes: 0 additions & 24 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
[check-manifest]
ignore =
*.cfg
.coveragerc
.editorconfig
.gitattributes

[isort]
# black compatible isort rules:
profile = plone

[flake8]
# black compatible flake8 rules:
ignore =
W503,
C812,
E501
T001
C813
C101
# E203, E266
exclude = bootstrap.py,docs,*.egg.,omelette
max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4,B9

builtins = unicode,basestring
29 changes: 17 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,32 @@
python_requires=">=3.8",
install_requires=[
"setuptools",
"Plone",
"Zope",
"plone.base",
"Products.CMFPlone",
"Products.PluggableAuthService",
"Products.GenericSetup",
"plone.api",
"plone.restapi>=8.34.0",
"z3c.jbot",
],
extras_require={
"test": [
# "plone.app.testing",
# "plone.testing>=5.0.0",
"gocept.pytestlayer",
"plone.restapi>=8.34.0",
# "gocept.pytestlayer",
"plone.testing",
"plone.app.testing",
"plone.restapi[test]",
"pytest-cov",
"pytest-plone>=0.2.0",
"pytest-docker",
"pytest-mock",
"pytest",
"zest.releaser[recommended]",
"zestreleaser.towncrier",
"pytest-mock",
"requests-mock",
# "pytest-cov",
# "pytest-plone>=0.2.0",
# "pytest-docker",
# "pytest-mock",
# "pytest",
# "zest.releaser[recommended]",
# "zestreleaser.towncrier",
# "pytest-mock",
# "requests-mock",
],
},
entry_points="""
Expand Down
1 change: 1 addition & 0 deletions src/pas/plugins/passwordstrength/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Init and utils."""

from zope.i18nmessageid import MessageFactory

import logging
Expand Down
3 changes: 3 additions & 0 deletions src/pas/plugins/passwordstrength/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
from OFS.Cache import Cacheable
from pas.plugins.passwordstrength import _
from plone import api


try:
from plone.base.utils import safe_text
except ImportError:
from Products.CMFPlone.utils import safe_unicode as safe_text

from Products.PluggableAuthService.interfaces.plugins import IValidationPlugin

# from pas.plugins.passwordstrength import logger
Expand Down
Loading

0 comments on commit c936401

Please sign in to comment.