0%

Capstone: A Persistent Lending Tool

Download and Run Your Project Locally

Your program and nine tests now belong in a source-only project you can run away from this workspace. Finish README.md before downloading so the commands travel with the code. It must say that Python 3.10 or newer is required. requirements-dev.txt already contains the exact test dependency, pytest==9.1.1; the application itself uses only Python’s standard library.

While signed in, use the workspace’s Download action and extract the ZIP into a fresh folder. The authored tree has exactly ten files:

lending.py
catalog_db.py
catalog_setup.py
catalog_import.py
demo.py
data/items.csv
tests/test_catalog.py
tests/test_lending.py
requirements-dev.txt
README.md

The ZIP also contains the generated PYTHONLAND_README.md, making eleven files. It must not contain a database, .venv, __pycache__, .pytest_cache, or another generated file. Keep catalog data.db local; create it only through init after extraction.

On , place these activation-free commands in README.md:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python lending.py init "catalog data.db"
.venv/bin/python lending.py import-items "catalog data.db" data/items.csv
.venv/bin/python lending.py available "catalog data.db"
.venv/bin/python -m pytest -q -p no:cacheprovider

On , the commands are identical:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python lending.py init "catalog data.db"
.venv/bin/python lending.py import-items "catalog data.db" data/items.csv
.venv/bin/python lending.py available "catalog data.db"
.venv/bin/python -m pytest -q -p no:cacheprovider

On Windows PowerShell, use the matching interpreter path:

py -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements-dev.txt
.venv\Scripts\python.exe lending.py init "catalog data.db"
.venv\Scripts\python.exe lending.py import-items "catalog data.db" data\items.csv
.venv\Scripts\python.exe lending.py available "catalog data.db"
.venv\Scripts\python.exe -m pytest -q -p no:cacheprovider

Each lending.py line starts a separate process, so available proves that the data created by earlier commands can be reopened. Run the nine tests twice from a fresh extraction, then try register, checkout, activity, return, and activity as separate invocations. This page cannot observe your computer or confirm a download; the local result is yours to inspect.