Skip to content

Commit

Permalink
Rework tox config. Make a single test pass. Bump and fix some deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhoherd committed Jun 15, 2020
1 parent 4a01c14 commit 664c0ee
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 29 deletions.
4 changes: 2 additions & 2 deletions plexdl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

__version__ = version(__package__)

import plexdl
from plexdl.plexdl import Client


def get_logger(ctx, param, value):
Expand All @@ -39,7 +39,7 @@ def get_logger(ctx, param, value):
def main(username, password, title, relay, server_info, item_prefix, summary, ratings, metadata, v):
"""Search your plex account for media matching the given string, then prints out download commands."""
try:
p = plexdl.Client(
p = Client(
username=username,
password=password,
title=title,
Expand Down
31 changes: 26 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,44 @@ plexdl = 'plexdl.cli:main'

[tool.poetry.dependencies]
python = "^3.7"
click = "^7.0"
PlexAPI = "^3.2"
humanfriendly = "^7.0"
click = "^7.1.2"
PlexAPI = "^4.0.0"
humanfriendly = "^8.2"
importlib_metadata = "^1.6.1"
requests = "^2.23.0"

[tool.poetry.dev-dependencies]
black = "^19.10b0"
bpython = "^0.18"
flake8 = "^3.7"
tox = "^3.15.2"
pytest = "^5.4.3"

[tool.black]
# https://github.com/psf/black#configuration-format
line-length = 132

[tool.dephell.main]
from = {format = "poetry", path = "pyproject.toml"}
to = {format = "setuppy", path = "setup.py"}

[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37,38
skipsdist = True
[testenv]
whitelist_externals = poetry
#skip_install = true
deps = pre-commit
commands =
pre-commit install -f --install-hooks
pre-commit run --all-files
poetry install -vvv
poetry run pytest tests/
[pep8]
ignore = E265
"""
[build-system]
requires = ["poetry>=1.0.2"]
build-backend = "poetry.masonry.api"
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""plexdl test module."""
6 changes: 4 additions & 2 deletions tests/example_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from plexdl import Client
"""plexdl boilerplate tests."""
from plexdl.plexdl import Client


def test_hello():
assert Client.hello() == "world"
"""Hello world test."""
assert Client.available_servers == []
11 changes: 0 additions & 11 deletions tox.ini

This file was deleted.

0 comments on commit 664c0ee

Please sign in to comment.