Running Git Commands from Python
Once scaffold writes all the project files, it needs to turn the directory into an actual git repository - run git init, stage everything, and make the first commit. I went with running the git binary
Search for a command to run...
Articles tagged with #python
Once scaffold writes all the project files, it needs to turn the directory into an actual git repository - run git init, stage everything, and make the first commit. I went with running the git binary
With the CLI shell in place, the next problem was what scaffoldr init actually creates. In v0.1.0, every project got the same directory structure and files - README, CONTRIBUTING guide, pyproject.toml
I'd used argparse before. It's clunky - lots of boilerplate for even simple commands. Typer works differently. You write a normal function with type annotated parameters. Typer builds the CLI from the
With local scaffolding done, scaffoldr new needed to create a repo on GitHub. That means authenticating with a token, sending HTTP requests to GitHub's REST API, and handling whatever comes back - suc
Everytime I created a new project, I'd go through the same ritual. Create the repo, clone it, set up the directory structure, write the initial pyproject.toml, configure CI, add branch protection, cre
The Problem If you've ever recorded a screencast or a demo video, you've probably experienced this: you play it back and all you can hear is the hum of your pc, the fan in the background, or streetnoi