Skip to content

Cookiecutter + Cruft Setup #9

Open
@pythoninthegrass

Description

@pythoninthegrass

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions