PythonCookAll capstones

Capstone 1 of 4

Tested utility

A small Python tool on GitHub with a green test suite.

Build one small, useful command-line tool or library and prove it works with tests. A good size: a tool that counts how often each word appears in a text file, or one that cleans up a messy CSV. Write pytest tests for it, then set up GitHub Actions so the tests run on every push and show a green tick anyone can see.

Before you submit

How to ship it

GitHub and Actions

  1. 1

    Put the project under Git

    In your project folder, run git init, then git add . and git commit -m "first commit". This saves a snapshot of your code.

  2. 2

    Create a public repo and push

    Make a new public repository on github.com, then follow the two push lines it shows you (git remote add origin ... and git push -u origin main).

  3. 3

    Add a tests workflow

    Create the file .github/workflows/tests.yml that installs Python, installs your dependencies, and runs pytest. Commit and push it.

  4. 4

    Watch it go green

    Open the Actions tab on your repo. The run should finish with a green tick. If it is red, click it, read the first failing step, fix that, and push again.

Submit and verify

Paste your public links. PythonCook checks them and, if anything is not ready, tells you the exact next step.