Skip to content

Commit

Permalink
Updated packaging/testing/documentation configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Sep 15, 2017
1 parent c386b45 commit 42389f7
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 81 deletions.
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: sphinx
python:
version: "3.5"
pip_install: true
extra_requirements: [doc]
65 changes: 44 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,55 @@
sudo: required

language: python
sudo: required

services:
- docker

python:
- "3.5"
- "3.6"
jobs:
include:
- env: TOXENV=py35
python: "3.5"

- env: TOXENV=py36
python: "3.6"

- env: TOXENV=pypy3
python: pypy3
after_success: skip

- env: TOXENV=flake8
python: "3.5"
after_success: skip

- env: TOXENV=mypy
python: "3.5"
after_success: skip

- stage: deploy to PyPI
python: "3.5"
before_install: skip
install: pip install -U setuptools
script: skip
after_success: true
deploy:
provider: pypi
user: agronholm
password:
secure: o5tpbl0Ni0XzrFX6ZO4IbX79g5Q/Yk/BRV65AIRh6j16cdMqyaN9BwiA60LfLANCMA/twpsPEDIszAtrJi9A/I6RsIYa0lNSVHqjkMW1CVQTvwTmXF8f4aK066o1VCM/g/oLR7qHmZQHudhzhS+MqyzVSXbq97EQ6RFw4LWe/zNtUwCaGY5wEqZAUnqqjQfr/jR4RYiWzCdrjVXxa9hHc8y6CDtBkA0oMP6WDn0cgNPXatdjzytmeTSXiyaYnJK24TxnmD0FP8Iu7kmLRQnApCUsDOhxtlwA6o8I85FPm2VgUQlAEW3sGZUd7NQcYAzpy4gTnUx8BPVm1vacyFdtJtz9DDFRg3ydrcECvbycsolqN2wV08xBHXtoCbcfk7LBGTUzjN0N+Ko3Xm1vJlkHMnOnSNnlfmi2CNCg8pKM7t0XTycNeuJRiNgync69nmePiAzPUPS8Hp27NSqg9iMQOMXN4+BPLyzWVj74VfmcTBSOV8WZvTBk8wWF+NUZI+okBy3B0PDTtw8hO51yyC8lWzpMfOO47IU9GYYa5v5Xpr/IASvLm9HRDiUpLAxIDHMJqgUKEz52FLAlBn3UsTopc6HhtA5P5U1RaPFOp8Zfh0bYzvcHHKqrZAEZkyNArzYBm5rxIl0BIx9LxhPQUv3jVuaDsfeiMdMA4RMCshKI9So=
distributions: sdist bdist_wheel
on:
tags: true
repo: asphalt-framework/asphalt-wamp
allow_failures:
- env: TOXENV=mypy

before_install: docker-compose run -d -p 8080:8080 crossbar

install: pip install tox-travis coveralls
install:
- pip install -U setuptools
- pip install tox

script: tox

after_success: coveralls
after_success:
- pip install coveralls
- coveralls

notifications:
irc:
Expand All @@ -25,14 +59,3 @@ notifications:
on_failure: change
use_notice: true
skip_join: true

deploy:
provider: pypi
user: agronholm
password:
secure: o5tpbl0Ni0XzrFX6ZO4IbX79g5Q/Yk/BRV65AIRh6j16cdMqyaN9BwiA60LfLANCMA/twpsPEDIszAtrJi9A/I6RsIYa0lNSVHqjkMW1CVQTvwTmXF8f4aK066o1VCM/g/oLR7qHmZQHudhzhS+MqyzVSXbq97EQ6RFw4LWe/zNtUwCaGY5wEqZAUnqqjQfr/jR4RYiWzCdrjVXxa9hHc8y6CDtBkA0oMP6WDn0cgNPXatdjzytmeTSXiyaYnJK24TxnmD0FP8Iu7kmLRQnApCUsDOhxtlwA6o8I85FPm2VgUQlAEW3sGZUd7NQcYAzpy4gTnUx8BPVm1vacyFdtJtz9DDFRg3ydrcECvbycsolqN2wV08xBHXtoCbcfk7LBGTUzjN0N+Ko3Xm1vJlkHMnOnSNnlfmi2CNCg8pKM7t0XTycNeuJRiNgync69nmePiAzPUPS8Hp27NSqg9iMQOMXN4+BPLyzWVj74VfmcTBSOV8WZvTBk8wWF+NUZI+okBy3B0PDTtw8hO51yyC8lWzpMfOO47IU9GYYa5v5Xpr/IASvLm9HRDiUpLAxIDHMJqgUKEz52FLAlBn3UsTopc6HhtA5P5U1RaPFOp8Zfh0bYzvcHHKqrZAEZkyNArzYBm5rxIl0BIx9LxhPQUv3jVuaDsfeiMdMA4RMCshKI9So=
distributions: sdist bdist_wheel
on:
tags: true
python: "3.5"
repo: asphalt-framework/asphalt-wamp
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ FROM python:3.5.2

RUN wget -qO- https://github.com/jwilder/dockerize/releases/download/v0.4.0/dockerize-linux-amd64-v0.4.0.tar.gz |\
tar xzC /usr/local/bin
RUN pip install -U setuptools

ENV SETUPTOOLS_SCM_PRETEND_VERSION 2.0.0

WORKDIR /app
COPY asphalt ./asphalt
COPY setup.* README.rst ./
RUN pip install -e .[testing]
RUN pip install -e .[test]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
entrypoint: dockerize -wait http://crossbar:8080 pytest

crossbar:
image: crossbario/crossbar:cpy3-17.5.1
image: crossbario/crossbar:cpy3-17.9.1
volumes:
- ./crossbar-config.yaml:/node/.crossbar/config.yaml:ro
command: --loglevel trace
6 changes: 2 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Sphinx >= 1.5
sphinx_rtd_theme
sphinx-autodoc-typehints >= 1.0.5
sphinxcontrib-asyncio >= 0.2.0
# This is for ReadTheDocs and can be removed once they upgrade to a newer setuptools release.
setuptools >= 36.2.7
46 changes: 46 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
[metadata]
name = asphalt-wamp
description = WAMP client component for the Asphalt framework
long_description = file: README.rst
author = Alex Grönholm
author_email = alex.gronholm@nextday.fi
url = https://github.com/asphalt-framework/asphalt-wamp
license = Apache License 2.0
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Topic :: Communications
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6

[options]
packages = asphalt.wamp
install_requires =
asphalt ~= 4.0
asphalt-serialization ~= 4.0
autobahn >= 17.5.1
typeguard ~= 2.0

[options.extras_require]
test =
cbor2
msgpack-python
pytest
pytest-cov
pytest-catchlog
pytest-asyncio >= 0.5.0
doc =
Sphinx >= 1.5
sphinx_rtd_theme
sphinx-autodoc-typehints >= 1.2.0
sphinxcontrib-asyncio >= 0.2.0

[options.entry_points]
asphalt.components =
wamp = asphalt.wamp.component:WAMPComponent

[build_sphinx]
source-dir = docs
build-dir = docs/_build
Expand Down
48 changes: 2 additions & 46 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,56 +1,12 @@
from pathlib import Path

from setuptools import setup

setup(
name='asphalt-wamp',
use_scm_version={
'version_scheme': 'post-release',
'local_scheme': 'dirty-tag'
},
description='WAMP client component for the Asphalt framework',
long_description=Path(__file__).with_name('README.rst').read_text('utf-8'),
author='Alex Grönholm',
author_email='alex.gronholm@nextday.fi',
url='https://github.com/asphalt-framework/asphalt-wamp',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Topic :: Communications',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
license='Apache License 2.0',
zip_safe=False,
packages=[
'asphalt.wamp'
],
setup_requires=[
'setuptools >= 36.2.7',
'setuptools_scm >= 1.7.0'
],
install_requires=[
'asphalt >= 3.0, < 5.0',
'asphalt-serialization ~= 4.0',
'autobahn >= 17.5.1',
'typeguard ~= 2.0'
],
extras_require={
'testing': [
'cbor2',
'msgpack-python',
'pytest',
'pytest-cov',
'pytest-catchlog',
'pytest-asyncio >= 0.5.0',
]
},
entry_points={
'asphalt.components': [
'wamp = asphalt.wamp.component:WAMPComponent'
]
}
]
)
16 changes: 8 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[tox]
envlist = py35, py36, flake8

[travis]
python =
3.5: py35, flake8, docs
3.6: py36
envlist = py35, py36, pypy3, flake8

[testenv]
extras = testing
extras = test
commands = python -m pytest {posargs}

[testenv:docs]
deps = -rdocs/requirements.txt
extras = doc
commands = python setup.py build_sphinx {posargs}
usedevelop = true

[testenv:flake8]
deps = flake8
commands = flake8 asphalt tests
skip_install = true

[testenv:mypy]
deps = mypy
commands = mypy --ignore-missing-imports asphalt
skip_install = true

0 comments on commit 42389f7

Please sign in to comment.