pythoninthegrass / mvp

minimum viable python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mvp

minimum viable python

Summary

Sets up a new development environment for a Mac or Linux (i.e., UNIX) box.

Table of Contents

Setup

Minimum requirements

Recommended requirements

Development

Makefile

# install all repo dependcies
make install

# install specific repo dependencies
make <xcode|asdf|brew|devbox|pre-commit|task>

Taskfile

λ task
task: [default] task --list
task: Available tasks for this project:
* checkbash:            Check bash scripts
* export-reqs:          Export requirements.txt
* install:              Install project dependencies
* pre-commit:           Run pre-commit hooks
* run:                  Run the playbook
* run-dev:              Run the playbook with tags and debug
* update-deps:          Update dependencies
* docker:build:         Build the docker image
* docker:down:          Stop and remove containers, networks, and volumes with docker compose
* docker:exec:          Shell into a running container               
* docker:logs:          Follow the logs of a running container               
* docker:net:           Create docker network 
* docker:prune:         Prune docker          
* docker:push:          Push the docker image to the registry                
* docker:stop:          Stop the project with docker compose                  
* docker:up:            Start the project with docker compose                  
* docker:vol:           Create docker volume  

Devbox

Devbox takes care of setting up a dev environment automatically. Under the hood it uses Nix Package Manager.

Currently, it supports the following:

# enter dev environment
devbox shell

# run repl
python

# exit dev environment
exit

# run tests
devbox run test

Tilt

minikube start --memory=2048 --cpus=2 --kubernetes-version=v1.28.3 -p minikube
git clone https://github.com/tilt-dev/tilt-example-python
cd tilt-example-python/3-recommended
tilt up
minikube stop
minikube delete
rm -rf tilt-example-python

TODO

Further Reading

About

minimum viable python

License:The Unlicense


Languages

Language:Makefile 47.8%Language:Dockerfile 37.3%Language:Shell 13.7%Language:Python 1.2%