Skip to content

Commit

Permalink
Merge next-release for 0.2.0 (#8)
Browse files Browse the repository at this point in the history
* nml_array

* InvertedTruncatedCone

* NMLReader

* Modify write_nml_outflows as it write "[" in the nml file

* document, test, requirements

* update tests, docs, and NMLReader for #4

* NMLWriter

* start NMLWriter automatic type conversion

* split nml into sub-modules

* update base image and fix dev dependencies

* nml how-to docs

* ABC for nml._BaseBlock

* fix dimensions typo & repo URL

* NMLWriter & NMLReader how-to

* final tweaks for 0.2.0

* add regex to requirements.txt

---------

Co-authored-by: cvergaras <154611098+cvergaras@users.noreply.github.com>
  • Loading branch information
gilesknight and cvergaras committed Jun 24, 2024
1 parent a509633 commit 82dd630
Show file tree
Hide file tree
Showing 20 changed files with 6,218 additions and 2,246 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jmad1v07/wet-glm
FROM python:3.10.11

RUN apt update && apt install -y

Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ruff==0.0.278
isort==5.12.0
pytest==7.4.0
setuptools==68.0.0
mkdocs==1.4.3
mkdocs==1.5.3
mkdocstrings[python]==0.22.0
mkdocs-material==9.5.14
pre-commit==3.3.3
build==0.10.0
twine==4.0.2
pymdown-extensions==10.1
pymdown-extensions==10.2
versioneer==0.29
cibuildwheel==2.16.2
2 changes: 1 addition & 1 deletion docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
authors:
gknight:
name: Giles Knight
description: Package developer
description: Developer
avatar: https://avatars.githubusercontent.com/u/62376886?v=4
36 changes: 36 additions & 0 deletions docs/blog/posts/glmpy-v0_2_0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
draft: false
date: 2024-06-21
authors:
- gknight
categories:
- Releases
---

# glm-py `0.2.0`

**Key changes from the latest release.**

glm-py `0.2.0` reworks the `nml` module to provide more flexible tools for
reading and writing NML files.

<!-- more -->

## What's changed

- The `nml` module has been split into `nml` and `glm_nml` sub-modules.
- The `glm_nml` sub-module provides high-level NML tools and implements all the
existing classes from the `nml` module in `0.1.3`.
- Classes from `0.1.3` are automatically imported using
`from glmpy import nml` to maintain backwards compatibility until `1.0.0`.
- Classnames from `0.1.3` will be deprecated by `1.0.0` in favour of a new
naming convention that ensures forwards compatibility with AED. Warnings are
raised to encourage you to migrate to the new class names.
- The new `nml` sub-module provides low-level tools for reading and writing any
NML file (GLM or AED).
- `NMLWriter` converts a nested Python dictionary to a NML file.
- `NMLReader` converts a NML file to a nested Python dictionary.
- Both classes provide functionality to explicitly control how each parameter
is read/written to file.
- `InvertedTruncatedCone` class added to the `dimensions` module to calculate
morphometry parameters for simple circular water bodies.
4 changes: 2 additions & 2 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
--md-accent-fg-color: #007092;
}

.md-header__button.md-logo {
/* .md-header__button.md-logo {
margin: 0;
padding: 0;
}
Expand All @@ -14,4 +14,4 @@
.md-header__button.md-logo svg {
height: 2.4rem;
width: 2.4rem;
}
} */
Loading

0 comments on commit 82dd630

Please sign in to comment.