Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.96 KB

File metadata and controls

74 lines (52 loc) · 2.96 KB

Dynamics and Control notebooks

The tbcontrol package collects functions useful for the kinds of problems encountered in undergraduate process control textbooks. It is the distributable part of this larger collection of Jupyter notebooks for CPN321 (Process Dynamics) and CPB421 (Process Control) at the University of Pretoria.

There is also a Dynamics and Control YouTube channel with videos related to the notebooks.

Environment setup

The supported notebook environment is managed by uv and pinned to Python 3.13 through .python-version. The published tbcontrol library is intentionally less restrictive: it supports Python 3.10 and newer, has no upper bounds on its runtime dependencies, and is tested separately across Python 3.10–3.14.

On macOS, install uv with Homebrew:

brew install uv

Other platforms can use the official uv installation instructions.

A plain sync installs the ordinary notebook environment:

uv sync
uv run jupyter lab

The neural-network notebook and the test tools are kept in focused groups. Install them when running the complete test suite:

uv sync --group ml-ai --group test --group notebook-test
uv run --group ml-ai --group test pytest tests
uv run --group ml-ai --group test --group notebook-test pytest -n 2 --verbose test_all_notebooks.py

The dependency groups are:

  • default: Jupyter and the constrained numerical, symbolic, control, spreadsheet, plotting, and notebook-diff packages used by this repository.
  • ml-ai: TensorFlow and Keras for 1_Dynamics/7_System_identification/Neural networks.ipynb.
  • test: the lightweight tbcontrol package-test dependency.
  • notebook-test: notebook execution and parallel-test tooling.
  • docs: Sphinx and the documentation extensions used by Read the Docs.

To build the documentation locally:

uv sync --group docs
uv run --group docs sphinx-build -M html . _build

Direnv

The repository's .envrc uses layout uv. Install direnv, add its shell hook, and install the uv layout from the direnv wiki, then run:

direnv allow

Configure editors and notebook clients to use .venv/bin/python.

Notebook and documentation links

Tests Documentation Status