Metadata-Version: 2.1
Name: thermostate
Version: 1.4.0
Summary: A package to manage thermodynamic states
Home-page: https://thermostate.readthedocs.io/
Author: Bryan W. Weber
Maintainer: Bryan W. Weber
Maintainer-email: bryan.w.weber@gmail.com
License: BSD-3-clause
Project-URL: Source, https://github.com/bryanwweber/thermostate
Project-URL: Tracker, https://github.com/bryanwweber/thermostate/issues
Keywords: thermodynamics,chemistry,state,education
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Operating System :: MacOS
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 7
Classifier: Operating System :: Microsoft :: Windows :: Windows 8
Classifier: Operating System :: Microsoft :: Windows :: Windows 8.1
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: docs
Provides-Extra: testing
License-File: LICENSE.md

# ThermoState

This package provides a wrapper around [CoolProp](https://github.com/CoolProp/CoolProp) that integrates [Pint](https://pint.readthedocs.io) for easy thermodynamic state management in any unit system.

## Installation

### Conda

The preferred installation method is to use [`conda`](https://anaconda.com/download). Using Conda, ThermoState can be installed for Python 3.7 or higher. If you have an existing Conda environment with one of those Python versions, installing ThermoState can be done by:

```bash
conda install -c conda-forge thermostate
```

This installs ThermoState and its dependencies from the `conda-forge` channel.

If you do not have an environment with Python 3.7 or higher, you can create a new environment with:

```bash
conda create -n thermostate -c conda-forge thermostate
```

### Pip

Alternatively, ThermoState can be installed with pip.

```bash
python -m pip install thermostate
```

Note that for versions of Python >= 3.9, CoolProp 6.4.1 will not work from PyPI. You'll
need to install CoolProp from their source repository until CoolProp >6.4.1 is
released. In this case, you can still install ThermoState from PyPI by specifying
not to install the dependencies automatically:

```bash
python -m pip install --no-deps thermostate matplotlib numpy pint
```

Then you'll need to install CoolProp into the same environment separately. Note that the conda package is available for all Python versions after 3.7.

### From Source

ThermoState is a pure-Python package that supports any Python version 3.7 and higher. To install from source, clone the source code repository and install using `pip`.

```bash
git clone https://github.com/bryanwweber/thermostate
cd thermostate
pip install .
```

## Documentation

Documentation can be found at <https://thermostate.readthedocs.io/>. The documentation contains a short [tutorial](https://thermostate.readthedocs.io/en/stable/Tutorial.html), [examples](https://thermostate.readthedocs.io/en/stable/examples.html), and [API documentation](https://thermostate.readthedocs.io/en/stable/thermostate.html) for the package.

[![Documentation Status](https://readthedocs.org/projects/thermostate/badge/?version=stable)](https://thermostate.readthedocs.io/en/stable/?badge=stable)

## Citation

If you have used ThermoState in your work, we would appreciate including a citation to the software! ThermoState has been published in [JOSE](https://jose.theoj.org/), available at the link below.

[![DOI](https://jose.theoj.org/papers/10.21105/jose.00033/status.svg)](https://doi.org/10.21105/jose.00033)

For those using Bib(La)TeX, you can use the following entry

```bibtex
@article{weber_thermostate_2018,
    title = {{ThermoState}: {A} state manager for thermodynamics courses},
    volume = {1},
    issn = {2577-3569},
    shorttitle = {{ThermoState}},
    url = {https://jose.theoj.org/papers/10.21105/jose.00033},
    doi = {10.21105/jose.00033},
    number = {8},
    urldate = {2018-10-24},
    journal = {Journal of Open Source Education},
    author = {Weber, Bryan},
    month = oct,
    year = {2018},
    pages = {33}
}
```

## Code of Conduct & Contributing

We welcome contributions from anyone in the community. Please look at the [Contributing instructions](https://github.com/bryanwweber/thermostate/blob/master/CONTRIBUTING.md) for more information. This project follows the [Contributor Covenant Code of Conduct](https://github.com/bryanwweber/thermostate/blob/master/CODE_OF_CONDUCT.md), version 1.4\. In short, be excellent to each other.

## Continuous Integration Status

[![codecov](https://codecov.io/gh/bryanwweber/thermostate/branch/master/graph/badge.svg)](https://codecov.io/gh/bryanwweber/thermostate)[![Python package](https://github.com/bryanwweber/thermostate/workflows/Python%20package/badge.svg)](https://github.com/bryanwweber/thermostate/actions?query=workflow%3A%22Python+package%22)

## Anaconda Package Version

[![Anaconda-Server Badge Version](https://anaconda.org/bryanwweber/thermostate/badges/version.svg)](https://anaconda.org/bryanwweber/thermostate) [![Anaconda-Server Badge Downloads](https://anaconda.org/bryanwweber/thermostate/badges/downloads.svg)](https://anaconda.org/bryanwweber/thermostate)

# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

<!-- markdownlint-disable MD022 MD032 MD024 -->

## [1.4.0] - 11-FEB-2023
### Changed
- Capped the version of pint. We don't support 0.20 with this version due to a missing module.

## [1.3.0] - 14-MAR-2022
### Added
- Plots!
- Python 3.10 support
- Default units can now be specified for `State` instances

### Changed
- Python >= 3.9 requires CoolProp from their source repository

## [1.2.1] - 21-JUL-2020
### Changed
- Allow Pint up to 1.0, they seem to be pretty stable between minor version releases

### Fixed
- Typo in pythonpackage.yml

## [1.2.0] - 14-JUL-2020
### Added
- Build CoolProp from the master branch to avoid any regressions
- Cache the built CoolProp wheel, based on the CoolProp master commit hash

### Changed
- CoolProp 6.4.0 was released which supports Python 3.8 with their built wheels. Move the tests for Python 3.8 to the main test build.
- The default branch is now called `main`.

### Fixed
- Bump the `MACOSX_DEPLOYMENT_TARGET` for GitHub Actions, seems like they moved to 10.14
- Bump Pint version in the Conda recipe
- Add Matplotlib as a dependency in the Conda recipe

## [1.1.0] - 12-APR-2020
### Added
- Build CoolProp and run the tests on Python 3.8
- Set up the Matplotlib functionality built into Pint. This bumps the minimum Pint version to 0.9 and adds Matplotlib as a dependency

### Changed
- Updated documentation links in README and conda recipe to ReadTheDocs

### Fixed
- The Rankine cycle example had a dimensionality error due to better NumPy support in Pint. Fixes #24.

## [1.0.0] - 03-MAR-2020
### Added
- Switch to ReadTheDocs for documentation website
- Use `setup.cfg` and `pyproject.toml` for PEP 517 compliance

### Changed
- Switch to `src` directory source layout
- Move tests outside of the package
- Apply Black formatter to tests
- Use tox to test against multiple Python versions
- Use GitHub Actions for CI services
- Run Black formatter on `abbreviations.py` and `_version.py`
- License year in `LICENSE.md`. Happy New Year :tada:

### Fixed
- README.md and CHANGELOG.md are now included in the sdist
- `hx` and `xh` are added to the disallowed property pairs because they raise `ValueError`s in CoolProp
- Missing docstrings from some functions in `thermostate.py`

## [0.5.3] - 04-MAR-2019
### Added
- Check if temperature, pressure, and specific volume are positive (in absolute units)
- Check if the quality is between 0 and 1

### Changed
- Bump maximum allowed version of Pint

## [0.5.2] - 01-FEB-2019
### Added
- Install `conda-verify` on Travis when building tags to fix a warning from `conda-build`

### Changed
- Formatted `thermostate.py` with the Black formatter

### Fixed
- Broken link in `CONTRIBUTING.md` to `LICENSE.md`
- Installation instructions for CoolProp updated for Python 3.7
- Equality checking for `State`s now considers the substance [[#17](https://github.com/bryanwweber/thermostate/pull/17)]. Resolves [#16](https://github.com/bryanwweber/thermostate/issues/16) (Thanks [@egurra](https://github.com/egurra)!)

## [0.5.1] - 05-JAN-2019
### Added
- JOSE badge to README

### Changed
- Allow version 6.2.* of CoolProp
- Install CoolProp package for Python 3.7 from conda

### Fixed
- License year in LICENSE.md. Happy new year! :tada:

## [0.5.0] - 23-OCT-2018
### Added
- Add JOSE paper
- Add installation, documentation, code of conduct, and contributing links to README
- Document the classes in the `abbreviations` module
- Example of a cascade refrigeration cycle using EE units
- Test on Python 3.7 using the nightly version of CoolProp

### Changed
- Use the generic Python 3 for the intersphinx config rather than version specific

### Fixed
- Fix numpy and matplotlib need to be installed on Travis to build the docs
- Fix typo in code of conduct

### Removed
- Don't load the Sphinx coverage extensions

## [0.4.2] - 21-SEP-2018
### Fixed
- Travis PyPI password

## [0.4.1] - 21-SEP-2018
### Added
- Add codemeta.json

### Fixed
- Fix builds in .travis.yml
- Can't use Python 3.6 type hinting with Python 3.5

## [0.4.0] - 21-SEP-2018
### Added
- `_render_traceback_` function added to `StateError` to improve formatting of the traceback in IPython and Jupyter
- Add several examples demonstrating the use of ThermoState

### Changed
- Bump intersphinx mapping to Python 3.7
- Change docs license to CC-BY 4.0

### Fixed
- Ignore more pytest files

## [0.3.0] - 09-JUL-2018
### Fixed
- Added flake8 configuration to setup.cfg since linter-flake8 reads it and ignores built-in options
- Only define `_render_traceback_` if IPython is installed

## [0.2.4] - 08-JUL-2018
### Added
- Added `_render_traceback_` function to improve traceback formatting of `pint.DimensionalityError`

### Fixed
- Added `oxygen`, `nitrogen`, and `carbondioxide` as available substances to the Tutorial

## [0.2.3] - 24-SEP-2017
### Added
- Distributions are now uploaded to PyPI

### Changed
- Conda packages are `noarch` builds
- Appveyor tests run in a single job to speed them up
- Minimum Python version is 3.5

## [0.2.2] - 13-APR-2017
### Added
- Oxygen (O2) is available as a substance
- Nitrogen (N2) is available as a substance

### Fixed
- Deploy doctr to the root directory (see [drdoctr/doctr#157](https://github.com/drdoctr/doctr/issues/157) and [drdoctr/doctr#160](https://github.com/drdoctr/doctr/issues/160))

## [0.2.1]
### Added
- Carbon dioxide is available as a substance
- The software version is available as the module-level `__version__` attribute

## [0.2.0]
### Added
- Equality comparison of `State` instances

### Changed
- Improve several error messages
- Refactor property getting/setting to use less boilerplate code
- Preface all class attributes with `_`
- Refactor `_set_properties` to use CoolProp low-level API

## [0.1.7]
### Added
- Phase as a gettable attribute of the State
- Isobutane is an available substance
- Add cp and cv to Tutorial

### Changed
- Updated Tutorial with more detail of setting properties
- Fail Travis when a single command fails

## [0.1.6]
### Added
- Tutorial in the docs using `nbsphinx` for formatting
- Specific heat capacities at constant pressure and volume are now accessible via `cp` and `cv` attributes

### Changed
- Offset units are automatically converted to base units in Pint

## [0.1.5]
### Changed
- Unknown property pairs are no longer allowed to be set

## [0.1.4]
### Fixed
- Rename units module to abbreviations so it no longer shadows units registry in thermostate

## [0.1.3]
### Added
- Common unit abbreviations in thermostate.EnglishEngineering and thermostate.SystemInternational

### Fixed
- Typo in CHANGELOG.md

## [0.1.2]
### Fixed
- Fix Anaconda.org upload keys

## [0.1.1]
### Fixed
- Only load pytest-runner if tests are being run

## [0.1.0]
### Added
- First Release

[Unreleased]: https://github.com/bryanwweber/thermostate/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/bryanwweber/thermostate/compare/v1.2.1...v1.3.0
[1.2.1]: https://github.com/bryanwweber/thermostate/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/bryanwweber/thermostate/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/bryanwweber/thermostate/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/bryanwweber/thermostate/compare/v0.5.3...v1.0.0
[0.5.3]: https://github.com/bryanwweber/thermostate/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/bryanwweber/thermostate/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/bryanwweber/thermostate/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/bryanwweber/thermostate/compare/v0.4.2...v0.5.0
[0.4.2]: https://github.com/bryanwweber/thermostate/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/bryanwweber/thermostate/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/bryanwweber/thermostate/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/bryanwweber/thermostate/compare/v0.2.4...v0.3.0
[0.2.4]: https://github.com/bryanwweber/thermostate/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/bryanwweber/thermostate/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/bryanwweber/thermostate/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/bryanwweber/thermostate/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/bryanwweber/thermostate/compare/v0.1.7...v0.2.0
[0.1.7]: https://github.com/bryanwweber/thermostate/compare/v0.1.6...v0.1.7
[0.1.6]: https://github.com/bryanwweber/thermostate/compare/v0.1.5...v0.1.6
[0.1.5]: https://github.com/bryanwweber/thermostate/compare/v0.1.4...v0.1.5
[0.1.4]: https://github.com/bryanwweber/thermostate/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/bryanwweber/thermostate/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/bryanwweber/thermostate/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/bryanwweber/thermostate/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/bryanwweber/thermostate/compare/491975d84317abdaf289c01be02567ab33bbc390...v0.1.0
