pythoninthegrass / python_template

It's dangerous to go alone
The Unlicense
14 stars 7 forks source link

Cookiecutter + Cruft Setup #9

Open pythoninthegrass opened 2 years ago

pythoninthegrass commented 2 years ago

Inspired by this post detailing templating via cookiecutter and cruft, would love to parameterize a good portion of this public template to make starting future Python projects less cumbersome.

Current okay method for creating a new repo:

# create repo from template
gh repo create delete_moi --public --template "pythoninthegrass/python_template" 

# clone repo locally
cd ~/git && gh repo clone delete_moi && cd delete_moi/

# remove a bunch of irrelevant directories and files
rm -rf terraform/ pyproject.toml poetry.lock requirements.txt startup.sh jupyter/

# create new poetry project
poetry init

# create virtual environment with dependencies
poetry install

# export requirements.txt
poetry export -f requirements.txt --output requirements.txt --without-hashes

To be fair, also have Docker files that negate some of that. Using the #8 will help, but cookiecutter + cruft fill in the gaps for non-Docker scaffolding and syncing repos when upstream changes are made.

pythoninthegrass commented 2 years ago

For Hacktoberfest participants, PRs have to be submitted starting October 1st. I'll hold off on approval/merging until October 1st so you get credit.

EDIT To make sure you get credit, please fork the repo and make changes locally. Then submit a PR on October 1st. Out of my hands 🙌