Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
graft priority
graft src/priority
graft docs
graft test
graft visualizer
graft examples
prune docs/build
recursive-include *.py
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini Makefile
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
==========================================
Priority: A HTTP/2 Priority Implementation
==========================================

.. image:: https://github.com/python-hyper/priority/workflows/CI/badge.svg
:target: https://github.com/python-hyper/priority/actions
:alt: Build Status
.. image:: https://codecov.io/gh/python-hyper/priority/branch/master/graph/badge.svg
:target: https://codecov.io/gh/python-hyper/priority
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/priority/badge/?version=latest
:target: https://priority.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg
:target: https://gitter.im/python-hyper/community
:alt: Chat community

.. image:: https://raw.github.com/python-hyper/documentation/master/source/logo/hyper-black-bg-white.png


Priority is a pure-Python implementation of the priority logic for HTTP/2, set
out in `RFC 7540 Section 5.3 (Stream Priority)`_. This logic allows for clients
to express a preference for how the server allocates its (limited) resources to
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ exclude_lines =
source =
src
.tox/*/site-packages

[flake8]
max-line-length = 120
max-complexity = 10
13 changes: 3 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3

import os
import re

from setuptools import setup, find_packages


PROJECT_ROOT = os.path.dirname(__file__)

with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
long_description = file_.read()
long_description +='\n\n'
with open(os.path.join(PROJECT_ROOT, 'HISTORY.rst')) as file_:
long_description += file_.read()

# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open(os.path.join(PROJECT_ROOT, 'src/priority/__init__.py')) as file_:
text = file_.read()
match = re.search(version_regex, text)

if match:
version = match.group(1)
else:
Expand All @@ -41,10 +35,9 @@
'Changelog': 'https://github.com/python-hyper/priority/blob/master/HISTORY.rst',
},
packages=find_packages(where='src'),
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']},
package_data={'priority': ['py.typed']},
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down
27 changes: 17 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging
python =
3.6: py36
3.7: py37
3.8: py38, format, mypy, lint, docs, packaging
3.9: py39
3.8: py38
3.9: py39, lint, docs, packaging
pypy3: pypy3

[testenv]
Expand All @@ -16,7 +16,7 @@ deps =
pytest>=6.2,<7
pytest-cov>=2.10,<3
pytest-xdist>=2.1,<3
hypothesis>=6.9,<6.10
hypothesis>=6.9,<7
commands =
pytest --cov-report=xml --cov-report=term --cov=priority {posargs}

Expand All @@ -25,30 +25,37 @@ commands =
commands = pytest {posargs}

[testenv:lint]
basepython = python3.8
deps =
flake8>=3.8,<4
commands = flake8 --max-complexity 10 src test
flake8>=3.9.1,<4
commands = flake8 src/ test/

[testenv:docs]
basepython = python3.8
deps =
sphinx>=3.5,<4
sphinx>=3.5,<5
whitelist_externals = make
changedir = {toxinidir}/docs
commands =
make clean
make html

[testenv:packaging]
basepython = python3.8
basepython = python3.9
deps =
check-manifest==0.46
readme-renderer==29.0
twine==3.4.1
twine>=3.4.1,<4
whitelist_externals = rm
commands =
rm -rf dist/
check-manifest
python setup.py sdist bdist_wheel
twine check dist/*

[testenv:publish]
basepython = {[testenv:packaging]basepython}
deps =
{[testenv:packaging]deps}
whitelist_externals = {[testenv:packaging]whitelist_externals}
commands =
{[testenv:packaging]commands}
twine upload dist/*