Skip to content

Commit

Permalink
Merge pull request #3 from collective/python3
Browse files Browse the repository at this point in the history
Python3
  • Loading branch information
tomgross authored Aug 28, 2021
2 parents aee8cf9 + ccdddc9 commit 4c2f171
Show file tree
Hide file tree
Showing 20 changed files with 376 additions and 349 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: collective.handlebars CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.7, 2.7]
plone-version: [5.2, 5.1]
exclude:
- python-version: 3.8
plone-version: 5.1
- python-version: 3.7
plone-version: 5.1
steps:
# git checkout
- uses: actions/checkout@v2

# python setup
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

# python cache
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# python install
- name: pip install
run: pip install -r requirements.txt

# buildout
- name: buildout
run: buildout -t 10 -c plone-${{ matrix.plone-version }}.x.cfg code-analysis:return-status-codes=True

# code analysis
- name: code analysis
run: bin/code-analysis

# test
- name: test
run: bin/coverage run bin/test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ report.html
.*.cfg
.Python
Pipfile*
.idea
pyvenv.cfg
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

16 changes: 14 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@ Changelog
=========


1.5 (unreleased)
1.6 (unreleased)
----------------

- Nothing changed yet.


1.5 (2021-08-28)
----------------

- Python 3 / Plone 5.2 compatibility
[adrianschulz, tomgross]

- Update dependencies
- Move to Github CI
- Apply black formatting
[tomgross]


1.4.1 (2018-10-22)
------------------

- Add div-element to wrapper to support cases where only text is provided
(otherwise plone.protect can fail)
(otherwise plone.protect can fail)
[tomgross]

1.4 (2018-09-10)
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
graft src/collective
graft docs
include *.rst
include *.rst *.txt
global-exclude *.pyc
31 changes: 4 additions & 27 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[buildout]
extends = https://raw.github.com/collective/buildout.plonetest/master/test-5.1.x.cfg
extends =
https://raw.github.com/collective/buildout.plonetest/master/test-5.2.x.cfg
versions.cfg
package-name = collective.handlebars
package-extras = [test]
parts +=
Expand All @@ -26,29 +28,4 @@ flake8-extensions =
flake8-coding


[versions]
# Don't use a released version of collective.handlebars
collective.handlebars =
PyMeta3 = 0.5.1
PyYAML = 3.13
chardet = 3.0.4
check-manifest = 0.37
configparser = 3.5.0
coverage = 4.0.3
flake8 = 3.0.4
flake8-blind-except = 0.1.1
flake8-coding = 1.3.1
flake8-debugger = 1.4.0
idna = 2.6
mccabe = 0.5.3
plone.recipe.codeanalysis = 3.0.1
plone.recipe.zope2instance = 4.4.0
plone.testing = 5.0.0
pybars3 = 0.9.6
pycodestyle = 2.0.0
pyflakes = 1.2.3
python-coveralls = 2.7.0
setuptools = 33.1.1
sh = 1.12.14
zc.buildout = 2.12.2
zc.recipe.egg = 2.0.6

32 changes: 32 additions & 0 deletions plone-5.1.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[buildout]
extends =
https://raw.github.com/collective/buildout.plonetest/master/test-5.1.x.cfg
versions.cfg
package-name = collective.handlebars
package-extras = [test]
parts +=
coverage
code-analysis


[coverage]
recipe = zc.recipe.egg
eggs =
${test:eggs}
coverage
python-coveralls


[code-analysis]
recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/src/collective
flake8-exclude = bootstrap.py,bootstrap-buildout.py,docs,*.egg.,omelette
flake8-max-complexity = 15
flake8-extensions =
flake8-blind-except
flake8-debugger
flake8-coding

[versions]
plone.testing = 5.0.0
six = 1.16.0
28 changes: 28 additions & 0 deletions plone-5.2.x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[buildout]
extends =
https://raw.github.com/collective/buildout.plonetest/master/test-5.2.x.cfg
versions.cfg
package-name = collective.handlebars
package-extras = [test]
parts +=
coverage
code-analysis


[coverage]
recipe = zc.recipe.egg
eggs =
${test:eggs}
coverage
python-coveralls


[code-analysis]
recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/src/collective
flake8-exclude = bootstrap.py,bootstrap-buildout.py,docs,*.egg.,omelette
flake8-max-complexity = 15
flake8-extensions =
flake8-blind-except
flake8-debugger
flake8-coding
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
setuptools==33.1.1
zc.buildout==2.12.2
setuptools==42.0.2
zc.buildout==2.13.4
wheel
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@

setup(
name='collective.handlebars',
version='1.5.dev0',
version='1.6.dev0',
description="Handlebars for Plone",
long_description=long_description,
# Get more from https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: 5.0",
"Framework :: Plone :: 5.1",
"Framework :: Plone :: 5.2",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Development Status :: 5 - Production/Stable"
],
keywords='Python Plone',
author='Tom Gross',
Expand All @@ -43,6 +46,7 @@
'Products.GenericSetup>=1.8.2',
'setuptools',
'pybars3',
'six'
],
extras_require={
'test': [
Expand Down
2 changes: 1 addition & 1 deletion src/collective/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)
2 changes: 1 addition & 1 deletion src/collective/handlebars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

from zope.i18nmessageid import MessageFactory

_ = MessageFactory('collective.handlebars')
_ = MessageFactory("collective.handlebars")
Loading

0 comments on commit 4c2f171

Please sign in to comment.