diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 0000000..cbd920f
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,10 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ - package-ecosystem: "pip"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml
index d7c3b46..ecc754a 100644
--- a/.github/workflows/_build.yaml
+++ b/.github/workflows/_build.yaml
@@ -8,6 +8,9 @@
name: Build
+permissions:
+ contents: read
+
on:
workflow_call:
inputs:
@@ -23,10 +26,10 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
- name: Set up Python ${{ inputs.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ inputs.python-version }}
diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml
index 8313c3d..1562d57 100644
--- a/.github/workflows/_build_doc.yaml
+++ b/.github/workflows/_build_doc.yaml
@@ -7,6 +7,9 @@
name: Build Doc
+permissions:
+ contents: read
+
on:
workflow_call:
inputs:
@@ -22,10 +25,10 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
- name: Set up Python ${{ inputs.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ inputs.python-version }}
diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml
index a3548c8..7eb5fd2 100644
--- a/.github/workflows/_codecov.yaml
+++ b/.github/workflows/_codecov.yaml
@@ -8,6 +8,9 @@
name: CodeCov
+permissions:
+ contents: read
+
on:
workflow_call:
inputs:
@@ -32,10 +35,10 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ inputs.python-version }}
@@ -49,7 +52,7 @@ jobs:
run: pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab #v4.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml
index 449f073..57b0585 100644
--- a/.github/workflows/_codeql.yaml
+++ b/.github/workflows/_codeql.yaml
@@ -33,7 +33,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml
index 2c8a4f8..8dd9339 100644
--- a/.github/workflows/_pre_commit.yaml
+++ b/.github/workflows/_pre_commit.yaml
@@ -7,6 +7,9 @@
name: Pre-Commit
+permissions:
+ contents: read
+
on:
workflow_call:
@@ -15,5 +18,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
- - uses: pre-commit/action@v3.0.0
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
+ - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml
index 96d0de6..71d7e38 100644
--- a/.github/workflows/_pypi_publish.yaml
+++ b/.github/workflows/_pypi_publish.yaml
@@ -9,6 +9,9 @@
name: PyPI Publish
+permissions:
+ contents: read
+
on:
workflow_call:
inputs:
@@ -28,12 +31,12 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
with:
fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse
- name: Set up Python 3.11
- uses: actions/setup-python@v5
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.11
diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml
index cd7fe65..a71f08e 100644
--- a/.github/workflows/_test.yaml
+++ b/.github/workflows/_test.yaml
@@ -7,6 +7,9 @@
name: Test Spot
+permissions:
+ contents: read
+
on:
workflow_call:
inputs:
@@ -23,10 +26,10 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
- name: Set up Python ${{ inputs.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ inputs.python-version }}
diff --git a/Makefile b/Makefile
index be02861..5e4a3f9 100644
--- a/Makefile
+++ b/Makefile
@@ -104,3 +104,6 @@ clean:
find tests -name "__pycache__" | xargs rm -rf
find cmethods -name "__pycache__" | xargs rm -rf
find examples -name "__pycache__" | xargs rm -rf
+
+# for file in `ls .github/workflows`; do sed -i '' 's/actions\/checkout@v4/actions\/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0/g' .github/workflows/$file; done
+# for file in `ls .github/workflows`; do sed -i '' 's/actions\/setup-python@v5/actions\/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0/g' .github/workflows/$file; done
diff --git a/README.md b/README.md
index df83a7f..1117a9a 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,9 @@
[![CI/CD](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml/badge.svg?branch=master)](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml)
[![codecov](https://codecov.io/github/btschwertfeger/python-cmethods/branch/master/graph/badge.svg?token=OSO4PAABPD)](https://codecov.io/github/btschwertfeger/python-cmethods)
+[![OpenSSF ScoreCard](https://img.shields.io/ossf-scorecard/github.com/btschwertfeger/python-cmethods?label=openssf%20scorecard&style=flat)](https://securityscorecards.dev/viewer/?uri=github.com/btschwertfeger/python-cmethods)
+[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8666/badge)](https://www.bestpractices.dev/projects/8666)
+
![release](https://shields.io/github/release-date/btschwertfeger/python-cmethods)
![release](https://shields.io/github/v/release/btschwertfeger/python-cmethods?display_name=tag)
[![DOI](https://zenodo.org/badge/496160109.svg)](https://zenodo.org/badge/latestdoi/496160109)
@@ -17,20 +20,15 @@
-This Python module serves as a collection of different scale- and
-distribution-based bias correction techniques for climate sciences.
-
-The documentation is available at: [https://python-cmethods.readthedocs.io/en/stable/](https://python-cmethods.readthedocs.io/en/stable/)
+Welcome to python-cmethods, a powerful Python package designed for bias
+correction and adjustment of climate data. Built with a focus on ease of use and
+efficiency, python-cmethods offers a comprehensive suite of functions tailored
+for applying bias correction methods to climate model simulations and
+observational datasets.
Please cite this project as described in
https://zenodo.org/doi/10.5281/zenodo.7652755.
-> ⚠️ For the application of bias corrections on _large data sets_ it is
-> recommended to also try the command-line tool
-> [BiasAdjustCXX](https://github.com/btschwertfeger/BiasAdjustCXX).
-
----
-
## Table of Contents
1. [ About ](#about)
@@ -41,16 +39,16 @@ https://zenodo.org/doi/10.5281/zenodo.7652755.
6. [ Contribution ](#contribution)
7. [ References ](#references)
----
-
## 1. About
-These programs and data structures are developed with the aim of reducing
-discrepancies between modeled and observed climate data. Historical data is
-utilized to calibrate variables from current and future time series to achieve
-distributional properties that closely resemble the possible actual values.
+Bias correction in climate research involves the adjustment of systematic errors
+or biases present in climate model simulations or observational datasets to
+improve their accuracy and reliability, ensuring that the data better represents
+actual climate conditions. This process typically involves statistical methods
+or empirical relationships to correct for biases caused by factors such as
+instrument calibration, spatial resolution, or model deficiencies.
-For instance, modeled data typically indicate values that are colder than the
-actual values. To address this issue, an adjustment procedure is employed. The
-figure below illustrates the observed, modeled, and adjusted values, revealing
-that the delta adjusted time series ($T^{*DM}_{sim,p}$) are significantly more
-similar to the observed data ($T{obs,p}$) than the raw modeled data
-($T_{sim,p}$).
+python-cmethods empowers scientists to effectively address those biases in
+climate data, ensuring greater accuracy and reliability in research and
+decision-making processes. By leveraging cutting-edge techniques and seamless
+integration with popular libraries like [xarray](https://xarray.dev/) and
+[Dask](https://docs.dask.org/en/stable/), this package simplifies the process
+of bias adjustment, even when dealing with large-scale climate simulations and
+extensive spatial domains.
+
+In this way, for example, modeled data, which on average represent values that
+are too cold, can be easily bias-corrected by applying any adjustment procedure
+included in this package.
+
+For instance, modeled data can report values that are way colder than the those
+data reported by reanalysis time-series. To address this issue, an adjustment
+procedure can be employed. The figure below illustrates the observed, modeled,
+and adjusted values, revealing that the delta-adjusted time series
+($T^{*DM}_{sim,p}$) is significantly more similar to the observational data
+($T{obs,p}$) than the raw model output ($T_{sim,p}$).
+The mathematical foundations supporting each bias correction technique
+implemented in python-cmethods are integral to the package, ensuring
+transparency and reproducibility in the correction process. Each method is
+accompanied by references to trusted publications, reinforcing the reliability
+and rigor of the corrections applied.
+
## 2. Available Methods
@@ -96,16 +112,16 @@ https://python-cmethods.readthedocs.io/en/stable/
non-stochastic climate variables. Variance scaling can only be applied on
non-stochastic climate variables.
- - Non-stochastic climate variables are those that can be predicted with relative
- certainty based on factors such as location, elevation, and season. Examples
- of non-stochastic climate variables include air temperature, air pressure, and
- solar radiation.
+ - Non-stochastic climate variables are those that can be predicted with
+ relative certainty based on factors such as location, elevation, and season.
+ Examples of non-stochastic climate variables include air temperature, air
+ pressure, and solar radiation.
- - Stochastic climate variables, on the other hand, are those that exhibit a high
- degree of variability and unpredictability, making them difficult to forecast
- accurately. Precipitation is an example of a stochastic climate variable
- because it can vary greatly in timing, intensity, and location due to complex
- atmospheric and meteorological processes.
+ - Stochastic climate variables, on the other hand, are those that exhibit a
+ high degree of variability and unpredictability, making them difficult to
+ forecast accurately. Precipitation is an example of a stochastic climate
+ variable because it can vary greatly in timing, intensity, and location due
+ to complex atmospheric and meteorological processes.
- Except for the detrended quantile mapping (DQM) technique, all methods can be
applied to 1- and 3-dimensional data sets. The implementation of DQM to
@@ -114,7 +130,8 @@ https://python-cmethods.readthedocs.io/en/stable/
- Except for DQM, all methods can be applied using `cmethods.adjust`. Chunked
data for computing e.g. in a dask cluster is possible as well.
-- For any questions -- please open an issue at https://github.com/btschwertfeger/python-cmethods/issues
+- For any questions -- please open an issue at
+ https://github.com/btschwertfeger/python-cmethods/issues
@@ -124,8 +141,6 @@ https://python-cmethods.readthedocs.io/en/stable/
python3 -m pip install python-cmethods
```
----
-
## 4. Usage and Examples
@@ -178,8 +193,9 @@ Notes:
Notebook with different methods and plots: `/examples/examples.ipynb`
-There is also an example script (`/examples/biasadjust.py`) that can be used to apply the available bias correction methods
-on 1- and 3-dimensional data sets (see `/examples/input_data/*.nc`).
+There is also an example script (`/examples/biasadjust.py`) that can be used to
+apply the available bias correction methods on 1- and 3-dimensional data sets
+(see `/examples/input_data/*.nc`).
Help:
@@ -219,8 +235,6 @@ Notes:
- This script is far away from perfect - so please see it, as a starting point.
(:
----
-
## 5. Notes
@@ -246,8 +260,6 @@ Notes:
is available in
[BiasAdjustCXX](https://github.com/btschwertfeger/BiasAdjustCXX).
----
-
## 6. 🆕 Contributions
@@ -277,5 +289,3 @@ Notes:
https://github.com/btschwertfeger/python-cmethods/issues/47. I appreciate all
the valuable suggestions provided throughout the implementation of the
subsequent changes.
-
----
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..c6c6262
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,21 @@
+# Security Policy
+
+## Reporting Security Vulnerabilities
+
+At python-cmethods, we take security seriously. We welcome and encourage
+responsible disclosure of security vulnerabilities. If you believe you've found
+a security vulnerability within our project, please report it immediately.
+
+## How to Report a Security Vulnerability
+
+To report a security vulnerability, please send an email to
+[contact@b-schwertfeger.de](mailto:contact@b-schwertfeger.de) with a detailed
+description of the vulnerability. We kindly request that you refrain from
+disclosing the vulnerability publicly until we have had an opportunity to
+address it.
+
+## Our Commitment
+
+We are committed to promptly addressing and resolving any security
+vulnerabilities reported to us. We will investigate all reports and take
+appropriate action to protect the security of our users and their data.
diff --git a/cmethods/core.py b/cmethods/core.py
index f76c929..936c6b1 100644
--- a/cmethods/core.py
+++ b/cmethods/core.py
@@ -107,14 +107,14 @@ def adjust(
data sets. For more information please refer to the method specific
requirements and execution examples.
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html
The time dimension of ``obs``, ``simh`` and ``simp`` must be named ``time``.
If the sizes of time dimensions of the input data sets differ, you have to
pass the hidden ``input_core_dims`` parameter, see
- https://python-cmethods.readthedocs.io/en/latest/src/getting_started.html#advanced-usage
+ https://python-cmethods.readthedocs.io/en/latest/getting_started.html#advanced-usage
for more information.
:param method: Technique to apply
diff --git a/cmethods/distribution.py b/cmethods/distribution.py
index cc54c1a..386cfd1 100644
--- a/cmethods/distribution.py
+++ b/cmethods/distribution.py
@@ -38,7 +38,7 @@ def quantile_mapping(
) -> np.ndarray:
r"""
**Do not call this function directly, please use :func:`cmethods.adjust`**
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-mapping
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#quantile-mapping
"""
check_adjust_called(
function_name="quantile_mapping",
@@ -99,7 +99,7 @@ def detrended_quantile_mapping(
**kwargs: Any,
) -> NPData:
r"""
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#detrended_quantile_mapping
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#detrended_quantile_mapping
This function can only be applied to 1-dimensional data.
"""
@@ -217,7 +217,7 @@ def quantile_delta_mapping(
r"""
**Do not call this function directly, please use :func:`cmethods.adjust`**
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-delta-mapping
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#quantile-delta-mapping
"""
check_adjust_called(
function_name="quantile_delta_mapping",
diff --git a/cmethods/scaling.py b/cmethods/scaling.py
index c876b93..d80e78e 100644
--- a/cmethods/scaling.py
+++ b/cmethods/scaling.py
@@ -39,7 +39,7 @@ def linear_scaling(
r"""
**Do not call this function directly, please use :func:`cmethods.adjust`**
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#linear-scaling
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#linear-scaling
"""
check_adjust_called(
function_name="linear_scaling",
@@ -81,7 +81,7 @@ def variance_scaling(
r"""
**Do not call this function directly, please use :func:`cmethods.CMethods.adjust`**
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#variance-scaling
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#variance-scaling
"""
check_adjust_called(
function_name="variance_scaling",
@@ -126,7 +126,7 @@ def delta_method(
) -> NPData:
r"""
**Do not call this function directly, please use :func:`cmethods.adjust`**
- See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#delta-method
+ See https://python-cmethods.readthedocs.io/en/latest/methods.html#delta-method
"""
check_adjust_called(
function_name="delta_method",
diff --git a/doc/src/cmethods.rst b/doc/cmethods.rst
similarity index 100%
rename from doc/src/cmethods.rst
rename to doc/cmethods.rst
diff --git a/doc/src/getting_started.rst b/doc/getting_started.rst
similarity index 100%
rename from doc/src/getting_started.rst
rename to doc/getting_started.rst
diff --git a/doc/index.rst b/doc/index.rst
index 56a3687..7011b83 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,7 +1,5 @@
.. python-cmethods documentation master file, created by
sphinx-quickstart on Mon Apr 10 10:04:20 2023.
- You can adapt this file completely to your liking, but it should at least
- contain the root ``toctree`` directive.
Welcome to python-cmethods's documentation!
===========================================
@@ -10,9 +8,9 @@ Welcome to python-cmethods's documentation!
:maxdepth: 2
:caption: Contents:
- src/introduction.rst
- src/getting_started.rst
- src/cmethods.rst
- src/methods.rst
- src/issues.rst
- src/license.rst
+ introduction.rst
+ getting_started.rst
+ cmethods.rst
+ methods.rst
+ issues.rst
+ license.rst
diff --git a/doc/src/introduction.rst b/doc/introduction.rst
similarity index 65%
rename from doc/src/introduction.rst
rename to doc/introduction.rst
index 42ee927..da383b3 100644
--- a/doc/src/introduction.rst
+++ b/doc/introduction.rst
@@ -1,20 +1,27 @@
.. This is the introduction
-Introduction
-=============
+python-cmethods
+===============
|GitHub badge| |License badge| |PyVersions badge| |Downloads badge|
-|CI/CD badge| |codecov badge|
+|CI/CD badge| |codecov badge| |OSSF Scorecard| |OSSF Best Practices|
|Release date badge| |Release version badge| |DOI badge| |Docs stable|
About
-----
-This Python module and the provided data structures are designed to help
-minimize discrepancies between modeled and observed climate data of different
-time periods. Data from past periods are used to adjust variables from current
-and future time series so that their distributional properties approximate
-possible actual values.
+Welcome to `python-cmethods`_, a powerful Python package designed for bias
+correction and adjustment of climate data. Built with a focus on ease of use and
+efficiency, python-cmethods offers a comprehensive suite of functions tailored
+for applying bias correction methods to climate model simulations and
+observational datasets.
+
+Bias correction in climate research involves the adjustment of systematic errors
+or biases present in climate model simulations or observational datasets to
+improve their accuracy and reliability, ensuring that the data better represents
+actual climate conditions. This process typically involves statistical methods
+or empirical relationships to correct for biases caused by factors such as
+instrument calibration, spatial resolution, or model deficiencies.
.. figure:: ../_static/images/biasCdiagram.png
:width: 600
@@ -23,13 +30,16 @@ possible actual values.
Fig 1: Schematic representation of a bias adjustment procedure
-
In this way, for example, modeled data, which on average represent values that
-are too cold, can be bias-corrected by applying an adjustment procedure. The
-following figure shows the observed, the modeled, and the bias-corrected values.
-It is directly visible that the delta adjusted time series
-(:math:`T^{*DM}_{sim,p}`) are much more similar to the observed data
-(:math:`T_{obs,p}`) than the raw modeled data (:math:`T_{sim,p}`).
+are too cold, can be easily bias-corrected by applying any adjustment procedure
+included in this package.
+
+For instance, modeled data can report values that are way colder than the those
+data reported by reanalysis time-series. To address this issue, an adjustment
+procedure can be employed. The figure below illustrates the observed, modeled,
+and adjusted values, revealing that the delta-adjusted time series
+(:math:`T^{*DM}_{sim,p}`) is significantly more similar to the observational
+data (:math:`T_{obs,p}`) than the raw model output (:math:`T_{sim,p}`).
.. figure:: ../_static/images/dm-doy-plot.png
:width: 600
@@ -38,18 +48,24 @@ It is directly visible that the delta adjusted time series
Fig 2: Temperature per day of year in modeled, observed and bias-adjusted climate data
+The mathematical foundations supporting each bias correction technique
+implemented in python-cmethods are integral to the package, ensuring
+transparency and reproducibility in the correction process. Each method is
+accompanied by references to trusted publications, reinforcing the reliability
+and rigor of the corrections applied.
+
Available Methods
-----------------
python-cmethods provides the following bias correction techniques:
-- Linear Scaling
-- Variance Scaling
-- Delta Method
-- Quantile Mapping
-- Detrended Quantile Mapping
-- Quantile Delta Mapping
+- :ref:`Linear Scaling`
+- :ref:`Variance Scaling`
+- :ref:`Delta Method`
+- :ref:`Quantile Mapping`
+- :ref:`Detrended Quantile Mapping`
+- :ref:`Quantile Delta Mapping`
Please refer to the official documentation for more information about these
methods as well as sample scripts:
diff --git a/doc/src/issues.rst b/doc/issues.rst
similarity index 100%
rename from doc/src/issues.rst
rename to doc/issues.rst
diff --git a/doc/src/license.rst b/doc/license.rst
similarity index 100%
rename from doc/src/license.rst
rename to doc/license.rst
diff --git a/doc/links.rst b/doc/links.rst
index a06fa68..1bf8ec8 100644
--- a/doc/links.rst
+++ b/doc/links.rst
@@ -12,6 +12,10 @@
.. _xclim: https://zenodo.org/record/7535677
+.. _xarray: https://xarray.dev/
+
+.. _dask: https://docs.dask.org/en/stable/
+
.. BADGES
@@ -49,3 +53,11 @@
.. |Docs stable| image:: https://readthedocs.org/projects/python-cmethods/badge/?version=stable
:target: https://python-cmethods.readthedocs.io/en/stable
:alt: Documentation Status stable
+
+.. |OSSF Scorecard| image:: https://img.shields.io/ossf-scorecard/github.com/btschwertfeger/python-cmethods?label=openssf%20scorecard&style=flat
+ :target: https://securityscorecards.dev/viewer/?uri=github.com/btschwertfeger/python-cmethods
+ :alt: OSSF Scorecard
+
+.. |OSSF Best Practices| image:: https://www.bestpractices.dev/projects/8666/badge
+ :target: https://www.bestpractices.dev/projects/8666
+ :alt: OSSF Best Practices
diff --git a/doc/src/methods.rst b/doc/methods.rst
similarity index 99%
rename from doc/src/methods.rst
rename to doc/methods.rst
index a36ecf5..b7738d6 100644
--- a/doc/src/methods.rst
+++ b/doc/methods.rst
@@ -6,6 +6,8 @@ Please note that the formulas are meant to be applied to a single time series.
The python-cmethods package can apply these formulas to single and
multidimensional data.
+.. _linear-scaling:
+
Linear Scaling
--------------
@@ -70,6 +72,7 @@ for both additive and multiplicative Linear Scaling are shown:
... group="time.month" # this is important!
... )
+.. _variance-scaling:
Variance Scaling
----------------
@@ -144,6 +147,7 @@ enables the adjustment of the standard deviation in the following step.
... group="time.month" # this is important!
... )
+.. _delta-method:
Delta Method
------------
@@ -213,6 +217,7 @@ for both additive and multiplicative Delta Method are shown:
... group="time.month" # this is important!
... )
+.. _quantile-mapping:
Quantile Mapping
----------------
@@ -295,6 +300,7 @@ In the following the equations of Alex J. Cannon (2015) are shown and explained:
... kind="+",
... )
+.. _detrended-quantile-mapping:
Detrended Quantile Mapping
--------------------------
@@ -362,6 +368,8 @@ shift of :math:`X_{sim,p}(i)`:
... )
+.. _quantile-delta-mapping:
+
Quantile Delta Mapping
-----------------------