Metadata-Version: 2.4
Name: bmi_tester
Version: 0.5.10
Summary: Test Python BMI bindings
Author: Eric Hutton
Author-email: eric.hutton@colorado.edu
Maintainer: Eric Hutton, Mark Piper
Maintainer-email: eric.hutton@colorado.edu, mark.piper@colorado.edu
License: MIT
Project-URL: Changelog, https://github.com/csdms/bmi-tester/blob/master/CHANGES.rst
Project-URL: Documentation, https://bmi-tester.readthedocs.io/
Project-URL: Homepage, https://csdms.colorado.edu
Project-URL: Repository, https://github.com/csdms/bmi-tester
Keywords: bmi,csdms,model,python,testing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: AUTHORS.md
Requires-Dist: importlib-resources; python_version < "3.12"
Requires-Dist: model-metadata>=0.8.1
Requires-Dist: numpy
Requires-Dist: pytest
Requires-Dist: pytest-dependency
Requires-Dist: standard-names>=0.2.8
Provides-Extra: units
Requires-Dist: gimli.units>=0.3.2; extra == "units"
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: isort; extra == "dev"
Provides-Extra: testing
Requires-Dist: coveralls; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: pytest>=3.6; extra == "testing"
Provides-Extra: docs
Requires-Dist: sphinx>=1.5.1; extra == "docs"
Provides-Extra: build
Requires-Dist: build; extra == "build"
Requires-Dist: twine; extra == "build"
Requires-Dist: zest.releaser; extra == "build"
Dynamic: license-file

# bmi-tester

[anaconda-badge]: https://anaconda.org/conda-forge/bmi-tester/badges/version.svg
[anaconda-link]: https://anaconda.org/conda-forge/bmi-tester
[build-badge]: https://github.com/csdms/bmi-tester/actions/workflows/test.yml/badge.svg
[build-link]: https://github.com/csdms/bmi-tester/actions/workflows/test.yml
[coverage-badge]: https://coveralls.io/repos/github/csdms/bmi-tester/badge.svg
[coverage-link]: https://coveralls.io/github/csdms/bmi-tester
[docs-badge]: https://readthedocs.org/projects/bmi-tester/badge/?version=latest
[docs-link]: https://readthedocs.org/projects/bmi-tester/
[pypi-badge]: https://badge.fury.io/py/bmi-tester.svg
[pypi-link]: https://pypi.org/project/bmi-tester/
[python-badge]: https://img.shields.io/pypi/pyversions/bmi-tester.svg

![[Build Status][build-link]][build-badge]
![[PyPI][pypi-link]][pypi-badge]
![[Anaconda][anaconda-link]][anaconda-badge]
![[Python][pypi-link]][python-badge]
![[Documentation][docs-link]][docs-badge]
![[Coverage][coverage-link]][coverage-badge]

## About

The *bmi-tester* is a command-line utility and Python library for testing
Basic Model Interface (BMI) implementations.

## Requirements

The *bmi-tester* requires Python 3. Additional dependencies can be found
in the project's *requirements.txt* file and can be installed using either
*pip* or *conda*.

In addition to these requirements, the *bmi-tester* also requires the
*gimli.units* package, which is a Python interface to the *udunits2*
C library, which is not available through *pip* but can be installed
using *conda*.

If you are a developer of the *bmi-tester* you will also want to install
additional dependencies for running the project's tests to make sure
that things are working as they should. These dependencies are listed
in *requirements-testing.txt* and can all be install with either *pip*
or *conda*.

## Installation

To install, first create a new environment in which the project will be
installed. This, although not necessary, will isolate the installation
so that there won't be conflicts with your base *Python* installation.
This can be done with *conda* as,

```bash
conda create -n bmi-tester python=3
conda activate bmi-tester
```

### Stable Release

The *bmi-tester*, and its dependencies, can most easily be installed
with *conda*,

```bash
conda install bmi-tester -c conda-forge
```

### From Source

After downloading the *bmi-tester* source code, run the following from
the project's top-level folder (the one that contains *pyproject.toml*) to
install into the current environment,

```bash
pip install -e .
```

## Usage

You can access the *bmi-tester* from the command line with the *bmi-test*
command. Use the *--help* option to get a brief description of the
command line arguments,

```bash
bmi-test --help
```

The *bmi-test* command takes a single argument, the name of the entry point
of the class that implements the BMI you would like to test. To demonstrate
how this works, we will use the *Hydrotrend* model as an example. To install
the Python BMI for *Hydrotrend*, use *conda*,

```bash
conda install pymt_hydrotrend -c conda-forge
```

Once installed, the following will test the BMI implementation for the
*Hydrotrend* class,

```bash
bmi-test pymt_hydrotrend:Hydrotrend
```

The entry point is given as *\<model>:\<class>*. That is, in Python you would
import the *Hydrotrend* class as,

```python
>>> from pymt_hydrotrend import Hydrotrend
```

## Links

- [Source code](http://github.com/csdms/bmi-tester): The
  *bmi-tester* source code repository.
- [Documentation](http://bmi-tester.readthedocs.io/): User
  documentation for *bmi-tester*
- [Get](http://bmi-tester.readthedocs.io/en/latest/getting.html):
  Installation instructions
