- git init
- git config
- poetry install
- git commit
- code
- git commit
- tox
Run tox to format code style and check test.
tox
Modify package version value, then commit.
Add tag
git tag -a v0.1.0
Build this tag distribution package.
poetry build
Upload to pypi server, or pass --repository https://pypi.org/simple
to specify index server.
poetry publish
Open project use Pycharm.
Check menu bar, click File
--> Settings
--> Project Settings
--> Project Structure
.
Mark src
and tests
directory as sources.
Click File
--> Settings
--> Tools
--> Python Integrated Tools
--> Testing
--> Default runner
, then select
pytest
.
If you run test by Unittests
before, you should delete configuration. Open Edit Run/Debug configurations dialog
in
In the upper right corner of Pycharm window, then delete configuration.
You should confirm src
directory in sys.path
. You can add it by sys.path.extend(['/tmp/demo/src'])
if it not exist.