diff --git a/.circleci/config.yml b/.circleci/config.yml index 5adace3c7be6a0a6f2713d0335f68ea372844473..1fe7f3bb992cdd0e647be76a5faf1ce8b6e0a189 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,8 @@ commands: - run: command: | pip install -r requirements.txt - pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py opentracing - python setup.py install + pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py + pip install . unit_test: description: Run the unit tests steps: diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 06cdc30033b7a98c0f96be7f9f53122d0bfb2911..0000000000000000000000000000000000000000 --- a/.coveragerc +++ /dev/null @@ -1,16 +0,0 @@ -[run] -branch=1 -source= - satella -concurrency=thread -omit= - tests/* - .eggs/* - setup.py - satella/__init__.py - satella/os/signals.py - -[report] -include= - satella/* - diff --git a/.gitignore b/.gitignore index 89b9ddbf014ba784e52bc0919e4d851cd00d8c4f..49bad4a9adcf19af864a6aa517c80ff8317c99d8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ ################# test*.json test*.txt +.pytest_cache .eggs satella.sublime* hs_err_pid*.log diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 2de1d7860254409d5911c6d5b16a76f5a5ce5ce8..0000000000000000000000000000000000000000 --- a/.pylintrc +++ /dev/null @@ -1,10 +0,0 @@ -[MASTER] -disable= - C0114, # missing-module-docstring - C0116, # missing-function-docstring - W0603, # global-statement - C0103, # invalid-name - R0913 # too-many-arguments - -[FORMAT] -max-line-length=110 diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b0c2d4512acf1a89b9c96cf8e1ba9b0b2fcd36..55923af836ed103625f82b30210214381a81949e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1 @@ # v2.24.3 - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..d44d26477bdbf1f394bf0fc7264e75ecff155ffb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,116 @@ +[project] +name = "satella" +dynamic = ["version"] +description = "Utilities for writing servers in Python" +readme = {file = "README.md", content-type="text/markdown"} +authors = [ + {name = "Piotr MaĹlanka", email = "pmaslanka@smok.co"} +] +requires-python = ">= 3.5" +license = {text="MIT License"} +keywords = ["ha", "high availability", "scalable", "scalability", "server", "metrics", "tracing", "instrumentation"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Libraries" +] +dependencies = ["psutil"] + +[tool.setuptools.dynamic] +version = {attr = "satella.__version__"} + +[project.optional-dependencies] +HTTPJSONSource = ["requests"] +YAMLSource = ["pyyaml"] +TOMLSource = ["toml"] +FasterJSON = ["ujson"] +cassandra = ["cassandra-driver"] +opentracing = ["opentracing"] + +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + + +[project.urls] +Homepage = "https://github.com/piotrmaslanka/satella" +Documentation = "https://satella.readthedocs.io/" +Issues = "https://github.com/piotrmaslanka/satella/issues" +Repository = "https://github.com/piotrmaslanka/satella" +Changelog = "https://github.com/piotrmaslanka/satella/blob/develop/CHANGELOG.md" + +[tool.setuptools] +packages = ["satella", + "satella.cassandra", + "satella.coding", + "satella.coding.concurrent", + "satella.coding.concurrent.futures", + "satella.coding.decorators", + "satella.coding.resources", + "satella.coding.sequences", + "satella.coding.structures", + "satella.coding.structures.dictionaries", + "satella.coding.structures.heaps", + "satella.coding.structures.mixins", + "satella.coding.transforms", + "satella.configuration", + "satella.configuration.schema", + "satella.configuration.sources", + "satella.debug", + "satella.debug.tainting", + "satella.exception_handling", + "satella.instrumentation", + "satella.instrumentation.cpu_time", + "satella.instrumentation.memory", + "satella.instrumentation.metrics", + "satella.instrumentation.metrics.exporters", + "satella.instrumentation.metrics.metric_types", + "satella.instrumentation.metrics.structures", + "satella.instrumentation.trace_back", + "satella.opentracing", + "satella.os", + "satella.time"] + +[tool.pytest] +log_cli = true + +[tool.pylint.format] +max-line-length = 120 + +[tool.pylint.MASTER] +disable = ''' + missing-module-docstring, + missing-class-docstring, + missing-function-docstring, + global-statement, + invalid-name, + too-many-arguments +''' + +[tool.coverage.run] +branch = true +source = ["satella"] +concurrency = ["thread"] +omit= [ + "tests/*", + ".eggs/*", + "setup.py", + "satella/__init__.py", + "satella/os/signals.py" +] + +[tool.coverage.report] +include=[ + "satella/*" +] + + diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 20341273762b5f2015703410eaebe5ff4007e8d7..0000000000000000000000000000000000000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -log_cli = true - diff --git a/requirements.txt b/requirements.txt index 379572279d34ef27b13a4842230486176585efd0..c87e4aa6e2743d83165a0e9c5739e89db784a68e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ psutil pyyaml toml requests +opentracing diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fc177a70653ed3c4e0e764928384aa5547142edb..0000000000000000000000000000000000000000 --- a/setup.cfg +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 -[metadata] -name = satella -keywords = ha, high availability, scalable, scalability, server, metrics, tracing -long-description = file: README.md -long-description-content-type = text/markdown; charset=UTF-8 -license_files = LICENSE -author = Piotr MaĹlanka -author_email = piotr.maslanka@henrietta.com.pl -description = Utilities for writing servers in Python -url = https://github.com/piotrmaslanka/satella -project-urls = - Documentation = https://satella.readthedocs.io/ - Code = https://github.com/piotrmaslanka/satella - Issue tracker = https://github.com/piotrmaslanka/satella/issues -classifier = - Programming Language :: Python - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Operating System :: OS Independent - Development Status :: 5 - Production/Stable - License :: OSI Approved :: MIT License - Topic :: Software Development :: Libraries - -[options] -install_requires = - psutil -python_requires = !=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.* -packages = find: - -[options.packages.find] -exclude = - docs - tests - -[options.extras_require] -HTTPJSONSource = requests -YAMLSource = pyyaml -TOMLSource = toml -FasterJSON = ujson -cassandra = cassandra-driver -opentracing = opentracing - -[pycodestyle] -max-line-length = 100 - -[pep8] -max-line-length = 100 - -[bdist_wheel] -universal = 0 diff --git a/setup.py b/setup.py index 905f3b03ad4ba9801a5b4dfd667665ab475ac131..606849326a4002007fd42060b51e69a19c18675c 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ from setuptools import setup -from satella import __version__ - -setup(version=__version__) +setup()