diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..05ce8e2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,25 @@ +# Changelog + +All notable changes to the UQTestFuns project is documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.0.1] - 2023-06-03 + +First public release of UQTestFuns. + +### Added + +- An abstract class (`UQTestFunABC`) to unify the interface of a UQ test function +- Probabilistic input modeling (via `ProbInput` class) with a joint independent distribution function +- `UnivDist` class to represent one-dimensional marginal distributions (a univariate continuous random variable) +- Nine univariate distributions +- A total of 11 UQ test functions (concrete implementations of `UQTestFunABC`) + typically used for the metamodeling, sensitivity analysis, and optimization applications +- A concrete class implementation (`UQTestFun`) to create a UQ test function on runtime +- A minimal documentation built using [Jupyter Book](https://jupyterbook.org) +- CI/CD to build and serve the documentation on [ReadTheDocs](https://readthedocs.org/) +- Mirror GitHub action to the [CASUS organization](https://github.com/casus) + +[0.0.1]: https://github.com/damar-wicaksono/uqtestfuns/releases/tag/v0.0.1 diff --git a/README.md b/README.md index 1c43338..450a74e 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ [![Python 3.8](https://img.shields.io/badge/python-3.7-blue.svg?style=flat-square)](https://www.python.org/downloads/release/python-370/) [![License](https://img.shields.io/github/license/damar-wicaksono/uqtestfuns?style=flat-square)](https://choosealicense.com/licenses/mit/) -| Branches | | -|:---------------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `main` (stable) | ![build](https://img.shields.io/github/actions/workflow/status/damar-wicaksono/uqtestfuns/main.yml?branch=dev&style=flat-square) [![CodeCov](https://img.shields.io/codecov/c/github/damar-wicaksono/uqtestfuns?style=flat-square&token=Y6YQEPJ1TT)](https://app.codecov.io/github/damar-wicaksono/uqtestfuns) [![Docs](https://readthedocs.org/projects/uqtestfuns/badge/?version=latest&style=flat-square)](https://uqtestfuns.readthedocs.io/en/latest/?badge=latest) | -| `dev` (latest) | ![build](https://img.shields.io/github/actions/workflow/status/damar-wicaksono/uqtestfuns/main.yml?branch=dev&style=flat-square) [![CodeCov](https://img.shields.io/codecov/c/github/damar-wicaksono/uqtestfuns?style=flat-square&token=Y6YQEPJ1TT)](https://app.codecov.io/github/damar-wicaksono/uqtestfuns) [![Docs](https://readthedocs.org/projects/uqtestfuns/badge/?version=latest&style=flat-square)](https://uqtestfuns.readthedocs.io/en/latest/?badge=latest) | +| Branches | | +|:--------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [`main`](https://github.com/damar-wicaksono/uqtestfuns/tree/main) (stable) | ![build](https://img.shields.io/github/actions/workflow/status/damar-wicaksono/uqtestfuns/main.yml?branch=main&style=flat-square) [![codecov](https://img.shields.io/codecov/c/github/damar-wicaksono/uqtestfuns/main?logo=CodeCov&style=flat-square&token=Y6YQEPJ1TT)](https://app.codecov.io/gh/damar-wicaksono/uqtestfuns/tree/main) [![Docs](https://readthedocs.org/projects/uqtestfuns/badge/?version=stable&style=flat-square)](https://uqtestfuns.readthedocs.io/en/latest/?badge=stable) | +| [`dev`](https://github.com/damar-wicaksono/uqtestfuns/tree/dev) (latest) | ![build](https://img.shields.io/github/actions/workflow/status/damar-wicaksono/uqtestfuns/main.yml?branch=dev&style=flat-square) [![codecov](https://img.shields.io/codecov/c/github/damar-wicaksono/uqtestfuns/dev?logo=CodeCov&style=flat-square&token=Y6YQEPJ1TT)](https://app.codecov.io/gh/damar-wicaksono/uqtestfuns/tree/dev) [![Docs](https://readthedocs.org/projects/uqtestfuns/badge/?version=latest&style=flat-square)](https://uqtestfuns.readthedocs.io/en/latest/?badge=latest) | - + UQTestFuns is an open-source Python3 library of test functions commonly used within the uncertainty quantification (UQ) community. The package aims to provide: @@ -102,19 +102,21 @@ array([ 57.32635774, 110.12229548, 53.10585812, 96.15822154, ## Installation - -UQTestFuns is not yet available via PyPI; the source can be obtained from GitHub: +You can obtain UQTestFuns directly from PyPI using `pip`: ```bash -$ git clone https://github.com/casus/uqtestfuns +$ pip install uqtestfuns ``` -To install UQTestFuns from the source, type: +Alternatively, you can also install the latest version from the source: ```bash -$ pip install [-e] . +pip install git+https://github.com/damar-wicaksono/uqtestfuns.git ``` +> **NOTE**: UQTestFuns is currently work in progress, +> therefore interfaces are subject to change. + It's a good idea to install the package in an isolated virtual environment. ## Getting help diff --git a/docs/getting-started/obtaining-and-installing.md b/docs/getting-started/obtaining-and-installing.md index 27695a8..e5131b7 100644 --- a/docs/getting-started/obtaining-and-installing.md +++ b/docs/getting-started/obtaining-and-installing.md @@ -1,20 +1,18 @@ # Obtaining and Installing UQTestFuns -UQTestFuns is still under pre-release development; -it is therefore not yet available via PyPI. -The source is hosted in GitHub and can be obtained via: +You can obtain UQTestFuns directly from PyPI using `pip`: ```bash -$ git clone https://github.com/casus/uqtestfuns +$ pip install uqtestfuns ``` -To install the package from source, type: +Alternatively, you can also install the latest version from the source: ```bash -$ pip install [-e] . +pip install git+https://github.com/damar-wicaksono/uqtestfuns.git ``` -where the optional flag `-e` tells `pip` to link the package source as obtained -via `git` into the Python site-packages. -It's often a good idea to install the package -in an isolated Python virtual environment. +> **NOTE**: UQTestFuns is currently work in progress, +> therefore interfaces are subject to change. + +It's a good idea to install the package in an isolated virtual environment. diff --git a/docs/test-functions/ackley.md b/docs/test-functions/ackley.md index 572370f..43dd214 100644 --- a/docs/test-functions/ackley.md +++ b/docs/test-functions/ackley.md @@ -64,7 +64,7 @@ axs_2.plot_surface( mesh_2d[1], yy_2d.reshape(1000,1000), linewidth=0, - cmap="magma", + cmap="plasma", antialiased=False, alpha=0.5 ) @@ -75,7 +75,9 @@ axs_2.set_title("Surface plot of 2D Ackley", fontsize=14) # Contour axs_3 = plt.subplot(133) -cf = axs_3.contourf(mesh_2d[0], mesh_2d[1], yy_2d.reshape(1000, 1000),cmap='magma') +cf = axs_3.contourf( + mesh_2d[0], mesh_2d[1], yy_2d.reshape(1000, 1000), cmap="plasma" +) axs_3.set_xlabel("$x_1$", fontsize=14) axs_3.set_ylabel("$x_2$", fontsize=14) axs_3.set_title("Contour plot of 2D Ackley", fontsize=14) diff --git a/docs/test-functions/sobol-g.md b/docs/test-functions/sobol-g.md index b62225f..30f76ee 100644 --- a/docs/test-functions/sobol-g.md +++ b/docs/test-functions/sobol-g.md @@ -63,7 +63,7 @@ axs_2.plot_surface( mesh_2d[0], mesh_2d[1], yy_2d.reshape(1000,1000), - cmap="magma", + cmap="plasma", linewidth=0, antialiased=False, alpha=0.5 @@ -75,7 +75,9 @@ axs_2.set_title("Surface plot of 2D Sobol'-G", fontsize=14) # Contour axs_3 = plt.subplot(133) -cf = axs_3.contourf(mesh_2d[0], mesh_2d[1], yy_2d.reshape(1000, 1000),cmap='magma') +cf = axs_3.contourf( + mesh_2d[0], mesh_2d[1], yy_2d.reshape(1000, 1000), cmap="plasma" +) axs_3.set_xlabel("$x_1$", fontsize=14) axs_3.set_ylabel("$x_2$", fontsize=14) axs_3.set_title("Contour plot of 2D Sobol'-G", fontsize=14)