Skip to content

Commit c3d2143

Browse files
authored
Merge branch 'main' into geometryFM_contains_shapely
2 parents 4933eba + a0df19a commit c3d2143

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1417
-277
lines changed

.github/workflows/build_docs.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: 3.9
16+
python-version: 3.11
1717

1818
- name: Install dependencies
1919
run: |

.github/workflows/full_test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest, windows-latest]
20-
python-version: [3.8, "3.12"]
20+
python-version: [3.9, "3.12"]
2121

2222
steps:
2323
- uses: actions/checkout@v3
2424
- uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors
25+
with:
26+
version: 0.5.6 # consistent with pyproject.toml ?
2527
- name: Set up Python ${{ matrix.python-version }}
2628
uses: actions/setup-python@v4
2729
with:

.github/workflows/legacy_test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: 3.8
21-
22-
- name: Install older dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements_min.txt
26-
pip install pytest
20+
python-version: 3.9
21+
2722
- name: Install MIKE IO
2823
run: |
24+
python -m pip install --upgrade pip
2925
pip install .[test]
26+
pip install -r requirements_min.txt
3027
- name: Test with pytest
3128
run: |
3229
pytest --ignore tests/notebooks/

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ cov_annotate
2525
htmlcov
2626

2727
docs/_site
28+
docs/user-guide/*.dfs*
2829

2930
# generated by quartodoc
3031
docs/api/
@@ -33,4 +34,5 @@ docs/api/
3334
.venv/
3435

3536
.testmondata
36-
objects.json
37+
objects.json
38+
.jupyter_cache/

README.md

Lines changed: 56 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
![OS](https://img.shields.io/badge/OS-Windows%20%7C%20Linux-blue)
88

99

10+
> [!NOTE]
11+
>
12+
> ![](https://training.dhigroup.com/ACA_Logo.png?v=1647618443406)
13+
>
14+
> **Instructor-led course**
15+
>
16+
> [Getting started with MIKE IO for Python processing of dfs files](https://training.dhigroup.com/event/sessions?id=Instructor-led_course_-_Online852475847)
17+
>
18+
> From 4th September 2024 to 2nd October 2024
19+
1020
Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
1121

1222
MIKE IO facilitates common data processing workflows for [MIKE files in Python](https://www.mikepoweredbydhi.com/products/mike-for-developers#io).
@@ -18,7 +28,7 @@ MIKE IO facilitates common data processing workflows for [MIKE files in Python](
1828

1929
## Requirements
2030
* Windows or Linux operating system
21-
* Python x64 3.8 - 3.12
31+
* Python x64 3.9 - 3.12
2232
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) (already installed if you have MIKE)
2333

2434
[More info about dependencies](http://docs.mikepoweredbydhi.com/nuget/)
@@ -51,46 +61,51 @@ MIKE IO is tested extensively.
5161

5262
See detailed test coverage report below:
5363
```
54-
---------- coverage: platform linux, python 3.11.1-final-0 -----------
55-
Name Stmts Miss Cover
56-
-----------------------------------------------------
57-
mikeio/__init__.py 38 2 95%
58-
mikeio/base.py 26 5 81%
59-
mikeio/data_utils.py 111 5 95%
60-
mikeio/dataarray.py 992 152 85%
61-
mikeio/dataset.py 772 100 87%
62-
mikeio/dfs0.py 299 24 92%
63-
mikeio/dfs1.py 67 3 96%
64-
mikeio/dfs2.py 188 8 96%
65-
mikeio/dfs3.py 186 26 86%
66-
mikeio/dfs.py 288 36 88%
67-
mikeio/dfsu/__init__.py 3 0 100%
68-
mikeio/dfsu/dfsu.py 592 56 91%
69-
mikeio/dfsu/factory.py 41 2 95%
70-
mikeio/dfsu/layered.py 180 20 89%
71-
mikeio/dfsu/spectral.py 127 6 95%
72-
mikeio/dfsutil.py 129 15 88%
73-
mikeio/eum.py 1324 12 99%
74-
mikeio/exceptions.py 25 8 68%
75-
mikeio/generic.py 433 16 96%
76-
mikeio/interpolation.py 60 5 92%
77-
mikeio/pfs/__init__.py 4 0 100%
78-
mikeio/pfs/pfsdocument.py 242 16 93%
79-
mikeio/pfs/pfssection.py 220 9 96%
80-
mikeio/spatial/FM_geometry.py 1118 102 91%
81-
mikeio/spatial/FM_utils.py 293 30 90%
82-
mikeio/spatial/__init__.py 0 0 100%
83-
mikeio/spatial/crs.py 50 4 92%
84-
mikeio/spatial/geometry.py 90 33 63%
85-
mikeio/spatial/grid_geometry.py 558 42 92%
86-
mikeio/spatial/utils.py 38 0 100%
87-
mikeio/spectral.py 90 5 94%
88-
mikeio/track.py 100 14 86%
89-
mikeio/xyz.py 12 0 100%
90-
-----------------------------------------------------
91-
TOTAL 8696 756 91%
92-
93-
=========== 697 passed, 3 warnings in 46.01s ========
64+
---------- coverage: platform linux, python 3.12.4-final-0 -----------
65+
Name Stmts Miss Cover
66+
-------------------------------------------------------------
67+
mikeio/__init__.py 31 3 90%
68+
mikeio/_interpolation.py 68 6 91%
69+
mikeio/_spectral.py 97 7 93%
70+
mikeio/_time.py 29 1 97%
71+
mikeio/_track.py 103 14 86%
72+
mikeio/dataset/__init__.py 3 0 100%
73+
mikeio/dataset/_data_plot.py 358 38 89%
74+
mikeio/dataset/_data_utils.py 20 0 100%
75+
mikeio/dataset/_dataarray.py 730 52 93%
76+
mikeio/dataset/_dataset.py 734 57 92%
77+
mikeio/dfs/__init__.py 5 0 100%
78+
mikeio/dfs/_dfs0.py 198 13 93%
79+
mikeio/dfs/_dfs1.py 58 2 97%
80+
mikeio/dfs/_dfs2.py 132 3 98%
81+
mikeio/dfs/_dfs3.py 147 9 94%
82+
mikeio/dfs/_dfs.py 290 18 94%
83+
mikeio/dfsu/__init__.py 6 0 100%
84+
mikeio/dfsu/_common.py 36 1 97%
85+
mikeio/dfsu/_dfsu.py 223 7 97%
86+
mikeio/dfsu/_factory.py 20 1 95%
87+
mikeio/dfsu/_layered.py 190 7 96%
88+
mikeio/dfsu/_mesh.py 54 8 85%
89+
mikeio/dfsu/_spectral.py 214 36 83%
90+
mikeio/eum/__init__.py 2 0 100%
91+
mikeio/eum/_eum.py 1334 9 99%
92+
mikeio/exceptions.py 24 4 83%
93+
mikeio/generic.py 451 17 96%
94+
mikeio/pfs/__init__.py 8 0 100%
95+
mikeio/pfs/_pfsdocument.py 248 13 95%
96+
mikeio/pfs/_pfssection.py 223 9 96%
97+
mikeio/spatial/_FM_geometry.py 521 24 95%
98+
mikeio/spatial/_FM_geometry_layered.py 415 30 93%
99+
mikeio/spatial/_FM_geometry_spectral.py 94 9 90%
100+
mikeio/spatial/_FM_utils.py 275 22 92%
101+
mikeio/spatial/__init__.py 6 0 100%
102+
mikeio/spatial/_geometry.py 78 8 90%
103+
mikeio/spatial/_grid_geometry.py 639 45 93%
104+
mikeio/spatial/_utils.py 39 0 100%
105+
mikeio/spatial/crs.py 51 5 90%
106+
mikeio/xyz.py 14 0 100%
107+
-------------------------------------------------------------
108+
TOTAL 8168 478 94%
94109
```
95110

96111
## Cloud enabled

docs/_quarto.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ quartodoc:
9898
- open
9999
- read
100100
- read_pfs
101+
- from_pandas
102+
- from_polars
101103
- title: Dataset
102104
desc: ""
103105
contents:
@@ -109,6 +111,7 @@ quartodoc:
109111
- dataset._data_plot._DataArrayPlotterGrid2D
110112
- dataset._data_plot._DataArrayPlotterFM
111113
- dataset._data_plot._DataArrayPlotterFMVerticalProfile
114+
- dataset._data_plot._DataArrayPlotterFMVerticalColumn
112115
- title: Geometry
113116
desc: ""
114117
contents:

docs/index.qmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
![Python version](https://img.shields.io/pypi/pyversions/mikeio.svg)
66
[![PyPI version](https://badge.fury.io/py/mikeio.svg)](https://badge.fury.io/py/mikeio)
77

8+
::: callout-note
9+
![](https://training.dhigroup.com/ACA_Logo.png?v=1647618443406)
10+
11+
**Instructor-led course**
12+
13+
[Getting started with MIKE IO for Python processing of dfs files](https://training.dhigroup.com/event/sessions?id=Instructor-led_course_-_Online852475847)
14+
15+
From 4th September 2024 to 2nd October 2024
16+
:::
17+
818
Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
919

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

docs/user-guide/dataarray.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2+
title: DataArray
23
aliases:
34
- ../dataarray.html
45
---
56

6-
# DataArray
7-
87
The [DataArray](`mikeio.DataArray`) is the common MIKE IO data structure
98
for *item* data from dfs files.
109
The [](`mikeio.read`) methods returns a Dataset as a container of DataArrays (Dfs items)

docs/user-guide/dataset.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2+
title: Dataset
23
aliases:
34
- ../dataset.html
45
---
56

6-
# Dataset
7-
87
The [Dataset](`mikeio.Dataset`) is the MIKE IO data structure
98
for data from dfs files.
109
The [](`mikeio.read`) methods returns a Dataset as a container of [DataArray](`mikeio.DataArray`) (Dfs items). Each DataArray has the properties, *item*, *time*, *geometry* and *values*. The time and geometry are common to all DataArrays in the Dataset.

0 commit comments

Comments
 (0)