Skip to content

Commit

Permalink
Issue #1148 api changelog (#1149)
Browse files Browse the repository at this point in the history
Fixes #1148

# Description
- Ensures API package is added to API reference
- Adds explicit reference to API Package
- Enables init validation of API Package, which was for some reason
moved outside object.

# Checklist
- [x] Links to correct issue
- [x] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [ ] Unit tests were added
- [ ] **If feature added**: Added/extended example
  • Loading branch information
JoerivanEngelen authored Aug 14, 2024
1 parent b65e6bf commit 86bf0ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs/api/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ Added
~~~~~
- Developer environment: Added pixi environment ``interactive`` to interactively
run code. Can be useful to plot data.
- An API package was added. It can be added to both flow and transport models, and its
presence allows users to interact with libMF6.dll through its API.
- :class:`imod.mf6.ApiPackage` was added. It can be added to both flow and
transport models, and its presence allows users to interact with libMF6.dll
through its API.
- Developer environment: Empty python 3.10, 3.11, 3.12 environments where pip
install and import imod can be tested.

Expand Down
2 changes: 2 additions & 0 deletions docs/api/mf6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Flow Packages
.. autosummary::
:toctree: generated/mf6

ApiPackage
Buoyancy
ConstantHead
Drainage
Expand All @@ -91,6 +92,7 @@ Transport Packages
.. autosummary::
:toctree: generated/mf6

ApiPackage
AdvectionCentral
AdvectionTVD
AdvectionUpstream
Expand Down
7 changes: 3 additions & 4 deletions imod/mf6/api_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
DTypeSchema,
)

_init_schemata = {
"maxbound": [DTypeSchema(np.integer)],
}


class ApiPackage(Package):
"""
Expand Down Expand Up @@ -46,6 +42,9 @@ class ApiPackage(Package):

_pkg_id = "api"
_template = Package._initialize_template(_pkg_id)
_init_schemata = {
"maxbound": [DTypeSchema(np.integer)],
}

def __init__(
self,
Expand Down

0 comments on commit 86bf0ca

Please sign in to comment.