Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.92 KB

README.md

File metadata and controls

57 lines (41 loc) · 1.92 KB

build

python-template

Python package and CLI template available on both PyCharm and Visual Studio Code (VSCode)

Features

PyCharm VSCode Commands
Type check via PyCharm via Pylance make check
Format/Check (black/isort) make format/check
Test (pytest/doctest) make test

Usage

  1. Click Use this template in github.com/sotetsuk/python-template
  2. Write up setup.py
    • If you do not create CLI, please remove entory_points
  3. Rename Python package name following the instruction below
  4. For CLI usage, please rename command name folowing the instruction below
  5. Attach new CI badge
  6. Attach new License

Rename mypkg to your package name

$ export PKG_NAME=<YOUR PACKAGE NAME>
$ git mv mypkg ${PKG_NAME}
$ for f in $(git grep mypkg | cut -d ":" -f 1); do sed -i "" -e "s/mypkg/${PKG_NAME}/" ${f} ; done

Rename mycmd to your command name

$ export CMD_NAME=<YOUR COMMAND NAME>
$ for f in $(git grep mycmd | cut -d ":" -f 1); do sed -i "" -e "s/mycmd/${PKG_NAME}/" ${f} ; done

Interpreter settings

This project uses virtualenv in <repo-root>/venv. Please initialize it if not exists.

Run all tests

License

MIT License