From 47a5a6962f239d7b73573909b877743c490bde34 Mon Sep 17 00:00:00 2001 From: Damar Wicaksono Date: Mon, 6 Mar 2023 10:08:02 +0100 Subject: [PATCH 1/5] Update badges in the README for two branches. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1c43338..43d5272 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://codecov.io/gh/damar-wicaksono/uqtestfuns/branch/main/graph/badge.svg?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://codecov.io/gh/damar-wicaksono/uqtestfuns/branch/dev/graph/badge.svg?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: From 8930edbc997db4940d77034df76fba9820358ffc Mon Sep 17 00:00:00 2001 From: Damar Wicaksono Date: Mon, 6 Mar 2023 10:12:05 +0100 Subject: [PATCH 2/5] Use flat-square badge style. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43d5272..a19c61e 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ [![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`](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://codecov.io/gh/damar-wicaksono/uqtestfuns/branch/main/graph/badge.svg?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://codecov.io/gh/damar-wicaksono/uqtestfuns/branch/dev/graph/badge.svg?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) | +| 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 From 5d9f3b28d31a602a09aafe38c4931682ba658330 Mon Sep 17 00:00:00 2001 From: Damar Wicaksono Date: Mon, 6 Mar 2023 12:11:56 +0100 Subject: [PATCH 3/5] Add a CHANGELOG. --- CHANGELOG.md | 25 +++++++++++++++++++++++++ docs/test-functions/ackley.md | 6 ++++-- docs/test-functions/sobol-g.md | 6 ++++-- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7a75cb9 --- /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-08-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/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) From 0b360473aaf0aa21c687c1e15bd77d93c0bf5500 Mon Sep 17 00:00:00 2001 From: Damar Wicaksono Date: Mon, 6 Mar 2023 12:12:56 +0100 Subject: [PATCH 4/5] Fix typo. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a75cb9..05ce8e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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-08-03 +## [0.0.1] - 2023-06-03 First public release of UQTestFuns. From ddf4b5f9ca0f302580f0257771a3291c29b77b34 Mon Sep 17 00:00:00 2001 From: Damar Wicaksono Date: Mon, 6 Mar 2023 13:49:24 +0100 Subject: [PATCH 5/5] Update installation guide. --- README.md | 12 +++++++----- .../obtaining-and-installing.md | 18 ++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a19c61e..450a74e 100644 --- a/README.md +++ b/README.md @@ -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.