Metadata-Version: 2.1
Name: daisypy-vis
Version: 0.3.0
Summary: Visualization module for Daisy log files (dlf)
Author-email: Silas Nyboe Ørting <silas@di.ku.dk>
Project-URL: Homepage, https://daisy.ku.dk/
Project-URL: Repository, https://github.com/daisy-model/daisy-vis
Project-URL: Issues, https://github.com/daisy-model/daisy-vis/issues
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: plotly
Requires-Dist: dash
Provides-Extra: test
Requires-Dist: coverage; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-mpl; extra == "test"
Requires-Dist: kaleido; extra == "test"
Requires-Dist: pillow; extra == "test"
Provides-Extra: lint
Requires-Dist: pylint; extra == "lint"
Requires-Dist: pytest; extra == "lint"
Requires-Dist: pillow; extra == "lint"
Provides-Extra: all
Requires-Dist: coverage; extra == "all"
Requires-Dist: pytest; extra == "all"
Requires-Dist: pytest-mpl; extra == "all"
Requires-Dist: kaleido; extra == "all"
Requires-Dist: pillow; extra == "all"
Requires-Dist: pylint; extra == "all"

[![pytest](https://github.com/daisy-model/daisypy-vis/actions/workflows/pytest.yml/badge.svg)](https://github.com/daisy-model/daisypy-vis/actions/workflows/pytest.yml)
[![Pylint](https://github.com/daisy-model/daisypy-vis/actions/workflows/pylint.yml/badge.svg)](https://github.com/daisy-model/daisypy-vis/actions/workflows/pylint.yml)
[![codecov](https://codecov.io/gh/daisy-model/daisypy-vis/graph/badge.svg?token=F8625GT0A8)](https://codecov.io/gh/daisy-model/daisypy-vis)

# daisypy-vis
Visualisation library and tools for Daisy model output

See [doc](https://github.com/daisy-model/daisy-vis/tree/main/doc) for examples.

## Installation
The visualization tools are available from pypi

    pip install daisypy-vis

## Development
Checkout repository

    git clone git@github.com:daisy-model/daisypy-vis.git
    cd daisypy-vis

Install package as editable

    pip install -e ".[all]"

### pylint
Use `pyproject.toml` for package-wide settings, e.g. `ignore-trailing-whitespace`.

	pylint daisypy/vis
    pylint doc


### Tests
See `pyproject.toml`for configuration.

To install test dependencies, use either the `[all]` or the `[test]` target, e.g.

    pip install ".[test]"

To run tests

    pytest


Use pytest-mpl to compare images. Generate baselines images by running

    pytest --mpl-generate-path=test-data/baseline

and inspect the output...

Note that image comparison tests can fail between different version of matplotlib and freetype. You can force test against images generated with a specific version of matplotlib with

    pytest --mpl-baseline-path=test-data/baseline/matplotlib-<matplotlib-version-number>
    
If no baseline images are available for a specific version, you can generate with

    pytest --mpl-generate-path=test-data/baseline/matplotlib-<matplotlib-version-number>
    
and compare manually.


Baseline for animations are generated by running the tests, this will produce a new set of images in `test-data/tmp`. Inspect and move to `test-data/baseline` when happy. In general, text should be removed from to avoid tests failing due to slight variations in font rendering. See for example `render_and_compare_animation` in `daisy_vis/animate/test/test_animate_depth_timeseries.py`


### Coverage
See `pyproject.toml`for configuration. To generate coverage report

    coverage run
    
To inspect coverage report

    coverage report

Tests should as a minimum have 100% code coverage. When applicable, fixed tests should cover boundary conditions and randomized tests should sample the full parameter space.
