Metadata-Version: 2.4
Name: glidertest
Version: 1.0.1
Summary: Diagnostic tests of glider quality 
Maintainer-email: Callum Rollo <c.rollo@outlook.com>
License: MIT License
        
        Copyright (c) 2024 Callum Rollo
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: documentation, https://oceangliderscommunity.github.io/glidertest/
Project-URL: homepage, https://github.com/OceanGlidersCommunity/glidertest
Project-URL: repository, https://github.com/OceanGlidersCommunity/glidertest
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cartopy
Requires-Dist: cmocean
Requires-Dist: folium
Requires-Dist: gsw
Requires-Dist: h5py
Requires-Dist: h5netcdf
Requires-Dist: ioos-qc
Requires-Dist: ipython
Requires-Dist: ipywidgets
Requires-Dist: jinja2
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pillow
Requires-Dist: pooch
Requires-Dist: pyyaml
Requires-Dist: ruamel.yaml>=0.18
Requires-Dist: scipy
Requires-Dist: seaborn
Requires-Dist: sgp4>=2.14
Requires-Dist: skyfield
Requires-Dist: xarray
Provides-Extra: dev
Requires-Dist: jupyterlab; extra == "dev"
Requires-Dist: nbconvert; extra == "dev"
Requires-Dist: nbsphinx; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: sphinx<8.2; extra == "dev"
Requires-Dist: sphinx-argparse; extra == "dev"
Requires-Dist: sphinx-rtd-theme; extra == "dev"
Dynamic: license-file

# glidertest

glidertest reads an OceanGliders (OG1) mission file, runs a set of diagnostics on it, and shows you what is in the file. It never modifies, fixes or grids the data: the output is figures and an HTML report, the input file is left untouched. It works one mission at a time; a fleet page links the reports of many missions on one map.

There are two ways to use it: call the diagnostic functions from a notebook (`glidertest.plots`, `glidertest.tools`), or run `glidertest report` on a file and read the HTML.

Diagnostics include:

- Time and depth spacing
- Histograms and T–S diagrams
- Suspect profile durations
- Dive–climb bias (the difference between down and up profiles)
- Sensor drift
- Non-photochemical quenching in chlorophyll
- Vertical velocities from the flight model
- Inventory of the file: variables, sensors, attributes, and QC flags as delivered
- Fleet page: one map and table linking many mission reports

## Install

Install from PyPI with pip:

```sh
python -m pip install glidertest
```

or with [uv](https://docs.astral.sh/uv/):

```sh
uv pip install glidertest
```

## HTML report

glidertest turns an OG1 mission file into a self-contained HTML report — a landing page, one page per sensor, a flight page for gliders that report one, and an inventory of the file. From Python, with a dataset open:

```python
from glidertest import reports

reports.report(ds, "reports/")
```

or from the command line:

```sh
glidertest report mission.nc --report-dir reports/
glidertest navigator reports/      # rebuilds the fleet page from the reports already in reports/
```

See the [report guide](https://oceangliderscommunity.github.io/glidertest/reports.html) and the [live demo](https://oceangliderscommunity.github.io/glidertest/_static/demo/index.html).

## Documentation

Documentation is available at [https://oceangliderscommunity.github.io/glidertest/](https://oceangliderscommunity.github.io/glidertest/)

Check out the demo notebook `notebooks/demo.ipynb` and `notebooks/interactive.ipynb` for example functionality.

The demo notebook `notebooks/demo_data_issues.ipynb` uses example datasets to check how glidertest can help identify and visualize problems with data.

glidertest reads [OceanGliders (OG1) format files](https://github.com/OceanGlidersCommunity/OG-format-user-manual), one file per mission. Seaglider basestation files can be converted to OG1 with the `seagliderOG1` package; the sample data (`fetchers.load_sample_dataset()`) is already OG1.

## Contributing

All contributions are welcome! See [contributing](CONTRIBUTING.md) for more details

To install a local, development version of glidertest, clone the repo, open a terminal in the root directory (next to this readme file) and run these commands:

```sh
git clone https://github.com/OceanGlidersCommunity/glidertest.git
cd glidertest
pip install -e ".[dev]"
```
This installs glidertest locally. -e ensures that any edits you make in the files will be picked up by scripts that import functions from glidertest.

You can run the example jupyter notebook by launching jupyterlab with `jupyter-lab` and navigating to the `notebooks` directory.

All new functions should include tests, you can run the tests locally and generate a coverage report with:

```sh
pytest --cov=glidertest --cov-report term-missing  tests/
```

Try to ensure that all the lines of your contribution are covered in the tests.

## Acknowledgements

glidertest began in 2024 as an OceanGliders community effort, with early development at Voice of the Ocean (VOTO) and the University of Hamburg. Its development has since been supported by VOTO through the SEA-CODE project (SeaExplorer–Seaglider Cross-platform Open Diagnostics & Evaluation), which builds platform-independent, open-source diagnostics for glider data, with glidertest and seagliderOG1 as its core packages, and supports exchanges between the University of Hamburg and VOTO. VOTO also provides the sample data.

Development at the University of Hamburg was also supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) through the PycnMix project (Projektnummer 558671572), and in preparation for the DFG research infrastructure Swarm of Ocean Gliders (Projektnummer 544335393).

glidertest is an OceanGliders community package and welcomes contributions from the community. Development was assisted by Claude Code (Anthropic) and GitHub Copilot code review.
