Skip to content

Commit 07ef0a8

Browse files
authored
chore: add makefile to repo (#478)
1 parent c06cb78 commit 07ef0a8

File tree

4 files changed

+49
-10
lines changed

4 files changed

+49
-10
lines changed

.flake8

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[flake8]
2+
count = True
3+
max-line-length = 120
4+
5+
# W504: Line break occurred after a binary operator
6+
ignore = W504

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.PHONY: all
2+
all: help
3+
4+
.PHONY: clean
5+
clean:
6+
rm -f .coverage coverage.xml writer.pickle
7+
rm -rf .pytest_cache build dist htmlcov test-reports docs/_build
8+
9+
.PHONY: docs
10+
docs:
11+
cd docs && python -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
12+
13+
.PHONY: help
14+
help:
15+
@echo 'Makefile Targets'
16+
@echo ' clean clean up local files'
17+
@echo ' docs build docs locally'
18+
@echo ' help print this help output'
19+
@echo ' install install library as editable with all dependencies'
20+
@echo ' lint execute flake8 against source code'
21+
@echo ' test execute all tests'
22+
23+
.PHONY: install
24+
install:
25+
pip install --editable ".[test,extra,ciso,async]"
26+
27+
.PHONY: lint
28+
lint:
29+
flake8 setup.py influxdb_client/
30+
31+
.PHONY: test
32+
test:
33+
pytest tests \
34+
--cov=./ \
35+
--cov-report html:htmlcov \
36+
--cov-report xml:coverage.xml

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@
1313
]
1414

1515
test_requires = [
16+
'flake8>=5.0.3',
1617
'coverage>=4.0.3',
1718
'nose>=1.3.7',
1819
'pluggy>=0.3.1',
1920
'py>=1.4.31',
2021
'randomize>=0.13',
2122
'pytest>=5.0.0',
23+
'pytest-cov>=3.0.0',
2224
'httpretty==1.0.5',
2325
'psutil>=5.6.3',
24-
'aioresponses>=0.7.3'
26+
'aioresponses>=0.7.3',
27+
'sphinx==1.8.5',
28+
'sphinx_rtd_theme',
29+
'jinja2==3.0.3'
2530
]
2631

2732
extra_requires = [
@@ -49,7 +54,7 @@
4954

5055
meta = {}
5156
with open(Path(__file__).parent / 'influxdb_client' / 'version.py') as f:
52-
exec('\n'.join(l for l in f if l.startswith('VERSION')), meta)
57+
exec('\n'.join(line for line in f if line.startswith('VERSION')), meta)
5358

5459
setup(
5560
name=NAME,

tox.ini

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

0 commit comments

Comments
 (0)