Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hybrid navigation #768

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/MIKE-IO-Logo-Pos-RGB.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 38 additions & 39 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ website:
left:
- href: index.qmd
text: Home
- href: user-guide/getting-started.qmd
text: "User Guide"
- href: examples/index.qmd
text: Examples
- href: api/index.qmd
text: API Reference

# use hybrid navigation

sidebar:
style: docked
search: true
contents:
- section: "User Guide"
href: user-guide/getting-started.qmd
contents:
- title: "User Guide"
style: docked
contents:
- user-guide/getting-started.qmd
- user-guide/data-structures.md
- user-guide/dataarray.qmd
Expand All @@ -46,32 +47,26 @@ website:
- user-guide/eum.qmd
- user-guide/generic.qmd
- user-guide/pfs.qmd
- section: Examples
href: examples/index.qmd
contents:
- section: Dfs0
href: examples/dfs0/index.qmd
contents:
- examples/dfs0/cmems_insitu.qmd
- section: Dfs2
href: examples/dfs2/index.qmd
contents:
- examples/dfs2/bathy.qmd
- examples/dfs2/gfs.qmd
- section: Dfsu
href: examples/dfsu/index.qmd
contents:
- examples/dfsu/spatial_interpolation.qmd
- examples/dfsu/merge_subdomains.qmd
- examples/Time-interpolation.qmd
- examples/Generic.qmd
- text: Design philosophy
href: design.qmd
- text: API Reference
href: api/index.qmd



- title: Examples
contents:
- examples/index.qmd
- examples/dfs0/index.qmd
- examples/dfs2/index.qmd
- examples/dfsu/index.qmd
- examples/Time-interpolation.qmd
- examples/Generic.qmd
- title: "API Reference"
contents:
- api/index.qmd
- api/DataArray.qmd
- api/Dataset.qmd
- api/Dfs0.qmd
- api/Dfs1.qmd
- api/Dfs2.qmd
- api/Dfs3.qmd
- api/Dfsu.qmd


filters:
- interlinks
Expand Down Expand Up @@ -113,13 +108,6 @@ quartodoc:
contents:
- DataArray
- Dataset
- dataset._data_plot._DatasetPlotter # TODO alias?
- dataset._data_plot._DataArrayPlotter
- dataset._data_plot._DataArrayPlotterGrid1D
- dataset._data_plot._DataArrayPlotterGrid2D
- dataset._data_plot._DataArrayPlotterFM
- dataset._data_plot._DataArrayPlotterFMVerticalProfile
- dataset._data_plot._DataArrayPlotterFMVerticalColumn
- title: Geometry
desc: ""
contents:
Expand Down Expand Up @@ -166,6 +154,17 @@ quartodoc:
contents:
- PfsDocument
- PfsSection

- title: Dataset plotting
desc: "Plotting functions for Dataset and DataArray objects."
contents:
- dataset._DatasetPlotter
- dataset._DataArrayPlotter
- dataset._DataArrayPlotterGrid1D
- dataset._DataArrayPlotterGrid2D
- dataset._DataArrayPlotterFM
- dataset._DataArrayPlotterFMVerticalProfile
- dataset._DataArrayPlotterFMVerticalColumn


format:
Expand All @@ -174,4 +173,4 @@ format:
toc: true
ipynb:
theme: cosmo
toc: true
toc: true
50 changes: 28 additions & 22 deletions docs/index.qmd
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
---
toc: false
---

![](MIKE-IO-Logo-Pos-RGB.svg)

# MIKE IO: input/output of MIKE files in Python
![Python version](https://img.shields.io/pypi/pyversions/mikeio.svg)
[![PyPI version](https://badge.fury.io/py/mikeio.svg)](https://badge.fury.io/py/mikeio)

Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.

See our sister library [MIKE IO 1D](https://github.com/DHI/mikeio1d) for .res1d and .xns11 files.
::: {.grid}

::: {.g-col-6}
## {{< fa clock >}} **Set up in 5 minutes**

Install **MIKE IO** with [`pip`](https://pypi.org/project/mikeio/) and get up
and running in minutes

## Requirements

* Windows or Linux operating system
* Python x64 3.9 - 3.13
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>) (already installed if you have MIKE)
[**Getting started**](user-guide/getting-started.qmd)

## Installation
## {{< fa brands python >}} **It's just Python**

```
$ pip install mikeio
```
Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.

[**API Reference**](api/index.qmd)

::: callout-warning
**Don't use conda to install MIKE IO!**, the version on conda is outdated.
:::

## Getting started
::: {.g-col-6}

## {{< fa solid diagram-project >}} **Associated package**

```{python}
import mikeio
See our sister library **MIKE IO 1D** for .res1d and .xns11 files.

ds = mikeio.read("data/FakeLake.dfsu")
ds.Bathymetry.plot()
```
[**MIKE IO 1D**](https://dhi.github.io/mikeio1d/)

Read more in the [getting started guide](user-guide/getting-started.qmd).

## {{< fa scale-balanced >}} **Open Source**

## Where can I get help?
MIKE IO is licensed under BSD-3-Clause license and available on [GitHub](https://github.com/DHI/mikeio)

[**License**](license.qmd)

:::

:::

* New ideas and feature requests - [GitHub Discussions](https://github.com/DHI/mikeio/discussions)
* Bugs - [GitHub Issues](https://github.com/DHI/mikeio/issues)

26 changes: 26 additions & 0 deletions docs/license.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2019, DHI A/S
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of DHI nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions docs/user-guide/getting-started.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Getting started

## Requirements

* Windows or Linux operating system
* Python x64 3.10 - 3.13
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>) (already installed if you have MIKE)

## Installation

```bash
pip install mikeio
```

## {{< fa database >}} Dataset
The [Dataset](dataset.qmd) is the common MIKE IO data structure for data read from dfs files.
The [](`mikeio.read`) method returns a Dataset with a [DataArray](dataarray.qmd) for each item.
Expand Down
29 changes: 28 additions & 1 deletion mikeio/dataset/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
from ._dataarray import DataArray
from ._dataset import Dataset, from_pandas, from_polars
from ._data_plot import (
_DataArrayPlotter,
_DataArrayPlotterGrid1D,
_DataArrayPlotterGrid2D,
_DataArrayPlotterFM,
_DataArrayPlotterFMVerticalColumn,
_DataArrayPlotterFMVerticalProfile,
_DataArrayPlotterPointSpectrum,
_DataArrayPlotterLineSpectrum,
_DataArrayPlotterAreaSpectrum,
_DatasetPlotter,
)

__all__ = ["DataArray", "Dataset", "from_pandas", "from_polars"]
__all__ = [
"DataArray",
"Dataset",
"from_pandas",
"from_polars",
"_DataArrayPlotter",
"_DataArrayPlotterGrid1D",
"_DataArrayPlotterGrid2D",
"_DataArrayPlotterFM",
"_DataArrayPlotterFMVerticalColumn",
"_DataArrayPlotterFMVerticalProfile",
"_DataArrayPlotterPointSpectrum",
"_DataArrayPlotterLineSpectrum",
"_DataArrayPlotterAreaSpectrum",
"_DatasetPlotter",
]
14 changes: 14 additions & 0 deletions mikeio/dataset/_data_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,17 @@ def scatter(
@staticmethod
def _label_txt(da: DataArray) -> str:
return f"{da.name} [{da.unit.name}]"


__all__ = [
"_DataArrayPlotter",
"_DataArrayPlotterGrid1D",
"_DataArrayPlotterGrid2D",
"_DataArrayPlotterFM",
"_DataArrayPlotterFMVerticalColumn",
"_DataArrayPlotterFMVerticalProfile",
"_DataArrayPlotterPointSpectrum",
"_DataArrayPlotterLineSpectrum",
"_DataArrayPlotterAreaSpectrum",
"_DatasetPlotter",
]
Loading