Metadata-Version: 2.4
Name: ThermalNetwork
Version: 0.4.1
Summary: A thermal network solver for GHE sizing.
Author-email: Matt Mitchell <mitchute@gmail.com>, Nathan Moore <nathan.moore@nrel.gov>
Project-URL: Homepage, https://github.com/NREL/ThermalNetwork
Project-URL: Bug Tracker, https://github.com/NREL/ThermalNetwork/issues
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click~=8.1
Requires-Dist: ghedesigner~=2.0
Requires-Dist: loguru~=0.7
Requires-Dist: pandas~=2.0
Requires-Dist: SecondaryCoolantProps~=1.3
Requires-Dist: scipy~=1.15
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov~=6.0; extra == "dev"
Requires-Dist: pytest-xdist~=3.6; extra == "dev"
Requires-Dist: pre-commit~=3.7; extra == "dev"
Requires-Dist: mkdocs-material~=9.5; extra == "dev"
Dynamic: license-file

# ThermalNetwork

A library for sizing multiple ground heat exchangers distributed around a single-pipe thermal network.

# Installation

`pip install ThermalNetwork`

# Documentation

Available at https://nrel.github.io/ThermalNetwork/

# Usage

This package has a command-line interface, intended to be used via URBANopt. To access the CLI directly, after installing call `thermalnetwork --help` for all the commands.

# Developer installation

- Clone the repository: `git clone https://github.com/NREL/ThermalNetwork.git`
- Change directories into the repository: `cd ThermalNetwork`
- We recommend using virtual environments on principle to avoid dependencies colliding between your Python projects. [venv](https://docs.python.org/3/library/venv.html) is the Python native solution that will work everywhere, though other options may be more user-friendly.
    - Some popular alternatives are:
        - [pyenv](https://github.com/pyenv/pyenv) and [the virtualenv plugin](https://github.com/pyenv/pyenv-virtualenv) work together nicely for Linux/Mac machines
        - [virtualenv](https://virtualenv.pypa.io/en/latest/)
        - [miniconda](https://docs.conda.io/projects/miniconda/en/latest/)
        - [uv](https://docs.astral.sh/uv/)

Once you have set up your environment:
- Update pip and setuptools: `pip install -U pip setuptools`
- Install the repository with developer dependencies: `pip install -e .[dev]`
- Activate pre-commit (only once, after making a new venv): `pre-commit install`
    - Runs automatically on your staged changes before every commit
    - Includes linting and formatting via [ruff](https://docs.astral.sh/ruff/)
- To check the whole repo, run `pre-commit run --all-files`
    - Settings and documentation links for pre-commit and ruff are in .pre-commit-config.yaml and ruff.toml
    - Pre-commit will run automatically during CI, linting and formatting the entire repository.

# Testing

Once you are set up as a developer, run `pytest` from the root dir. Increase verbosity with `-v` and `-vv`.

Test coverage results will be saved to _htmlcov/index.html_.

Test files are in _tests/_

Test output will be written to _tests/test_output/_

# Releasing

Versioning is done by GitHub tag, thanks to [SetupTools-SCM](https://setuptools-scm.readthedocs.io/en/latest/). Use [semantic versioning](https://semver.org/) when tagging. When a new release is made in GitHub, a [workflow](https://github.com/marketplace/actions/pypi-publish) automatically publishes to PyPI.
