logo

... makefiles: phony folders



Notes

We're demoing pdoc which can be installed via;

pip install pdoc3

There are a few edits we've made to our Makefile.

.PHONY: docs

test:
    pytest tests.py

clean:
    rm -rf __pycache__ .pytest_cache

flake:
    flake8 common.py tests.py

check: flake test clean

docs:
    pdoc --html --force --output-dir docs common

Note when you copy the above file; the indentation must be a tab in a Makefile. What you copy may contain spaces instead.

There's also a docstring now in the common.py file.

def add(n1, n2):
    """This functions adds numbers together."""
    return n1 + n2

Feedback? See an issue? Something unclear? Feel free to mention it here.



If you want to be kept up to date, consider signing up for the newsletter.