Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 100% test coverage - Make sure the configurations can be loaded - Enable coverage reporting - Rename .txt -> .rst - A 'browser' extra contains what's needed to load the browser configuration, which is now conditional.
- Loading branch information
Showing
19 changed files
with
315 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[run] | ||
source = src | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ build/ | |
dist/ | ||
*.egg-info/ | ||
.tox/ | ||
htmlcov/ | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
language: python | ||
sudo: false | ||
python: | ||
- 2.7 | ||
install: | ||
- pip install . | ||
- 2.7 | ||
- 3.5 | ||
- 3.6 | ||
- pypy-5.4.1 | ||
script: | ||
- python setup.py test -q | ||
- coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress | ||
|
||
after_success: | ||
- coveralls | ||
notifications: | ||
email: false | ||
email: false | ||
|
||
install: | ||
- pip install -U pip setuptools | ||
- pip install -U coveralls coverage | ||
- pip install -U -e ".[test]" | ||
|
||
|
||
cache: pip | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
include *.py | ||
include *.txt | ||
include *.rst | ||
include buildout.cfg | ||
include .travis.yml | ||
include .coveragerc | ||
include tox.ini | ||
|
||
recursive-include src *.gif | ||
recursive-include src *.pt | ||
recursive-include src *.txt | ||
recursive-include src *.rst | ||
recursive-include src *.zcml |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[bdist_wheel] | ||
universal = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
# this is a namespace package | ||
try: | ||
import pkg_resources | ||
pkg_resources.declare_namespace(__name__) | ||
except ImportError: | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) | ||
|
||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
# this is a namespace package | ||
try: | ||
import pkg_resources | ||
pkg_resources.declare_namespace(__name__) | ||
except ImportError: | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) | ||
|
||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
====== | ||
README | ||
====== | ||
|
||
This package provides an error reporting utility which is able to | ||
store errors. (Notice that the implementation classes have been moved | ||
to the ``zope.error`` package.) | ||
|
||
Let's create one: | ||
|
||
>>> from zope.app.error.error import ErrorReportingUtility | ||
>>> util = ErrorReportingUtility() | ||
>>> util | ||
<zope.error.error.ErrorReportingUtility object at ...> | ||
|
||
>>> from zope.app.error.interfaces import IErrorReportingUtility | ||
>>> IErrorReportingUtility.providedBy(util) | ||
True | ||
>>> IErrorReportingUtility | ||
<InterfaceClass zope.error.interfaces.IErrorReportingUtility> | ||
|
||
This package contains ZMI views in the ``browser`` sub-package: | ||
|
||
>>> from zope.app.error.browser import EditErrorLog, ErrorRedirect | ||
>>> EditErrorLog | ||
<class 'zope.app.error.browser.EditErrorLog'> | ||
>>> ErrorRedirect | ||
<class 'zope.app.error.browser.ErrorRedirect'> | ||
|
||
These are configured when the configuration for this package is | ||
executed (as long as the right dependencies are available). | ||
|
||
Certain ZMI menus must first be available: | ||
|
||
>>> from zope.configuration import xmlconfig | ||
>>> _ = xmlconfig.string(r""" | ||
... <configure xmlns="http://namespaces.zope.org/browser" i18n_domain="zope"> | ||
... <include package="zope.browsermenu" file="meta.zcml" /> | ||
... <menu | ||
... id="zmi_views" | ||
... title="Views" | ||
... /> | ||
... | ||
... <menu | ||
... id="zmi_actions" | ||
... title="Actions" | ||
... /> | ||
... </configure> | ||
... """) | ||
|
||
Now we can configure the package: | ||
|
||
>>> _ = xmlconfig.string(r""" | ||
... <configure xmlns="http://namespaces.zope.org/zope"> | ||
... <include package="zope.app.error" /> | ||
... </configure> | ||
... """) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope" | ||
xmlns:browser="http://namespaces.zope.org/browser" | ||
i18n_domain="zope"> | ||
|
||
<include package="zope.browsermenu" file="meta.zcml" /> | ||
|
||
<browser:menu | ||
id="zmi_views" | ||
title="Views" | ||
description="Menu for displaying alternate representations of an object" | ||
/> | ||
|
||
<browser:menu | ||
id="zmi_actions" | ||
title="Actions" | ||
description="Menu for displaying actions to be performed" | ||
/> | ||
|
||
<include package="zope.app.error" /> | ||
|
||
</configure> |
Oops, something went wrong.