diff --git a/Makefile b/Makefile index 8ec1f9c..b802845 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,9 @@ test: ## run tests quickly with the default Python py.test install: clean ## install the package to the active Python's site-packages - python setup.py install + pip install -e . +# pip install -r requirements.txt + pip install -r dev-requirements.txt clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts @@ -61,3 +63,6 @@ clean-test: ## remove test and coverage artifacts rm -f .coverage rm -fr htmlcov/ rm -fr .pytest_cache + +venv: ## Set up a new virtualenvironment + test -d .venv || virtualenv .venv --prompt='(toggl) ' diff --git a/dev-requirements.txt b/dev-requirements.txt index e079f8a..ca225f9 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1 +1,3 @@ pytest +black +jupyterlab diff --git a/setup.py b/setup.py index 643b042..6289f2b 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,9 @@ description="Toggl datawrangling in python.", packages=find_packages(), install_requires=[ - "certifi==2018.1.18", - "pandas==0.22.0", - "pyaml==17.12.1", - "dateparser==0.6.0", + "certifi", + "pandas", + "pyaml", + "dateparser", ], ) diff --git a/tests/test_endpoints.py b/tests/test_endpoints.py index 133ae4f..d2e4b5d 100644 --- a/tests/test_endpoints.py +++ b/tests/test_endpoints.py @@ -9,10 +9,7 @@ def test_static_endpoints(): assert Endpoints.REPORT_SUMMARY == "https://toggl.com/reports/api/v2/summary" assert Endpoints.START_TIME == "https://www.toggl.com/api/v8/time_entries/start" assert Endpoints.TIME_ENTRIES == "https://www.toggl.com/api/v8/time_entries" - assert ( - Endpoints.CURRENT_RUNNING_TIME - == "https://www.toggl.com/api/v8/time_entries/current" - ) + assert Endpoints.CURRENT_RUNNING_TIME == "https://www.toggl.com/api/v8/time_entries/current" assert Endpoints.REPORT_WEEKLY == "https://toggl.com/reports/api/v2/weekly" @@ -21,14 +18,8 @@ def test_stop_time(): def test_workspacde_projects(): - assert ( - Endpoints.WORKSPACE_PROJECTS(1) - == "https://www.toggl.com/api/v8/workspaces/1/projects" - ) + assert Endpoints.WORKSPACE_PROJECTS(1) == "https://www.toggl.com/api/v8/workspaces/1/projects" def test_client_projects(): - assert ( - Endpoints.CLIENT_PROJECTS(1) - == "https://www.toggl.com/api/v8/clients/1/projects" - ) + assert Endpoints.CLIENT_PROJECTS(1) == "https://www.toggl.com/api/v8/clients/1/projects" diff --git a/toggl/intacct/intacct.py b/toggl/intacct/intacct.py index 330200a..aa8ad99 100644 --- a/toggl/intacct/intacct.py +++ b/toggl/intacct/intacct.py @@ -1,5 +1,4 @@ import yaml - import toggl INTACCT_CODE_MAPPING_FILENAME = "code_mapping.yml"