Python Code Generator
pip install pycodegen
or install with PDM
pdm add pycodegen
or install with pipx1
pipx install git+https://github.com/myrontuttle/pycodegen.git
from pycodegen.coder import Coder
coder = Coder("repo_owner", "repo_name")
issue_number = 1
open_response_code = coder.open_issue(issue_number)
code_response_code = coder.start_coding()
# Work on issue
finish_response_code = coder.finish_issue("commit_msg")
Command line (install with pipx)
coder start <githubaccount> <project> [-i <issuenumber>]
coder code <githubaccount> <project>
# Work on issue
coder finish <githubaccount> <project> [-m "<commit message>"]
Makefile
contains a lot of functions for faster development.
Install requirements: ```bash make install ``` Update PDM ```bash make update ``` Update all dev libraries to the latest version using one command ```bash make update-dev-deps ```
Automatic formatting uses `autoflake`, `pyupgrade`, `isort` and `black`. ```bash make format ``` Codestyle checks only, without rewriting files: ```bash make check-codestyle ``` > Note: `check-codestyle` uses `isort`, `black` and `ruff` library
```bash make check-security ``` This command launches `PDM` integrity checks as well as identifies security issues with `Bandit`. ```bash make check-security ```
Run `mypy` static type checker ```bash make mypy ```
Run `pytest` ```bash make test ```
Run all checks: ```bash make check-all ``` the same as: ```bash make check-style && make mypy && make check-safety && make test ```
Prepare to deploy ```bash make prepare-deploy ```
Delete pycache files ```bash make pycache-remove ``` Remove package build ```bash make build-remove ``` Remove .mypycache ```bash make mypycache-remove ``` Or to remove all above run: ```bash make cleanup ```
Built using project template here.