Skip to content

Commit 3136ee1

Browse files
authored
Merge pull request #21 from bear/issue-20_update-to-python-v3
Issue #20 - refactor for Python 3.7 and Pipenv
2 parents 91a05fb + 48f2fd6 commit 3136ee1

22 files changed

+598
-194
lines changed

.circleci/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
executorType: docker
3+
4+
version: 2
5+
jobs:
6+
build:
7+
working_directory: ~/ronkyuu
8+
docker:
9+
- image: circleci/python:3.7
10+
environment:
11+
PIPENV_VENV_IN_PROJECT: true
12+
steps:
13+
- checkout # check out source code to working directory
14+
- run:
15+
command: |
16+
make env
17+
- run:
18+
command: |
19+
make info
20+
- run:
21+
command: |
22+
make test
23+
- run:
24+
command: |
25+
make coverage

Makefile

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,46 @@
11
help:
22
@echo " env install all production dependencies"
3-
@echo " dev install all dev and production dependencies (virtualenv is assumed)"
43
@echo " clean remove unwanted stuff"
54
@echo " lint check style with pycodestyle"
65
@echo " test run tests"
76
@echo " coverage run codecov"
87

98
env:
10-
pyenv install -s 2.7.12
11-
pyenv install -s 3.5.2
12-
pyenv local 2.7.12 3.5.2
13-
pip install -U pip
14-
15-
dev: env
16-
pip install -Ur requirements.txt
17-
pip install -Ur requirements-test.txt
9+
pipenv install -d
1810

1911
info:
20-
@python --version
21-
@pyenv --version
22-
@pip --version
23-
@pycodestyle --version
12+
@pipenv run python --version
13+
@pipenv graph
2414

2515
clean:
2616
rm -rf build
2717
rm -rf dist
2818
rm -f violations.flake8.txt
29-
python setup.py clean
19+
pipenv clean
20+
pipenv run python setup.py clean
3021
find . -name '*.pyc' -exec rm -f {} \;
3122
find . -name '*.pyo' -exec rm -f {} \;
3223
find . -name '*~' ! -name '*.un~' -exec rm -f {} \;
3324

34-
lint: info
35-
pycodestyle
25+
lint:
26+
pipenv run pylint --rcfile=./setup.cfg ronkyuu tests
3627

3728
test: lint
38-
python setup.py test
39-
40-
tox.ini: requirements.txt requirements-test.txt
41-
tox --recreate
42-
43-
tox: tox.ini
44-
tox
29+
pipenv run python setup.py test
4530

4631
coverage: clean
47-
coverage run --source=ronkyuu setup.py test
48-
49-
ci: lint coverage
50-
@coverage html
51-
@coverage report
52-
# CODECOV_TOKEN=`cat .codecov-token` codecov
32+
pipenv run coverage run --source=ronkyuu setup.py test
33+
pipenv run coverage report
34+
pipenv run coverage html
35+
pipenv run codecov
5336

5437
check: clean
5538
check-manifest
56-
python setup.py check
39+
pipenv run python setup.py check
5740

5841
upload: check
59-
python setup.py sdist upload
60-
python setup.py bdist_wheel upload
42+
pipenv run python setup.py sdist upload
43+
pipenv run python setup.py bdist_wheel upload
6144

6245
dist: check
63-
python setup.py sdist
46+
pipenv run python setup.py sdist

Pipfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[[source]]
2+
name = "pypi"
3+
url = "https://pypi.org/simple"
4+
verify_ssl = true
5+
6+
[dev-packages]
7+
pytest = "*"
8+
pytest-cov = "*"
9+
pytest-runner = "*"
10+
mccabe = "*"
11+
flake8 = "*"
12+
coverage = "*"
13+
coveralls = "*"
14+
codecov = "*"
15+
check-manifest = "*"
16+
httmock = "*"
17+
wheel = "*"
18+
pylint = "*"
19+
20+
[packages]
21+
requests = "*"
22+
beautifulsoup4 = "*"
23+
mf2py = "*"
24+
html5lib = "*"
25+
26+
[requires]
27+
python_version = "3.7"

0 commit comments

Comments
 (0)