Skip to content

Commit

Permalink
Merge pull request #312 from damar-wicaksono/dev
Browse files Browse the repository at this point in the history
Merge the dev branch to the main branch
  • Loading branch information
damar-wicaksono authored Oct 27, 2023
2 parents f6a2c92 + 230f257 commit 53b9837
Show file tree
Hide file tree
Showing 126 changed files with 13,041 additions and 1,668 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Typesetting draft
on:
push:
branches:
- dev-joss

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: ./joss/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: ./joss/paper.pdf
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Packaging
name: Testing and packaging

on:
- push
Expand Down Expand Up @@ -52,6 +52,8 @@ jobs:
toxenv: "py38"
- version: "3.9"
toxenv: "py39"
- version: "3.11"
toxenv: "py311"
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
Expand Down
144 changes: 141 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,148 @@ 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.1.1] - 2023-07-03
## [Unreleased]

## [0.4.1] - 2023-10-27

### Added

- The two-dimensional polynomial function of high-degree for metamodeling
exercises from Alemazkoor and Meidani (2008).
- New tutorials (how the package may be used in a sensitivity analysis or
reliability analysis exercises) have been added to the documentation
following the review process in the submission of the package
to the Journal of Open Source Software (JOSS).

### Changed

- The documentation landing page now includes explicit statement regarding
the purpose of the package.

### Fixed

- Several typos in the documentation have been fixed with an additional
minor improvements overall.

## [0.4.0] - 2023-07-07

### Added

- The two-dimensional convex failure domain problem for reliability
analysis exercises from Borri and Speranzini (1997).
- The two-dimensional Quadratic RS problem for reliability analysis
exercises from Waarts (2000). This is a variant of the classic RS
problem with one quadratic term.
- The one-dimensional damped cosine function for metamodeling exercises
from an example in Santner et al. (2018).
- The two-dimensional circular bar RS problem for reliability analysis
exercises taken from an example in Verma et al. (2015).
- The two-dimensional polynomial function with random inputs
from Webster et al. (1996) for metamodeling exercises.
- New instance method for `UnivDist` and `ProbInput` classes
called `reset_rng()`. When called (optionally with a seed number), a new
instance of NumPy default RNG will be created and attached to the instance.
- GitHub actions now include testing on Python v3.11 via Tox.

### Changed

- `rng_seed_prob_input` keyword parameter has been removed from the list
of parameters to the constructor of all UQ test functions.
The accepted way to reset an RNG with a seed is to use the instance
method `reset_rng()` (optionally with a seed number)
of the `ProbInput` instance attached.
- Some background information in the documentation has been changed
to match the description in the JOSS paper draft.

### Fixed

- A mistake in one the parameter values of the Sobol'-G function
has been fixed.

## [0.3.0] - 2023-07-03

### Added

- The two-dimensional Gayton Hat function from Echard et al. (2013) used
in the context of reliability analysis.
- The eight-dimensional damped oscillator reliability problem from
Der Kiureghian and De Stefano (1990); the problem is based on the existing
Damped Oscillator model in the code base.
- The two-dimensional hyper-sphere bound reliability problem
from Li et al. (2018).
- The two-dimensional cantilever beam reliability problem from
Rajashekhar and Ellington (1993).
- The two-dimensional four-branch function for reliability analysis
from Katsuki and Frangopol (1994).
- The five-dimensional speed reducer shaft reliability problem
from Du and Sudjianto (2004).
- The two-dimensional reliability problem of a circular pipe crack
under a bending moment under Verma et al. (2015).
- New docs section on list of functions for reliability analysis including
a brief description on the reliability analysis problem.

## [0.2.0] - 2023-06-26

### Added

- The two-dimensional Franke functions (1st, 2nd, 3rd, 4th, 5th, and 6th),
relevant for metamodeling exercises, are added as UQ test functions.
- The two-dimensional McLain functions (S1, S2, S3, S4, and S5),
relevant for metamodeling exercises, are added as UQ test functions.
- An implementation of the Welch et al. (1992) test function, a 20-dimensional
function used in the context of metamodeling and sensitivity analysis.
- Four M-dimensional test functions from Bratley et al. (1992) useful for
testing multi-dimensional numerical integrations as well as
global sensitivity analysis methods.
- Add a new parameterization to the Sobol'-G function taken from
Bratley et al. (1992) and Saltelli and Sobol' (1995).
- An implementation of the one-dimensional function from Forrester et al.
(2008). The function was used as a test function for optimization approaches
using metamodels.
- An implementation of the Gramacy (2007) one-dimensional sine function,
a function with two regimes.
- Two base classes are now available `UQTestFunBareABC` and `UQTestFunABC`.
The former is used to implement a _bare_ UQ test function
(with only `evaluate()` and `ProbInput`), while the latter is used to
implement _published_ UQ test functions in the code base (i.e., with
additional metadata such as tags and description).
- An instance of NumPy random number generator is now attached to instances of
`UnivDist` and `ProbInput`. The random seed number may be passed
to the corresponding constructor for reproducibility.
- CITATION.cff file to the code base.

### Changed

- The date format in CHANGELOG.md has been changed from YYYY-DD-MM to the
ISO format YYYY-MM-DD.
- The bibliography style in the docs has been changed to 'unsrtalpha'
(alphanumeric labels, sorted by order of appearance).
- When `list_functions()` is called with a `tag` argument,
then the application tags are no longer displayed to save terminal spaces.
- The one-dimensional `OakleyOHagan1D` function has been renamed to
`Oakley1D`.

### Fixed

- The original citation for the Sobol'-G function has been fixed;
it is now referred to Saltelli and Sobol' (1995).
- If a function is used as parameters in a test function (e.g., if
variable dimension), then it must have the keyword parameter
"spatial_dimension" for the function to be called when an instance of
a UQ test function is created. This is to allow an arbitrary function
(without a parameter named "spatial_dimension") to be a parameter of
UQ test function.
- One-dimensional test function now returns a one-dimensional array.

## [0.1.1] - 2023-03-07

### Fixed

- v0.1.0 was erroneously already registered at PyPI;
latest version of UQTestFuns that was planned for v0.1.0 is now v0.1.1
- Missing link in CHANGELOG.md

## [0.1.0] - 2023-07-03
## [0.1.0] - 2023-03-07

### Added

Expand All @@ -34,7 +167,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Relax the numerical tolerance of a test (i.e., univariate beta distribution)
- Minor edit in the docs

## [0.0.1] - 2023-06-03
## [0.0.1] - 2023-03-06

First public release of UQTestFuns.

Expand All @@ -51,6 +184,11 @@ First public release of UQTestFuns.
- CI/CD to build and serve the documentation on [ReadTheDocs](https://readthedocs.org/)
- Mirror GitHub action to the [CASUS organization](https://github.com/casus)

[Unreleased]: https://github.com/damar-wicaksono/uqtestfuns/compare/main...dev
[0.4.1]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/damar-wicaksono/uqtestfuns/compare/v0.0.1...v0.1.0
[0.0.1]: https://github.com/damar-wicaksono/uqtestfuns/releases/tag/v0.0.1
42 changes: 42 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: UQTestFuns
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Damar
family-names: Wicaksono
affiliation: CASUS/HZDR
orcid: 'https://orcid.org/0000-0001-8587-7730'
identifiers:
- type: doi
value: 10.5281/zenodo.10047512
description: The Zenodo URL of version 0.4.1 of the package
repository-code: 'https://github.com/damar-wicaksono/uqtestfuns'
url: 'https://uqtestfuns.readthedocs.io/en/latest/'
repository-artifact: 'https://pypi.org/project/uqtestfuns/'
abstract: >-
UQTestFuns is an open-source Python3 library of test
functions commonly used within the uncertainty
quantification (UQ) community. The package aims to provide
an implementation with minimal dependencies and a common interface
of many test functions available in the UQ literature,
a single entry point collecting test functions and their probabilistic
input specifications in a single Python package,
and an opportunity for an open-source contribution,
supporting the implementation of new test functions
or posting reference results.
keywords:
- uncertainty-quantification
- test-functions
- sensitivity-analysis
- metamodeling
- reliability-analysis
- surrogate-modeling
license: MIT
version: 0.4.1
date-released: '2023-10-27'
44 changes: 26 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# UQTestFuns
[![DOI](http://img.shields.io/badge/DOI-10.5281/zenodo.7701904-blue.svg?style=flat-square)](https://doi.org/10.5281/zenodo.7701904)
[![DOI](http://img.shields.io/badge/DOI-10.5281/zenodo.10047512-blue.svg?style=flat-square)](https://doi.org/10.5281/zenodo.10047512)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![Python 3.8](https://img.shields.io/badge/python-3.7-blue.svg?style=flat-square)](https://www.python.org/downloads/release/python-370/)
[![Python 3.7](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/)
[![PyPI](https://img.shields.io/pypi/v/uqtestfuns?style=flat-square)](https://pypi.org/project/uqtestfuns/)

| Branches | Status |
|:--------------------------------------------------------------------------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`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) |
| [`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/stable/?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 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:
within the applied uncertainty quantification (UQ) community.
Specifically, the package provides:

- a _lightweight implementation_ (with minimal dependencies) of
many test functions available in the UQ literature
- a _single entry point_ (combining models and their probabilistic input
specification) to a wide range of test functions
- an opportunity for an _open-source contribution_ where new test functions and
reference results are posted.
- an implementation _with minimal dependencies_ (i.e., NumPy and SciPy) and
_a common interface_ of many test functions available in the UQ literature
- a _single entry point_ collecting test functions _and_ their probabilistic
input specifications in a single Python package
- an _opportunity for an open-source contribution_, supporting
the implementation of new test functions or posting reference results.

In short, UQTestFuns is an homage
to the [Virtual Library of Simulation Experiments (VLSE)](https://www.sfu.ca/~ssurjano/).
Expand All @@ -32,13 +33,17 @@ To list the available functions:
```python-repl
>>> import uqtestfuns as uqtf
>>> uqtf.list_functions()
No. Constructor Spatial Dimension Application Description
----- ------------------ ------------------- -------------------------- ----------------------------------------------------------------------------
1 Ackley() M optimization, metamodeling Ackley function from Ackley (1987)
2 Borehole() 8 metamodeling, sensitivity Borehole function from Harper and Gupta (1983)
3 DampedOscillator() 8 metamodeling, sensitivity Damped oscillator model from Igusa and Der Kiureghian (1985)
4 Flood() 8 metamodeling, sensitivity Flood model from Iooss and Lemaître (2015)
5 Ishigami() 3 sensitivity Ishigami function from Ishigami and Homma (1991)
No. Constructor Dimension Application Description
----- ----------------------------- ----------- -------------------------------------- ----------------------------------------------------------------------------
1 Ackley() M optimization, metamodeling Optimization test function from Ackley (1987)
2 Alemazkoor2D() 2 metamodeling Two-dimensional high-degree polynomial from Alemazkoor & Meidani (2018)
3 Borehole() 8 metamodeling, sensitivity Borehole function from Harper and Gupta (1983)
4 Bratley1992a() M integration, sensitivity Integration test function #1 from Bratley et al. (1992)
5 Bratley1992b() M integration, sensitivity Integration test function #2 from Bratley et al. (1992)
6 Bratley1992c() M integration, sensitivity Integration test function #3 from Bratley et al. (1992)
7 Bratley1992d() M integration, sensitivity Integration test function #4 from Bratley et al. (1992)
8 CantileverBeam2D() 2 reliability Cantilever beam reliability problem from Rajashekhar and Ellington (1993)
9 CircularPipeCrack() 2 reliability Circular pipe under bending moment from Verma et al. (2015)
...
```

Expand Down Expand Up @@ -154,6 +159,9 @@ UQTestFuns is currently maintained by:

- Damar Wicaksono ([HZDR/CASUS](https://www.casus.science/))

under the Mathematical Foundations of Complex System Science Group
led by Michael Hecht ([HZDR/CASUS](https://www.casus.science/)) at CASUS.

## License

<!--License-->
Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ sphinx:
- 'sphinx.ext.autodoc'
- 'sphinx.ext.napoleon'
- 'sphinx.ext.intersphinx'
- 'sphinx_proof'
Loading

0 comments on commit 53b9837

Please sign in to comment.