Skip to content

Commit

Permalink
Merge pull request #156 from damar-wicaksono/dev
Browse files Browse the repository at this point in the history
Merge request in preparation of v0.0.1 release
  • Loading branch information
damar-wicaksono authored Mar 6, 2023
2 parents a767fce + 6eb44dd commit aa95838
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 24 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |

<!--One paragrah description-->
<!--One paragraph description-->
UQTestFuns is an open-source Python3 library of test functions commonly used
within the uncertainty quantification (UQ) community.
The package aims to provide:
Expand Down Expand Up @@ -102,19 +102,21 @@ array([ 57.32635774, 110.12229548, 53.10585812, 96.15822154,

## Installation

<!--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
Expand Down
18 changes: 8 additions & 10 deletions docs/getting-started/obtaining-and-installing.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 4 additions & 2 deletions docs/test-functions/ackley.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions docs/test-functions/sobol-g.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit aa95838

Please sign in to comment.