Skip to content

Commit

Permalink
setup.py template, metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jul 20, 2020
1 parent 258fb53 commit eb4ba24
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 60 deletions.
6 changes: 6 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[mypy]
ignore_missing_imports = True
strict_optional = False
allow_redefinition = True
show_error_context = False
show_column_numbers = True
4 changes: 0 additions & 4 deletions archive/matlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ def test_matlab():
[matlab, "-batch", "findssh"], universal_newlines=True, timeout=60
)
print(ret)


if __name__ == "__main__":
pytest.main(["-s", __file__])
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ requires = ["setuptools", "wheel"]

[tool.black]
line-length = 100

[tool.pytest.ini_options]
addopts = "-ra -v"
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

42 changes: 1 addition & 41 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = findssh
version = 1.5.0
version = 1.4.1
author = Michael Hirsch, Ph.D.
author_email = [email protected]
url = https://github.com/scivision/findssh
Expand Down Expand Up @@ -57,43 +57,3 @@ lint =
flake8-builtins
flake8-blind-except
mypy


[flake8]
max-line-length = 132
exclude = .git,__pycache__,.eggs/,doc/,docs/,build/,dist/,archive/
per-file-ignores =
__init__.py:F401

[mypy]
ignore_missing_imports = True
strict_optional = False
allow_redefinition = True
show_error_context = False
show_column_numbers = True

[tool:pytest]
addopts = -ra -v

[coverage:run]
cover_pylib = false
omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*

[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
except RuntimeError
except NotImplementedError
except ImportError
except FileNotFoundError
except CalledProcessError
raise AssertionError
raise NotImplementedError
logging.warning
logging.error
logging.critical
if __name__ == .__main__.:
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python
from setuptools import setup
#!/usr/bin/env python3
import site
import setuptools

setup()
# PEP517 workaround
site.ENABLE_USER_SITE = True

setuptools.setup()
5 changes: 0 additions & 5 deletions src/findssh/tests/test_coro.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
import pytest
import ipaddress

import findssh
Expand All @@ -16,7 +15,3 @@ def test_coroutine():
host = hosts[0]
assert isinstance(host[0], ipaddress.IPv4Address)
assert isinstance(host[1], str)


if __name__ == "__main__":
pytest.main([__file__])
6 changes: 1 addition & 5 deletions src/findssh/tests/test_threadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
normally we use coroutines, but for demo purposes we have threadpool too.
"""
import ipaddress
import pytest

import findssh.threadpool

PORT = 22
Expand All @@ -17,7 +17,3 @@ def test_threadpool():
assert isinstance(host, ipaddress.IPv4Address)
assert isinstance(svc, str)
break


if __name__ == "__main__":
pytest.main([__file__])

0 comments on commit eb4ba24

Please sign in to comment.