Installation

Requirements

Thermal Cable Model requires Python 3.9 or later and the following packages:

Install from source

Clone the repository and install in editable (development) mode:

git clone https://github.com/your-org/thermal-fem.git
cd thermal-fem
pip install -e .

This installs thermal_cable_model as an editable package so that changes to the source code are reflected immediately.

Install dependencies only

If you prefer to run the examples without installing the package, make sure the dependencies are available:

pip install numpy scipy matplotlib

Then add the repository root to your PYTHONPATH or run scripts from the repository directory.

Building the documentation

The documentation uses Sphinx with the Read the Docs theme:

pip install sphinx sphinx-rtd-theme
cd docs
make html

The built HTML pages are in docs/_build/html/.

GitHub Pages (CI deploy)

The repository includes a workflow that builds Sphinx and deploys with actions/deploy-pages. You must enable Pages once in the GitHub UI or deployment returns 404 / “Creating Pages deployment failed”:

  1. Open Settings → Pages for the repository.

  2. Under Build and deployment, set Source to GitHub Actions (not “Deploy from a branch”).

  3. Re-run the failed workflow (Actions → Deploy documentation → Re-run jobs).

Private repositories: GitHub Pages for private repos requires a paid plan (e.g. GitHub Pro for personal accounts). On a free account, make the repository public or host docs elsewhere (e.g. Read the Docs).

The site URL is https://<owner>.github.io/<repo>/; SPHINX_HTML_BASEURL in the workflow matches this for canonical links.

Verifying the installation

After installation, verify that the package loads correctly:

import thermal_cable_model
print(thermal_cable_model.__version__)
# 0.1.0

You can also run the test suite (requires pytest):

pip install pytest
pytest tests/