Migrate to pyproject config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
eb03ff96ad
commit
190d524734
@ -1,5 +1,3 @@
|
||||
# simple-message-channel 0.0.1a1 (UNRELEASED)
|
||||
|
||||
## Project Announcements
|
||||
|
||||
- The first alpha development release is made!
|
||||
|
@ -1 +0,0 @@
|
||||
include LICENSE README.md CHANGELOG.md
|
11
NOTES.md
11
NOTES.md
@ -1,11 +0,0 @@
|
||||
# HOWTO port
|
||||
|
||||
- its a sans-io module, no IO included
|
||||
- its got a callback API recv -> onmessage which Id like to replace
|
||||
- plan is then maybe to use a async with API for this handling
|
||||
|
||||
- refs
|
||||
- https://github.com/mafintosh/simple-message-channels/blob/master/index.js
|
||||
- https://github.com/mafintosh/simple-message-channels/blob/master/test.js
|
||||
- https://github.com/mafintosh/simple-message-channels/blob/master/example.js
|
||||
- https://github.com/mafintosh/simple-message-channels#api
|
@ -4,6 +4,14 @@
|
||||
|
||||
## Sans I/O wire protocol for Hypercore
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ pip install simple-message-channels
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
print("TODO")
|
||||
```
|
||||
|
4
mypy.ini
4
mypy.ini
@ -1,4 +0,0 @@
|
||||
[mypy]
|
||||
python_version = 3.8
|
||||
platform = linux
|
||||
ignore_missing_imports = True
|
@ -1,11 +1,76 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools",
|
||||
"setuptools-scm",
|
||||
"wheel",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = ["poetry>=1.0.9,<2.0"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "simple-message-channels"
|
||||
version = "0.0.1a8"
|
||||
description = "Utilities for navigating flat trees"
|
||||
authors = ["decentral1se <hi@decentral1.se>"]
|
||||
maintainers = ["decentral1se <hi@decentral1.se>"]
|
||||
license = "GPLv3"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/hyperpy/simple-message-channels"
|
||||
keywords = ["hypercore", "hypercore-protocol"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.6"
|
||||
attrs = "^19.3.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
black = "^19.10b0"
|
||||
flake8 = "^3.8.3"
|
||||
isort = "^5.0.2"
|
||||
|
||||
[tool.black]
|
||||
line-length = 80
|
||||
target-version = ["py38"]
|
||||
include = '\.pyi?$'
|
||||
|
||||
[tool.isort]
|
||||
include_trailing_comma = true
|
||||
known_first_party = "simple_message_channels"
|
||||
known_third_party = "pytest"
|
||||
line_length = 80
|
||||
multi_line_output = 3
|
||||
skip = ".venv,.tox"
|
||||
|
||||
[tool.tox]
|
||||
legacy_tox_ini = """
|
||||
[tox]
|
||||
envlist =
|
||||
{py36,py37,py38}
|
||||
lint
|
||||
sort
|
||||
format
|
||||
type
|
||||
skip_missing_interpreters = True
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-mock
|
||||
commands = pytest test/ --cov={toxinidir}/simple_message_channels/ --no-cov-on-fail {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
skipdist = True
|
||||
deps = flake8
|
||||
commands = flake8 {posargs:--max-line-length 80} simple_message_channels/ test/
|
||||
|
||||
[testenv:sort]
|
||||
skipdist = True
|
||||
deps = isort
|
||||
commands = isort {posargs:-c} simple_message_channels/ test/
|
||||
|
||||
[testenv:format]
|
||||
skipdist = True
|
||||
deps = black
|
||||
commands = black {posargs:--check} simple_message_channels/ test/
|
||||
|
||||
[testenv:type]
|
||||
skipdist = True
|
||||
deps = mypy
|
||||
commands = mypy {posargs:--ignore-missing-imports} simple_message_channels/ test/
|
||||
"""
|
||||
|
47
setup.cfg
47
setup.cfg
@ -1,47 +0,0 @@
|
||||
[tool:pytest]
|
||||
testpaths = test
|
||||
trio_mode = true
|
||||
|
||||
[flake8]
|
||||
max-line-length = 80
|
||||
|
||||
[isort]
|
||||
known_first_party = simple_message_channels
|
||||
known_third_party = pytest
|
||||
line_length = 80
|
||||
multi_line_output = 3
|
||||
skip = .venv, .tox
|
||||
include_trailing_comma = True
|
||||
|
||||
[metadata]
|
||||
name = simple-message-channels
|
||||
author = decentral1se
|
||||
author_email = hi@decentral1.se
|
||||
maintainer = decentral1se
|
||||
maintainer_email = hi@decentral1.se
|
||||
url = https://git.autonomic.zone/hyperpy/simple-message-channels
|
||||
project_urls =
|
||||
Source Code = https://git.autonomic.zone/hyperpy/simple-message-channels
|
||||
description = Sans I/O wire protocol for Hypercore
|
||||
long_description = file: README.md
|
||||
license = GPLv3
|
||||
license_file = LICENSE
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.6
|
||||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
|
||||
[options]
|
||||
use_scm_version = True
|
||||
python_requires = >=3.6
|
||||
setup_requires =
|
||||
setuptools_scm
|
||||
setuptools_scm_git_archive
|
||||
package_dir =
|
||||
= .
|
||||
packages = find:
|
||||
zip_safe = False
|
||||
|
||||
[options.packages.find]
|
||||
where = .
|
@ -1,14 +1,3 @@
|
||||
"""simple-message-channels module."""
|
||||
|
||||
from simple_message_channels.smc import SimpleMessageChannel # noqa
|
||||
|
||||
try:
|
||||
import pkg_resources
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
__version__ = pkg_resources.get_distribution('simple_message_channels').version
|
||||
except Exception:
|
||||
__version__ = 'unknown'
|
||||
|
@ -1,10 +0,0 @@
|
||||
"""Version test module."""
|
||||
|
||||
|
||||
def test_version_fails_gracefully(mocker):
|
||||
target = 'pkg_resources.get_distribution'
|
||||
mocker.patch(target, side_effect=Exception())
|
||||
|
||||
from simple_message_channels.__init__ import __version__
|
||||
|
||||
assert __version__ == 'unknown'
|
49
tox.ini
49
tox.ini
@ -1,49 +0,0 @@
|
||||
[tox]
|
||||
envlist =
|
||||
{py36,py37,py38}
|
||||
lint
|
||||
sort
|
||||
format
|
||||
type
|
||||
skip_missing_interpreters = True
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-mock
|
||||
pytest-trio
|
||||
commands = pytest test/ --cov={toxinidir}/simple_message_channels/ --no-cov-on-fail {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
skipdist = True
|
||||
deps = flake8
|
||||
commands = flake8 {posargs} simple_message_channels/ test/
|
||||
|
||||
[testenv:sort]
|
||||
skipdist = True
|
||||
deps = isort
|
||||
commands = isort {posargs:-rc -c} -sp setup.cfg simple_message_channels/ test/
|
||||
|
||||
[testenv:format]
|
||||
skipdist = True
|
||||
basepython = python3.8
|
||||
deps = black
|
||||
commands = black {posargs:--check} simple_message_channels/ test/
|
||||
|
||||
[testenv:type]
|
||||
basepython = python3.8
|
||||
skipdist = True
|
||||
deps = mypy
|
||||
commands = mypy simple_message_channels/ test/
|
||||
|
||||
[testenv:release]
|
||||
deps = twine
|
||||
commands =
|
||||
rm -rf {toxworkdir}/dist
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel
|
||||
python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg
|
||||
twine upload {toxworkdir}/dist/*
|
||||
whitelist_externals =
|
||||
rm
|
Loading…
Reference in New Issue
Block a user