diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000000000000000000000000000000000000..9c2e3c1cd56127a7f27feda01786ef82d6e3f0aa --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,20 @@ +engines: + duplication: + enabled: true + config: + languages: + python: + + fixme: + enabled: true + markdownlint: + enabled: true + pep8: + enabled: true + radon: + enabled: true +exclude_paths: +- tests/** +ratings: + paths: + - satella/** diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000000000000000000000000000000000..456f6e02867453b6aa3a184c3ac55c1db61a95db --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +branch=1 +include=satella/* +omit=tests/* diff --git a/.gitignore b/.gitignore index 4b0cb63fad86c75af0c210b7f12003b8bca7e375..baa1b7c8b3bcccee8436fef7ed4f53748b3e1fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ tmp/ *.bak *.swp *~.nib -.idea/ +.idea/** local.properties .classpath .settings/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..7e162f9b12a762f2f8fe621211551b02ad933303 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: python +python: + - "2.7" + - "3.3" + - "3.4" + - "3.5" + - "pypy" +cache: pip +script: + - nosetests --with-coverage +install: + - pip install coverage + - pip install codeclimate-test-reporter + - pip install -r requirements.txt diff --git a/LICENSE b/LICENSE index 9a8ddcf2002cc1ea8ef5c290b797fd1430b19e4a..1ff5ac18b3ecaad897e99786697da1376549180e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2014 Piotr MaĹlanka +Copyright (c) 2013-2017 Piotr MaĹlanka All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 053205d7715878420b7739e7587eb10d3752444a..1abfe13e601f2aec619608f6df21a8d98598342e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ +satella +======== +[](https://travis-ci.org/smok-serwis/satella) +[](https://codeclimate.com/github/smok-serwis/satella) +[](https://codeclimate.com/github/smok-serwis/satella/coverage) +[]() +[]() +[]() + +**satella is currently undergoing a major rework. See branch satella2 for details. +This WILL break compatibility.** + +**satella 1.0 remain in maintenance mode** + Satella is a Python library for writing server applications, especially those dealing with small network-oriented tasks. Over time it will constitute a reasonably large library with useful things. diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000000000000000000000000000000000000..f4e061cf74e6c03e3bf31d45670c568f287ceac4 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,39 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + + config.vm.box = "debian/contrib-jessie64" + + # Rabbit MQ management + config.vm.network "forwarded_port", guest: 15672, host: 15672 + + # HTTP for viewing coverage reports + config.vm.network "forwarded_port", guest: 80, host: 8765 + + config.vm.provision "shell", inline: <<-SHELL + apt-get update + + # Python + apt-get install -y htop curl python python-setuptools python-pip python-dev build-essential rabbitmq-server python3 python3-pip python3-setuptools + pip install --upgrade pip setuptools + pip3 install --upgrade pip setuptools + + # Install deps + pip install -r /vagrant/requirements.txt + pip install nose coverage + pip3 install -r /vagrant/requirements.txt + pip3 install nose coverage + + # HTTP server for viewing coverage reports + apt-get -y install nginx + rm -rf /var/www/html + ln -s /vagrant/htmlcov /var/www/html + + # .bashrc for default user + echo """# .bashrc + cd /vagrant""" > /home/vagrant/.bashrc + + SHELL + +end diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..cdd41f09fc5bca6d9a07e432abcb45b64a7ea694 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,8 @@ +[metadata] +description-file = README.md + +[pycodestyle] +max-line-length=120 + +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index f1ca3980b40043f02cacc46db13e6d72ca84566c..c3f248e8422a7c1753fc99441a8adf86f1827127 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,34 @@ -from distutils.core import setup +# coding=UTF-8 +from setuptools import setup setup(name='satella', - version='1.0', - description='Network, concurrency, instrumentation for servers', - author='Piotr Maslanka', - author_email='piotr.maslanka@henrietta.com.pl', - url='https://www.github.com/piotrmaslanka/satella/', - packages=['satella', - 'satella.unix', - 'satella.channels', - 'satella.channels.sockets', - 'satella.contrib', - 'satella.db', - 'satella.db.pool', - 'satella.instrumentation', - 'satella.instrumentation.counters', - 'satella.instrumentation.exctrack', - 'satella.threads'], - ) \ No newline at end of file + version='1.9.0', + description=u'Utilities for writing servers in Python', + author=u'Piotr MaĹlanka', + author_email='piotrm@smok.co', + keywords=['ha', 'high availability', 'scalable', 'scalability', 'server'], + packages=[ + 'satella', + ], + install_requires=[ + "six", + "monotonic", + ], + tests_require=[ + "nose" + ], + test_suite='nose.collector', + classifiers=[ + 'Programming Language :: Python', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Operating System :: POSIX', + 'Development Status :: 1 - Planning', + 'License :: OSI Approved :: MIT License', + 'Topic :: Software Development :: Libraries' + + ] + )