Python
Part 1
YouTube VideoPart 2
YouTube VideoTox Changes
The tox.ini
file has been updated to allow testing with a display, and will now run the full unit test suite.
[testenv]
deps = -rrequirements.txt
ignore_errors = True
passenv = DISPLAY
commands = python3 -m mypy -p src --html-report reports/mypy
python3 -m coverage run --source src -m pytest --html=reports/pytest/index.html
python3 -m coverage html -d reports/coverage
python3 -m flake8 --docstring-convention google --format=html --htmldir=reports/flake
Outline
Here is a basic outline of the steps to follow to complete this example.
- Clone Starter Code from GitHub
git clone <url> python
- Run Project
cd python
python3 -m src
- Install Tox
pip3 install tox
- Check & Test Existing Project
python3 -m tox
-
Confirm that project runs and has no style errors.
-
Handle Save Events
-
Handle Cancel Events
-
Switch Listbox to Tree in Sidebar
-
Populate Tree with Elements
-
Handle Edit Events
-
Handle Delete Events
-
Create Unit Tests
-
When complete, use Git to commit and push updated code.
git add .
git commit -m "Example Complete"
git push
- On GitHub, create a release tag and submit URL to Canvas for grading.