-
Notifications
You must be signed in to change notification settings - Fork 2
How to Develop (Environment and Each Command information)
simonritchie edited this page Jan 16, 2022
·
7 revisions
This document is outdated and will be moved to GitHub Pages documents.
$ cd <your project root directory path>
$ docker image build -t apysc:0.1.1 .
$ docker run -it --name apysc -v <your host workspace dir>:/mnt/apysc -t apysc:0.1.1 bash
e.g.,
$ docker run -it --name apysc -v /d/workspace/github/apysc:/mnt/apysc -t apysc:0.1.1 bash
docker start apysc
docker container exec -it apysc bash
docker container stop apysc
docker container rm apysc
$ cd <your project root directory path>
$ docker image build -t apysc_test_projects:0.1.1 ./test_projects/
$ docker run -it --name apysc_test_projects-v <your host workspace dir>:/mnt/test_projects -t apysc_test_projects:0.1.1 bash
e.g.,
$ docker run -it --name apysc_test_projects -v /d/workspace/github/apysc/test_projects:/mnt/test_projects -t apysc_test_projects:0.1.1 bash
docker start apysc_test_projects
docker container exec -it apysc_test_projects bash
$ pytest -v -s --workers auto
With coverage (these command becomes slow):
$ pytest --cov=./apysc tests/ -v -s --workers auto
If you want to check coverage missed statement, add --cov-report term-missing
option:
$ pytest --cov=./apysc tests/ -v -s --workers auto --cov-report term-missing
$ pytest ./apysc/ --doctest-modules --workers auto -v -s
$ python apply_lints.py
$ autoflake --in-place --remove-unused-variables --remove-all-unused-imports -r .
$ isort --force-single-line-imports .
$ autopep8 --in-place --aggressive --aggressive -r --ignore=E402 .
$ flake8 --ignore E402,W503 ./
$ numdoclint -p ./ -r -f test,sample,_test,_sample
$ mypy --ignore-missing-imports --follow-imports skip --disallow-untyped-calls --disallow-untyped-defs --strict-optional --strict-equality ./apysc/ ./tests/ ./test_projects/
Build project for PyPI:
$ python build.py
Upload to PyPI:
$ twine upload dist/*