diff --git a/.travis.yml b/.travis.yml index 94cd86a..c62ab8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,39 +8,26 @@ branches: only: - master -python: - - "2.7" - #- "pypy" - env: - - MODE=inplace - - MODE=sdist - - MODE=wheel + - TOXENV=py27-twlatest + - TOXENV=py27-twtrunk + - TOXENV=py27-tw14 + # Test inplace on one variant + - TOXENV=py27-twlatest DEVELOP=--develop + +matrix: + allow_failures: + - env: TOXENV=py27-twtrunk install: - # Upgrade pip/setuptools - - pip install -U pip setuptools - # Tools for checking coverage and uploading to coveralls - - pip install coveralls coverage - - | - python setup.py --version - if [ "${MODE}" == "inplace" ]; then - pip install --editable . - elif [ "${MODE}" == "sdist" ]; then - python setup.py sdist - pip install dist/Mantissa-"$(python setup.py --version)".tar.gz - elif [ "${MODE}" == "wheel" ]; then - pip install wheel - python setup.py bdist_wheel - pip install dist/Mantissa-"$(python setup.py --version)"-py2-none-any.whl - fi + - pip install -U pip setuptools wheel + - pip install tox codecov script: - - cd /tmp && coverage run --branch --source=xmantissa $(type -p trial) xmantissa - - cd /tmp && coverage report -m + - tox ${DEVELOP} after_success: - - cd "${TRAVIS_BUILD_DIR}" && mv /tmp/.coverage . && coveralls + - mv .tox/.coverage . && codecov notifications: email: false diff --git a/NEWS.txt b/NEWS.rst similarity index 98% rename from NEWS.txt rename to NEWS.rst index 2a1c1a4..377d5f9 100644 --- a/NEWS.txt +++ b/NEWS.rst @@ -1,3 +1,11 @@ +0.8.4 (2016-02-17): + - Remove unused `nevow.livepage` support code; fixes compatibility with Nevow + 0.13.0. + - `StringEndpointPort` ports are now deletable from the commandline (with + the `axiomatic port delete` command). + - Mantissa's CI now tests against Twisted trunk, for early warnings of + breakage. + 0.8.3 (2015-10-23): - StringEndpointPort was still broken, somehow. It really works now, promise! diff --git a/README.txt b/README.rst similarity index 73% rename from README.txt rename to README.rst index 0d09d2b..2f51a10 100644 --- a/README.txt +++ b/README.rst @@ -1,6 +1,8 @@ +.. image:: https://travis-ci.org/twisted/mantissa.svg?branch=master + :target: https://travis-ci.org/twisted/mantissa -Divmod Mantissa -=============== +.. image:: https://codecov.io/github/twisted/mantissa/coverage.svg?branch=master + :target: https://codecov.io/github/twisted/mantissa?branch=master Divmod Mantissa is an application server with a web interface built using Axiom and Nevow. @@ -16,8 +18,3 @@ administrative tools, a web server, and a system for different plugins which provide facets of functionality to advertise themselves to the administrator, install themselves on the site database, and be installed and removed from users' accounts. - -More information is available at: - - http://www.divmod.org/trac/wiki/DivmodMantissa - diff --git a/doc/listings/interstore/cal.py b/doc/listings/interstore/cal.py index 663e47d..842eab3 100644 --- a/doc/listings/interstore/cal.py +++ b/doc/listings/interstore/cal.py @@ -32,7 +32,7 @@ class Busy(Exception): class MakeAppointment(Command): arguments = [("whom", SenderArgument()), ("when", String())] response = [("appointmentID", Unicode())] - errors = {"busy": Busy} + errors = {Busy: "busy"} class Appointment(Item, AMPReceiver): diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2f482ce --- /dev/null +++ b/tox.ini @@ -0,0 +1,19 @@ +[tox] +envlist={py27}-{twtrunk,twlatest,tw14} + +[testenv] +# Remove this once the PyPy branch lands: +setenv = + PYTHONHASHSEED = 0 +changedir={toxworkdir} +deps= + twlatest: Twisted + twtrunk: https://github.com/twisted/twisted/archive/trunk.zip + tw14: Twisted==14.0.0 + coverage +commands= + pip list + coverage run {envdir}/bin/trial \ + --temp-directory={envdir}/_trial_temp {posargs:xmantissa} + coverage report --rcfile={toxinidir}/.coveragerc + coverage html --rcfile={toxinidir}/.coveragerc --directory {envdir}/_coverage diff --git a/xmantissa/test/test_theme.py b/xmantissa/test/test_theme.py index 6abc7e7..c71e359 100644 --- a/xmantissa/test/test_theme.py +++ b/xmantissa/test/test_theme.py @@ -241,7 +241,7 @@ def test_publicPage(self): def test_navPage(self): """ - Test that L{webapp.GenericNavigationLivePage} supports theming of + Test that L{webapp.GenericNavigationAthenaPage} supports theming of Athena's unsupported-browser page based on an L{ITemplateNameResolver} installed on the viewing user's store. """ diff --git a/xmantissa/webapp.py b/xmantissa/webapp.py index 018088e..ef2a45f 100644 --- a/xmantissa/webapp.py +++ b/xmantissa/webapp.py @@ -21,7 +21,7 @@ from axiom.userbase import getAccountNames from nevow.rend import Page -from nevow import livepage, athena +from nevow import athena from nevow.inevow import IRequest from nevow import tags as t from nevow import url @@ -331,29 +331,6 @@ def __init__(self, webapp, fragment, pageComponents, username): _FragmentWrapperMixin.__init__(self, fragment, pageComponents) -class GenericNavigationLivePage(_FragmentWrapperMixin, livepage.LivePage, _ShellRenderingMixin): - def __init__(self, webapp, fragment, pageComponents, username): - livepage.LivePage.__init__(self, docFactory=webapp.getDocFactory('shell')) - _ShellRenderingMixin.__init__(self, webapp, pageComponents, username) - _FragmentWrapperMixin.__init__(self, fragment, pageComponents) - - # XXX TODO: support live nav, live fragments somehow - def render_head(self, ctx, data): - ctx.tag[t.invisible(render=t.directive("liveglue"))] - return _FragmentWrapperMixin.render_head(self, ctx, data) - - def goingLive(self, ctx, client): - getattr(self.fragment, 'goingLive', lambda x, y: None)(ctx, client) - - def locateHandler(self, ctx, path, name): - handler = getattr(self.fragment, 'locateHandler', None) - - if handler is None: - return getattr(self.fragment, 'handle_' + name) - else: - return handler(ctx, path, name) - - class GenericNavigationAthenaPage(_FragmentWrapperMixin, MantissaLivePage,