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

Add beginning of docs #20

Merged
merged 3 commits into from
Mar 7, 2024
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![PyPI](https://img.shields.io/pypi/v/ewatercycle-HBV)](https://pypi.org/project/ewatercycle-HBV/)
[![github license badge](https://img.shields.io/github/license/Daafip/ewatercycle-hbv)](https://github.com/Daafip/ewatercycle-hbv)
[![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B%20%20%E2%97%8B%20%20%E2%97%8B-yellow)](https://fair-software.eu)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Daafip_ewatercycle-hbv&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Daafip_ewatercycle-hbv)

This package is based on the [Leaky bucket](https://github.com/eWaterCycle/ewatercycle-leakybucket/tree/main) & is a wrapper for the [HBV-bmi](https://github.com/Daafip/HBV-bmi) model.

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
61 changes: 61 additions & 0 deletions docs/source/_static/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
eWaterCycle plugin - HBV
========================

|PyPI| |github license badge| |fair-software badge| |Quality Gate
Status|

This package is based on the `Leaky
bucket <https://github.com/eWaterCycle/ewatercycle-leakybucket/tree/main>`__
& is a wrapper for the `HBV-bmi <https://github.com/Daafip/HBV-bmi>`__
model.

HBV (Hydrologiska Byråns Vattenbalansavdelning) is a conceptual
hydrological model. For more information on it’s history, see this
`paper <https://hess.copernicus.org/articles/26/1371/2022/>`__.

This current implementation is *without* a snow reservoir.

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

Install this package alongside your eWaterCycle installation

.. code:: console

pip install ewatercycle-hbv

Then HBV becomes available as one of the eWaterCycle models

.. code:: python

from ewatercycle.models import HBV

Implementing your own model
---------------------------

For more information on how this plugin works, and on how to implement
your own model see the `plugin
guide <https://github.com/eWaterCycle/ewatercycle-leakybucket/blob/main/plugin_guide.md>`__

Changelog
---------

Changes can be found in
`CHANGELOG.md <https://github.com/Daafip/ewatercycle-hbv/blob/main/CHANGELOG.md>`__
on GitHub

License
-------

This is a ``ewatercycle-plugin`` & thus this is distributed under the
same terms as the template: the
`Apache-2.0 <https://spdx.org/licenses/Apache-2.0.html>`__ license.

.. |PyPI| image:: https://img.shields.io/pypi/v/ewatercycle-HBV
:target: https://pypi.org/project/ewatercycle-HBV/
.. |github license badge| image:: https://img.shields.io/github/license/Daafip/ewatercycle-hbv
:target: https://github.com/Daafip/ewatercycle-hbv
.. |fair-software badge| image:: https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B%20%20%E2%97%8B%20%20%E2%97%8B-yellow
:target: https://fair-software.eu
.. |Quality Gate Status| image:: https://sonarcloud.io/api/project_badges/measure?project=Daafip_ewatercycle-hbv&metric=alert_status
:target: https://sonarcloud.io/summary/new_code?id=Daafip_ewatercycle-hbv
38 changes: 38 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'eWaterCycle-HBV'
copyright = '2024, David Haasnoot'
author = 'David Haasnoot'
release = '\x1b[A\x1b[F\x1b[B\x1b[B\x1b[F\x1b[B\x1b[B'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.autodoc',
"nbsphinx",
]

templates_path = ['_templates']
exclude_patterns = []

source_suffix = [".rst"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']


# -- Use autoapi.extension to run sphinx-apidoc -------
autoapi_dirs = ["../../src"]
autoapi_python_class_content = "both"
autoapi_options = ["members", "undoc-members", "imported-members", "show-inheritance"]
Loading
Loading