Metadata-Version: 2.1
Name: bmi-tester
Version: 0.5.5
Summary: Test Python BMI bindings.
Home-page: https://github.com/csdms/bmi-tester
Author: Eric Hutton
Author-email: eric.hutton@colorado.edu
License: UNKNOWN
Keywords: bmi
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Dist: click
Requires-Dist: model-metadata
Requires-Dist: numpy
Requires-Dist: pytest
Requires-Dist: pytest-dependency
Requires-Dist: standard-names

bmi-tester: Test Basic Model Interface implementations
======================================================

|Build Status| |Documentation Status| |Coverage Status| |Conda Version|
|Conda Installation| |Conda Downloads|

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,

.. code:: 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*,

.. code:: 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 *setup.py*) to
install into the current environment,

.. code:: 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,

.. code:: 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*,

.. code:: bash

  $ conda install pymt_hydrotrend -c conda-forge

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

.. code:: 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,

.. code:: 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


.. |Build Status| image:: https://github.com/csdms/bmi-tester/actions/workflows/test.yml/badge.svg
   :target: https://github.com/csdms/bmi-tester/actions/workflows/test.yml
.. |Documentation Status| image:: https://readthedocs.org/projects/bmi-tester/badge/?version=latest
   :target: http://bmi-tester.readthedocs.io/en/latest/?badge=latest
.. |Coverage Status| image:: https://coveralls.io/repos/github/csdms/bmi-tester/badge.svg?branch=master
   :target: https://coveralls.io/github/csdms/bmi-tester?branch=master
.. |Conda Version| image:: https://anaconda.org/conda-forge/bmi-tester/badges/version.svg
   :target: https://anaconda.org/conda-forge/bmi-tester
.. |Conda Installation| image:: https://anaconda.org/conda-forge/bmi-tester/badges/installer/conda.svg
   :target: https://conda.anaconda.org/conda-forge
.. |Conda Downloads| image:: https://anaconda.org/conda-forge/bmi-tester/badges/downloads.svg
   :target: https://anaconda.org/conda-forge/bmi-tester


Credits
=======

* Eric Hutton

* Mark Piper


Changelog for bmi-tester
========================

0.5.5 (2021-03-31)
------------------

- Fixed documentation builds on readthedocs (#31)

- Added usage and installation instructions to the README,
  and did a general cleaning up of the docs (#30)

- Fixed a bug when validating some cf-compliant units (#29)

- Added gimli.units as a requirement for unit parsing (#29)

- Added GitHub actions for continuous integration (#28)


0.5.4 (2020-10-31)
------------------

- Removed the test for set_value as it's just too dangerous (#26)

- Fixed tests that use get_grid_node_count on grids that
  are not unstructured (#27)


0.5.3 (2020-10-19)
------------------

- Change tests that use ID arrays (e.g. face_nodes, edge_nodes, etc.) to
  allocate those array buffers as int32 (#25)


0.5.2 (2020-10-09)
------------------

- Fixed a bug in the unstructured grid tests (#24)


0.5.1 (2020-09-10)
------------------

- Fixed the time units check to allow dimensionless units (#22)

- Fixed remaining bmi version strings to 2.0 (#23)

0.5 (2020-09-02)
----------------

- Fixed an error with empty_var_buffer where it returned a read-only array (#20)

- Fixed MANIFEST.in to include necessary source files (#21)

- Added test stages where successive stages depend on one another (#19)

- Cleaned up continuous integration and added Python 3.8 builds (#18)


0.4.4 (2020-03-23)
------------------

- Added test for get_grid_node_count (#17)

0.4.3 (2019-11-12)
------------------


0.4.2 (2019-07-24)
------------------


0.4.1 (2019-05-16)
------------------


0.4.0 (2018-10-25)
------------------


0.3.1 (2018-10-16)
------------------


0.3.0 (2018-09-30)
------------------


0.2.4 (2018-07-04)
------------------


0.2.2 (2018-07-03)
------------------


0.2.1 (2018-06-04)
------------------


0.2 (2018-06-04)
----------------


0.1.0 (2018-04-14)
------------------

- Initial release


