Skip to content

Commit

Permalink
Merge pull request #17 from zopefoundation/config-with-zope-product
Browse files Browse the repository at this point in the history
Reconfigure package with zopefoundation/meta/config
  • Loading branch information
dataflake committed Mar 15, 2021
2 parents 8ac5c69 + a1dccf1 commit 925b15a
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 129 deletions.
39 changes: 39 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
54 changes: 54 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday

jobs:
build:
strategy:
matrix:
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.8", "coverage"]

runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 19 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
*.egg
*.egg-info
*.mo
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.egg-info/
*.profraw
*.pyc
*.pyo
.Python
.coverage
.coverage.*
.eggs
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
bin
build
.vscode/
__pycache__/
bin/
build/
coverage.xml
default.profraw
develop-eggs
dist
downloads
eggs
htmlcov/
include/
develop-eggs/
develop/
dist/
docs/_build
eggs/
etc/
lib/
local.cfg
parts
pip-selfcheck.json
lib64
log/
parts/
pyvenv.cfg
var
var/
29 changes: 29 additions & 0 deletions .meta.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "5160fefd5278ff7780bff6efd7efbecc47d6741a"

[python]
with-appveyor = false
with-pypy = false
with-legacy-python = true
with-docs = false
with-sphinx-doctests = false

[isort]
known_first_party = "Products.CMFCore"
known_zope = "OFS, Products"

[tox]
use-flake8 = true

[coverage]
fail-under = 85

[manifest]
additional-rules = [
"include buildout4.cfg",
"recursive-include src *.gif",
"recursive-include src *.xml",
]
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Products.CMFUid Changelog
=========================

3.1.1 (unreleased)
3.2.0 (unreleased)
------------------

- Add support for Python 3.9

- change package structure to move package code into a ``src`` subfolder


Expand Down
11 changes: 8 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
include *.txt
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.rst
include *.txt
include buildout.cfg
include tox.ini

recursive-include src *.gif
recursive-include src *.pt
recursive-include src *.py
recursive-include src *.xml
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
include buildout4.cfg
recursive-include src *.gif
recursive-include src *.xml
29 changes: 21 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
=================
Products.CMFUid
=================
.. image:: https://github.com/zopefoundation/Products.CMFUid/actions/workflows/tests.yml/badge.svg
:target: https://github.com/zopefoundation/Products.CMFUid/actions/workflows/tests.yml

.. image:: https://coveralls.io/repos/github/zopefoundation/Products.CMFUid/badge.svg
:target: https://coveralls.io/github/zopefoundation/Products.CMFUid

.. image:: https://img.shields.io/pypi/v/Products.CMFUid.svg
:target: https://pypi.org/project/Products.CMFUid/
:alt: Current version on PyPI

.. image:: https://img.shields.io/pypi/pyversions/Products.CMFUid.svg
:target: https://pypi.org/project/Products.CMFUid/
:alt: Supported Python versions

Products.CMFUid
===============

.. contents::

CMFUid introduces a simple unique id implementation.

Implementation
==============
--------------

The supplied tools attach the unique ids to the objects. The objects
do not have to be aware of unique ids.
Expand All @@ -17,7 +30,7 @@ object of a given unique id. The interfaces do not imply the use
of the catalog (except the IUniqueIdBrainQuery).

Which Tool does What?
=====================
---------------------

The 'portal_uidgenerator' tools responsibility is to generate
unique ids. The 'portal_uidannotation' tool is responsible to
Expand All @@ -29,13 +42,13 @@ This design was chosen to allow users replacing only parts of
the functionality without having to understand the whole thing.

Unique Id API
=============
-------------

'portal_uidhandler' implementing 'IUniqueIdHandler' is the main
API for playing with unique ids.

Usage
=====
-----

'portal_uidhandler' fully implements IUniqueIdHandler (IUniqueIdSet
for registering/unregistering unique ids, IUniqueIdQuery for queries
Expand All @@ -60,7 +73,7 @@ CMFUid is not installed.


Update 2007-03-30
=================
-----------------

The annotation code has been updated to use events for assigning/removing
uids. The settings for this live in the portal_uidannotation tool.
Expand Down
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[buildout]
extends =
http://zopefoundation.github.io/Zope/releases/4.x/versions.cfg
http://zopefoundation.github.io/Zope/releases/master/versions.cfg
develop = .
parts =
test
Expand Down
5 changes: 5 additions & 0 deletions buildout4.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[buildout]
extends =
buildout.cfg
http://zopefoundation.github.io/Zope/releases/4.x/versions.cfg

38 changes: 14 additions & 24 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[bdist_wheel]
universal = 1

[flake8]
doctests = 1
no-accept-encodings = True
htmldir = parts/flake8

[check-manifest]
ignore =
.editorconfig
.meta.toml

[isort]
force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_first_party = Products.CMFCore
known_third_party = six, docutils
known_third_party = six, docutils, pkg_resources
known_zope = OFS, Products
known_first_party = Products.CMFCore
default_section = ZOPE
line_length = 79
lines_after_imports = 2

[flake8]
no-accept-encodings = True
doctests = True
exclude =
bootstrap.py
htmldir = parts/flake8

[coverage:run]
branch = True
source = Products.CMFUid
omit =

[coverage:report]
fail_under = 85.00
ignore_errors = True
precision = 2
show_missing = False
sort = Name

[coverage:html]
directory = parts/coverage
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _read(name):

setup(
name='Products.%s' % NAME,
version='3.1.1.dev0',
version='3.2.0.dev0',
description='Uid product for the Zope Content Management Framework',
long_description=README,
classifiers=[
Expand All @@ -36,6 +36,7 @@ def _read(name):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Application Frameworks',
],
Expand Down
Loading

0 comments on commit 925b15a

Please sign in to comment.