semvec/pypi-packages huggingface dataset:
hydromt_delwaq 0.1.2
hydroMT plugin for DELWAQ models.
Requires Python: >=3.8

hydroMT-delwaq: DELWAQ plugin for hydroMT
#########################################

.. image:: https://codecov.io/gh/Deltares/hydromt_delwaq/branch/main/graph/badge.svg?token=ss3EgmwHhH
    :target: https://codecov.io/gh/Deltares/hydromt_delwaq

.. image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
    :target: https://deltares.github.io/hydromt_delwaq/latest
    :alt: Latest developers docs

.. image:: https://img.shields.io/badge/docs-stable-brightgreen.svg
    :target: https://deltares.github.io/hydromt_delwaq/stable
    :alt: Stable docs last release

.. image:: https://pypip.in/v/hydromt_delwaq/badge.png
    :target: https://pypi.org/project/hydromt_delwaq/
    :alt: Latest PyPI version

.. image:: https://mybinder.org/badge_logo.svg
    :target: https://mybinder.org/v2/gh/Deltares/hydromt_delwaq/main?urlpath=lab/tree/examples


hydroMT_ is a python package, developed by Deltares, to build and analysis hydro models.
It provides a generic model api with attributes to access the model schematization,
(dynamic) forcing data, results and states. This plugin provides an implementation 
for the DELWAQ_ model.


.. _hydromt: https://deltares.github.io/hydromt
.. _delwaq: https://oss.deltares.nl/web/delft3d/delwaq1/-/message_boards/category/205375


Installation
------------

hydroMT-delwaq is availble from pypi and we are working on adding a release from conda-forge (ongoing).

To install hydromt_delwaq using pip do:

.. code-block:: console

  pip install hydromt_delwaq

We recommend installing a hydromt-delwaq environment including the hydromt_delwaq package
based on the environment.yml file. This environment will install all package dependencies 
including the core of hydroMT_ as well as the `hydromt_wflow <https://github.com/Deltares/hydromt_wflow>`_ plugin.

.. code-block:: console

  conda env create -f environment.yml

Documentation
-------------

Learn more about the hydroMT_delwaq plugin in its `online documentation <https://deltares.github.io/hydromt_delwaq/>`_

Contributing
------------

You can find information about contributing to hydroMT at our `Contributing page <https://deltares.github.io/hydromt_plugin/latest/contributing.html>`_.

License
-------

Copyright (c) 2021, Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General 
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your 
option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
for more details.

You should have received a copy of the GNU General Public License along with this program. If not, 
see <https://www.gnu.org/licenses/>.
classic-app-layer 0.0.1
Provides primitives for application layer
Requires Python: >=3.7

# Classic App Layer

This package provides primitives for application layer.
Part of project "Classic".

Usage for validation:

```python
from dataclasses import dataclass

from classic.app import DTO, validate_with_dto
from pydantic import validate_arguments


class SomeDTO(DTO):
    """Based on pydantic.BaseModel. Used for validating input"""
    
    some_field: int
    another_field: str


@dataclass
class SomeAppCls:
    """Some class with app logic. May be mapped on DB."""
    some_field: int
    another_field: str


class SomeService:
    
    @validate_arguments
    def some_method(self, arg: int):
        assert isinstance(arg, int)
    
    @validate_with_dto
    def another_method(self, params: SomeDTO):
        instance = params.create_obj(SomeAppCls)
        print(instance)

```

Usage for errors:
```python
from classic.app import AppError, ErrorsList


# Describe errors, possible in application
class IncorrectState(AppError):
    msg_template = 'Incorrect app state - "{text}"'
    code = 'app.incorrect_state'


class ServiceNotReady(AppError):
    msg_template = 'Service not ready yet'
    code = 'app.service_not_ready'


# In another file with services:
class SomeService:
    
    def __init__(self):
        self.ready_to_serve = False

    def is_ready(self):
        """Demonstrates simple usage"""
        if not self.ready_to_serve:
            raise ServiceNotReady()

    def mark_as_ready(self):
        """Demonstrates usage of error message templates"""
        if self.ready_to_serve:
            raise IncorrectState(text='Service are ready')
        self.ready_to_serve = True

    def just_give_errors(self):
        """Demonstrates method, what may have more than 1 error"""
        errors = [IncorrectState(text='error 1'), 
                  IncorrectState(text='error 2')]
        raise ErrorsList(errors)


# Somewhere in adapters:

service = SomeService()

try:
    service.is_ready()
except AppError as error:
    print(f'Application responses with error code "{error.code}", '
          f'message is "{error.message}"')

try:
    service.mark_as_ready()
    service.mark_as_ready()
except AppError as error:
    print(f'Application responses with error code "{error.code}", '
          f'message is "{error.message}"')
    
try:
    service.just_give_errors()
except ErrorsList as errors_list:
    for error in errors_list.errors:
        print(f'Application responses with error code "{error.code}", '
              f'message is "{error.message}"')
```
classic-aspects 0.0.1
Provides convenient utils for late decorating, based on idea of aspects-oriented programming
Requires Python: >=3.7

# Classic Aspects

This package provides convenient utils for late decorating, based on idea of
aspects-oriented programming. Part of project "Classic".

Usage:

```python

from classic.aspects import PointCut

points = PointCut()


@points.join_point
def add_numbers(left, right):
    return left + right


assert add_numbers(1, 2) == 3  # Returns 3


def some_decorator(fn):
    
    def wrapper(*args, **kwargs):
        print('Function called!')
        return fn(*args, **kwargs)
    
    return wrapper


add_numbers.join(some_decorator)

assert add_numbers(1, 2) == 3  # Returns 3 and print "Function called!"
```
envyconfig 1.2.1
YAML reader with ENV interpolation.
Requires Python: >=3.8
Keywords: configtools development

# envyconfig
Envyconfig is a python package for reading YAML config files with pointers to external keys.  It reads the specified YAML file, fetches data from the configured sources, and returns the corresponding dict structure.

The primary purpose is to allow keys to secret configuration items to be stored in the YAML file, for ease of use during program loading.

Builds on the PyYAML package, with the following additions:
* Environment variables can be specified as config values.
* GCP Secrets can be specified as config values.
* Nested YAML structures can be flattened to get a simple key / value dict.
* Default values can be specified, for instance from the command line.

Requires Python 3.8 or higher.


## Basic Usage

```python
>> > import envyconfig
>> > config = envyconfig.load(config_file='my_config.yaml')
>> > print(config)
{'foo': {'bar': 'baz'}}
```

### Sample config file.
```yaml
foo:

   # Google Cloud Secret Manager: Loads "bar" from secret "bar" in the "my-project"
   #  GCP project.
   bar: ${gs:/my-project/my-secret}

   # Environment variables: Loads "baz" from the environment variable "BAZ".
   # If this variable is not set, it defaults to "something_else".
   baz: ${env:BAZ:something_else}

   # HashiCorp Vault: Loads "bam" from the secret "bam" mounted Vault mount
   # "/path/to/secrets/mount/my-secrets/".
   bam: ${vault:/path/to/secrets/mount/my-secrets/bam}
```


## Usage Details
### Interpolation keys.
You indicate the values you want interpolated by one of the configured engines through a wrapper
`${<method>:<key>:<default>}`, such as `${env:MY_VAR:my_default}`.  The currently supported engines are
* environment (`os.environ`) variables (key: `env`), and
* Google Secret Manager (key: `gs`).
* HashiCorp Vault
* Format strings for run-time interpolation.
The engines are lazy-loaded, so unless you request interpolation by one of them, the configuration is not loaded.
This is useful for advanced engines (presently `gs`), that rely on external libraries and configuration.

As the method, key and default values are separated by a `:`, this character is not allowed in the method or
key names.  It is allowed in default values, though.  So `$(env:REDIRECT_PAGE:https://localhost/}` is legal syntax.

### Environment variables
Environment variables behave like you expect them to.

### Google Secret Manager
This engine requires the optional dependency (or separate installation of) `google-cloud-secret-manager`
(i.e. `pip install envyconfig[google-cloud-secret-manager]`), and a pointer to your GCP key
(`GOOGLE_APPLICATION_CREDENTIALS`), as described on [Authenticating as a service account](https://cloud.google.com/docs/authentication/production))

#### Credits and further documentation
* [GCP Python Secret Manager](https://github.com/googleapis/python-secret-manager)
* [Python Environment Variables](https://docs.python.org/3/using/cmdline.html#environment-variables)
* [HashiCorp Vault](https://www.vaultproject.io/)
* [PyYAML](https://pyyaml.org)
* [EnvyConfig](https://github.com/geirem/envyconfig/)