Skip to content

Commit 725b473

Browse files
committed
fixing up some project configuration, fixing the testing endpoint
1 parent d2d6284 commit 725b473

File tree

11 files changed

+60
-28
lines changed

11 files changed

+60
-28
lines changed

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
language: python
21
dist: xenial
3-
python:
4-
- '3.6'
2+
language: python
3+
matrix:
4+
include:
5+
- python: 3.5
6+
env: TOXENV=py35
7+
- python: 3.6
8+
env: TOXENV=py36
9+
- python: 3.7
10+
env: TOXENV=py37
511
install:
612
- pip install -r requirements.txt
7-
- pip install -r dev-requirements.txt
8-
script: make
13+
- pip install -r requirements-dev.txt
14+
script: tox
915
after_script: cd ~
1016
after_success: coveralls --verbose
1117
deploy:
1218
provider: pypi
1319
user: jacobi
20+
skip_existing: true
1421
on:
1522
branch: master
1623
tags: true

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Jacobi Petrucciani
3+
Copyright (c) 2019 Jacobi Petrucciani
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@ html_report = --cov-report html
55
term_report = --cov-report term
66
xml_report = --cov-report xml
77
reports = $(html_report) $(term_report) $(xml_report)
8+
target = --target-version py34
9+
810

911
all: test_all
1012

1113
test_all:
12-
$(base_command) $(coverage) $(reports) -s --pyargs $(repo)
14+
@$(base_command) $(coverage) $(reports) -s --pyargs $(repo)
15+
16+
check_format:
17+
@black $(target) --check $(repo)/
1318

19+
format:
20+
@black $(target) $(repo)/
1421

15-
.PHONY: test_all
22+
.PHONY: test_all check_format format

dev-requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

pyclickup/globals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"""
44

55

6-
__version__ = "0.1.3"
6+
__version__ = "0.1.4"
77

88

99
LIBRARY = "pyclickup"
1010
API_URL = "https://api.clickup.com/api/v1/"
1111

1212

13-
TEST_API_URL = "https://private-anon-8c786c6f10-clickup.apiary-mock.com/api/v1/"
13+
TEST_API_URL = "https://private-anon-efe850a7d7-clickup.apiary-mock.com/api/v1/"
1414
TEST_TOKEN = "access_token"
1515

1616

pyclickup/models/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
api_url: str = API_URL,
3131
cache: bool = True,
3232
debug: bool = False,
33-
user_agent: str = '{}/{}'.format(LIBRARY, __version__)
33+
user_agent: str = "{}/{}".format(LIBRARY, __version__),
3434
) -> None:
3535
"""creates a new client"""
3636
if not token:

pyclickup/test/test_pyclickup.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
a base test suite for pyclickup
33
"""
44
from datetime import datetime
5-
from pyclickup.models import List, Project, Space, Status, Tag, Task, Team, User, LIBRARY
5+
from pyclickup.models import (
6+
LIBRARY,
7+
List,
8+
Project,
9+
Space,
10+
Status,
11+
Tag,
12+
Task,
13+
Team,
14+
User,
15+
)
616
from pyclickup.models.client import test_client, ClickUp
7-
8-
from ..globals import __version__, TEST_TOKEN
17+
from pyclickup.globals import __version__, TEST_TOKEN
918

1019

1120
CLICKUP = test_client()
@@ -21,19 +30,16 @@ def is_list_of_type(check_list, check_type):
2130
def test_user_agent():
2231
"""tests the default user agent"""
2332
headers = CLICKUP.headers
24-
assert isinstance(headers, (dict, ))
25-
assert headers['User-Agent'] == '{}/{}'.format(
26-
LIBRARY,
27-
__version__
28-
)
33+
assert isinstance(headers, (dict,))
34+
assert headers["User-Agent"] == "{}/{}".format(LIBRARY, __version__)
2935

3036

3137
def test_custom_user_agent():
3238
"""tests the custom user agent"""
33-
test_user_agent = 'brwnppr/0.96'
34-
headers = ClickUp(token=TEST_TOKEN, user_agent=test_user_agent, ).headers
35-
assert isinstance(headers, (dict, ))
36-
assert headers['User-Agent'] == test_user_agent
39+
test_user_agent = "brwnppr/0.96"
40+
headers = ClickUp(token=TEST_TOKEN, user_agent=test_user_agent).headers
41+
assert isinstance(headers, (dict,))
42+
assert headers["User-Agent"] == test_user_agent
3743

3844

3945
def test_user():

requirements-dev.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
colorama==0.3.7
2+
pytest==4.4.0
3+
pytest-cov==2.6.1
4+
tox==3.13.1
5+
coveralls==1.5.0

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ python_version = 3.5
33
disallow_untyped_defs = False
44
ignore_missing_imports = True
55

6-
76
[flake8]
87
ignore = N802,N807,W503
98
max-line-length = 100

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""
55
from setuptools import setup, find_packages
66

7+
78
LIBRARY = "pyclickup"
89

910

tox.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tox]
2+
envlist = py{35,36,37}
3+
4+
[testenv]
5+
setenv =
6+
PYTHONPATH = {toxinidir}
7+
deps =
8+
-r{toxinidir}/requirements.txt
9+
-r{toxinidir}/requirements-dev.txt
10+
commands =
11+
py.test --basetemp={envtmpdir} {posargs}

0 commit comments

Comments
 (0)