Skip to content

Commit 4286aed

Browse files
authored
Merge pull request #30 from bear/make-python-3-default
Adjust build environment to Python 3 standards
2 parents 8e5ffa4 + f22e190 commit 4286aed

20 files changed

+340
-452
lines changed

.circleci/config.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ jobs:
55
build:
66
working_directory: ~/ronkyuu
77
docker:
8-
- image: circleci/python:3.7
8+
- image: circleci/python:3.9
99
environment:
1010
PIPENV_VENV_IN_PROJECT: true
1111
steps:
1212
- checkout # check out source code to working directory
13-
- run:
14-
command: |
15-
make env
1613
- run:
1714
command: |
1815
make info
1916
- run:
2017
command: |
21-
make test
18+
make dev
2219
- run:
2320
command: |
2421
make coverage

.coveragerc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[run]
2+
source = ronkyuu
3+
omit=
4+
.venv/*
5+
6+
[report]
7+
exclude_lines =
8+
# Have to re-enable the standard pragma
9+
pragma: no cover
10+
11+
# Don't complain about missing debug-only code:
12+
def __repr__
13+
if self\.debug
14+
15+
# Don't complain if tests don't hit defensive assertion code:
16+
raise AssertionError
17+
raise NotImplementedError
18+
19+
# Don't complain if non-runnable code isn't run:
20+
if 0:
21+
if __name__ == .__main__.:

.gitignore

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
.DS_Store
2-
3-
*.cfg
4-
5-
*.py[cod]
1+
*.py[co]
2+
MANIFEST
63

74
# C extensions
85
*.so
96

7+
.DS_Store
8+
__pycache__
9+
.cache
10+
1011
# Packages
1112
*.egg
1213
*.egg-info
@@ -21,13 +22,8 @@ develop-eggs
2122
.installed.cfg
2223
lib
2324
lib64
24-
__pycache__
25-
.cache
2625
.eggs
2726

28-
# Installer logs
29-
pip-log.txt
30-
3127
# Unit test / coverage reports
3228
.coverage
3329
.codecov-token
@@ -52,5 +48,7 @@ env
5248

5349
violations.flake8.txt
5450

51+
.vscode
52+
5553
# Built docs
5654
doc/_build/**

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ include README.md
33
include Pipfile
44
include Pipfile.lock
55
include Makefile
6-
include pytest.ini
76
include *.py
7+
include pyproject.toml
8+
include setup.cfg
9+
include .coveragerc
810
recursive-include docs *.md
911
recursive-include tests *.py
1012
recursive-include tests *.html
1113
recursive-include tests *.json
1214
recursive-include examples *.py
15+
graft src
1316
prune .DS_Store
1417
prune .git
1518
prune .circleci

Makefile

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
11
help:
2-
@echo " env install all production dependencies"
2+
@echo " env install all dependencies"
3+
@echo " dev install all development dependencies"
34
@echo " clean remove unwanted stuff"
4-
@echo " lint check style with pycodestyle"
5+
@echo " lint lint with flake8"
56
@echo " test run tests"
67
@echo " coverage run codecov"
78

8-
env:
9-
pipenv install -d
10-
11-
info:
12-
@pipenv run python --version
13-
@pipenv graph
14-
159
clean:
1610
rm -rf build
1711
rm -rf dist
1812
rm -f violations.flake8.txt
1913
pipenv clean
20-
pipenv run python setup.py clean
21-
find . -name '*.pyc' -exec rm -f {} \;
22-
find . -name '*.pyo' -exec rm -f {} \;
23-
find . -name '*~' ! -name '*.un~' -exec rm -f {} \;
2414

25-
lint:
26-
pipenv run pylint --rcfile=./setup.cfg ronkyuu tests
15+
dev:
16+
pipenv install --dev
17+
18+
env: clean
19+
pipenv install
20+
21+
info: env
22+
@pipenv run python --version
23+
@pipenv check
24+
@pipenv graph
25+
26+
lint: dev
27+
pipenv run flake8 --tee --output-file=violations.flake8.txt
2728

2829
test: lint
29-
pipenv run python setup.py test
30+
pipenv install "-e ."
31+
pipenv run pytest
3032

3133
coverage: clean
32-
pipenv run coverage run --source=ronkyuu setup.py test
34+
pipenv install "-e ."
35+
pipenv run coverage run -m pytest
3336
pipenv run coverage report
3437
pipenv run coverage html
3538
pipenv run codecov
3639

37-
check: clean
38-
pipenv run check-manifest
39-
pipenv run python setup.py check
40+
check: env
41+
pipenv run check-manifest -v
42+
43+
dist: check
44+
pipenv run python -m build
4045

4146
upload: dist
42-
pipenv run python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
47+
pipenv run python -m twine upload --repository testpypi dist/*
4348

44-
dist: check
45-
pipenv run python setup.py sdist bdist_wheel
49+
upload-prod: dist
50+
pipenv run python -m twine upload dist/*

Pipfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ coveralls = "*"
1414
codecov = "*"
1515
check-manifest = "*"
1616
httmock = "*"
17-
pylint = "*"
1817
wheel = "*"
1918
twine = "*"
2019
bleach = "*"
@@ -24,6 +23,7 @@ requests = "*"
2423
beautifulsoup4 = "*"
2524
mf2py = "*"
2625
html5lib = "*"
26+
ronkyuu = {editable = true, path = "."}
2727

2828
[requires]
29-
python_version = "3.7"
29+
python_version = "3.9"

0 commit comments

Comments
 (0)