mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-21 19:28:35 +00:00
commit
310e975ad5
5 changed files with 27 additions and 9 deletions
12
.github/workflows/run-tests.yml
vendored
12
.github/workflows/run-tests.yml
vendored
|
@ -21,15 +21,21 @@ jobs:
|
|||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools
|
||||
python -m pip install --upgrade pip setuptools twine wheel
|
||||
python -m pip install '.[dev]'
|
||||
python -m pip install -e .
|
||||
- name: Lint
|
||||
run: |
|
||||
flake8 sprockets_statsd tests
|
||||
flake8 sprockets_statsd tests setup.py docs/conf.py
|
||||
- name: Check format
|
||||
run: |
|
||||
yapf -dr sprockets_statsd tests
|
||||
yapf -dr sprockets_statsd tests setup.py docs/conf.py
|
||||
- name: Verify distribution build
|
||||
run: |
|
||||
rm -fr dist
|
||||
python setup.py bdist_wheel
|
||||
python setup.py sdist
|
||||
twine check dist/*
|
||||
- name: Run tests
|
||||
run: |
|
||||
coverage run -m unittest
|
||||
|
|
|
@ -50,13 +50,13 @@ the payload.
|
|||
|
||||
If you are a `python-statsd`_ user, then the method names should look very familiar. That is quite intentional.
|
||||
I like the interface and many others do as well. There is one very very important difference though -- the
|
||||
``timing`` method takes the duration as the number of **seconds** as a :class:`float` instead of the number of
|
||||
``timing`` method takes the duration as the number of **seconds** as a ``float`` instead of the number of
|
||||
milliseconds.
|
||||
|
||||
.. warning::
|
||||
|
||||
If you are accustomed to using `python-statsd`_, be aware that the ``timing`` method expects the number of
|
||||
seconds as a :class:`float` instead of the number of milliseconds.
|
||||
seconds as a ``float`` instead of the number of milliseconds.
|
||||
|
||||
.. _python-statsd: https://statsd.readthedocs.io/en/latest/
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
import setuptools
|
||||
|
||||
setuptools.setup()
|
||||
|
|
|
@ -486,7 +486,7 @@ class Processor:
|
|||
|
||||
logger: logging.Logger
|
||||
protocol: typing.Optional[StatsdProtocol]
|
||||
queue: asyncio.Queue[bytes]
|
||||
queue: asyncio.Queue
|
||||
_create_transport: typing.Callable[[], typing.Coroutine[
|
||||
typing.Any, typing.Any, typing.Tuple[asyncio.BaseTransport,
|
||||
StatsdProtocol]]]
|
||||
|
|
17
tox.ini
17
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = lint,py37,py38,py39,tornado5
|
||||
envlist = lint,distcheck,py37,py38,py39,tornado5
|
||||
toxworkdir = ./build/tox
|
||||
|
||||
[testenv]
|
||||
|
@ -10,8 +10,19 @@ commands =
|
|||
|
||||
[testenv:lint]
|
||||
commands =
|
||||
flake8 sprockets_statsd tests
|
||||
yapf -dr sprockets_statsd tests
|
||||
flake8 sprockets_statsd tests setup.py docs/conf.py
|
||||
yapf -dr sprockets_statsd tests setup.py docs/conf.py
|
||||
|
||||
[testenv:distcheck]
|
||||
deps =
|
||||
twine
|
||||
wheel
|
||||
commands =
|
||||
rm -fr {envtmpdir}/dist
|
||||
python setup.py sdist --dist-dir {envtmpdir}/dist
|
||||
python setup.py bdist_wheel --dist-dir {envtmpdir}/dist
|
||||
twine check {envtmpdir}/dist/*
|
||||
rm -fr {envtmpdir}/dist
|
||||
|
||||
[testenv:tornado5]
|
||||
deps =
|
||||
|
|
Loading…
Reference in a new issue