Our lab machines still using Python 3.10.x. GitHub Codespace should still be using Python 3.12.x. Student who want to run the grading script locally may download 3.13 from python.org website.
Install the pinned dependencies.
python -m pip install -r dev-requirements.txt
Install the build-time dependencies.
python -m pip install --upgrade build twine
To build, run
python -m build
To locally install, run
python -m pip install -e ".[dev,doc]" --config-settings editable_mode=compat
Please make sure that the package is installed with .[dev]
, then run
pytest tests/
Run the test for various python's versions, run
tox
With test coverage
pytest --cov=grading_lib tests/
If you want to view the HTML report instead, run
coverage html
then open the HTML file in your browser.
tox -edocs
-
Check that unit testing on Windows and MacOs do not fail.
-
Run tox.
-
Update
grading_lib/VERSION
file. -
Update
CHANGELOG.md
file. -
Make a commit.
-
Tag the commit.
-
Push to GitHub.
-
Approve the deployment flow on GitHub Actions.
There should be no need of running these commands manually now that the workflow is setup to auto publish to both PyPI and GitHub's Releases.
However, if the workflow is breaking, for example, you can run these commands to manually publish.
Make sure you build the package.
python -m twine upload dist/*
If you want to test something out.
python -m twine upload -r testpypi dist/*
After new depenency is added, please pin the dependencies by running
python -m piptools compile -o requirements.txt pyproject.toml
python -m piptools compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
Please install pip-tools
if it is not installed.
python -m piptools compile --upgrade