Skip to content

A bash script that scaffolds a prython project using poetry, mkdocs for documentation, pytest, black, isort and flake8 for testing and adds useful git-commit hooks.

mugendi/poetry-project-scaffold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poetry-project ⚙️ 💪

github-watchers github-stars github-forks

View on Asciinema

Poetry is an amazing tool for dependency management and packaging in Python. When used together with other amazing libraries such as flake8, mkdocs and many others, you can create Pro Python Projects everty single time.

This is a bash script that performs simple scaffolding for you and configures all the tools you need based on This Brilliant Article. The only main deviation from the article is that we use mkdocs and not sphinx coz i find the tooling simpler and better.

Installation

Simple Installation

To install on Linux, run the command below:

curl https://raw.githubusercontent.com/mugendi/poetry-project-scaffold/master/install.sh | bash

This simply loads and runs install.sh Which fetches poetry-project.sh, saves it in ~/.local/bin directory.

If you are not running Linux or do not have the ~/.local/bin directory, then you can try manual installtion.

Manual Installation

For non-linux systems, you can attempt the following installation procedure.

  1. Clone this repo: git clone https://github.com/mugendi/poetry-project-scaffold.git

  2. Navigate to cloned repo dir: cd poetry-project-scaffold

  3. Copy poetry-project.sh : cp poetry-project.sh poetry-project

  4. Make poetry-project executable: chmod +x poetry-project

  5. Either run poetry-project from this directory ./poetry-project or move it to a folder that is $PATH accessible.

Running

Simply run the poetry-project script: bash poetry-project

Dummy Project

Dummy Project Docs

To help you visualize what kind of poetry project is generated, we created a dummy project repo and deployed the documentation (mkdocs gh-deploy) without changing anything.

PS

I have documented some of the functions used in this bash script HERE mostly because most took a lot of googling to put together and because I would love to re-use most in other projects with ease.

You can have a look too and see if anything there is of benefit to you!

About

A bash script that scaffolds a prython project using poetry, mkdocs for documentation, pytest, black, isort and flake8 for testing and adds useful git-commit hooks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages