Skip to content

Commit

Permalink
Merge branch 'dev' into fix_ndarray_qois
Browse files Browse the repository at this point in the history
  • Loading branch information
djgroen authored Dec 4, 2024
2 parents 58a213f + d607845 commit 8b23495
Show file tree
Hide file tree
Showing 137 changed files with 21,757 additions and 1,362 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
10 changes: 5 additions & 5 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py develop
python setup.py build_cannonsim
python -m pip install --editable .
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
- name: Create coverage report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Copy Dockerfile
run: |
cp tutorials/kubernetes/Dockerfile .
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py develop
python setup.py build_cannonsim
python -m pip install --editable .
cd tests/cannonsim/src; make; cd ../../..
pip install pdoc
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v3
- name: Build
run: |
export PDOC_ALLOW_EXEC=1
pdoc -d numpy -o ./pdocs easyvvuq
- name: Publish generated content to GitHub Pages
uses: JamesIves/[email protected]
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py develop
python setup.py build_cannonsim
python -m pip install --editable .
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --benchmark-skip tests/
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ pep.sh
*.csv
env/
.ipynb_checkpoints/
fusion_pce.*/
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Available analysis and sampling methods:

* Polynomial Chaos Expansion
* Stochastic Collocation
* Dimension-adaptive Stochastic Collocation for high-dimensional inputs (incl notebook in `./tutorials` and [theoretical tutorial](https://www.researchgate.net/publication/359296270_Adaptive_sparse-grid_tutorial))
* Simplex Stochastic Collocation for irregular outputs (incl notebook in `./tutorials` and [article](https://doi.org/10.1016/J.JCP.2015.12.034))
* Monte Carlo Sensitivity Analysis
* Markov-Chain Monte Carlo

Expand Down Expand Up @@ -87,16 +89,11 @@ git clone https://github.com/UCL-CCS/EasyVVUQ.git

Note: As above, you need to be sure you are installing for Python 3 - if necessary replace `pip` with `pip3` and `python` with `python3` in the commands below.

We are trying to keep dependencies at a minimum but a few are inevitable, to install them use:
We are trying to keep dependencies at a minimum but a few are inevitable, to install these, install the EasyVVUQ library itself and build a test case use:
```
cd EasyVVUQ/
pip install --use-feature=2020-resolver -r requirements.txt
```

Then the library can be installed using:
```buildoutcfg
python setup.py install
bash install_EasyVVUQ.sh
```

## API
Expand Down
Empty file added dask-worker-space/global.lock
Empty file.
Empty file added dask-worker-space/purge.lock
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 13 additions & 7 deletions docs/source/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ central location where all information about your campaign is
kept. The `Campaign` handles all validation and is transfers
information between each stage of the workflow.

The `Basic Tutorial <https://github.com/UCL-CCS/EasyVVUQ/blob/dev/tutorials/basic_tutorial.ipynb>`_
The `Basic Tutorial <https://github.com/UCL-CCS/EasyVVUQ/blob/dev/tutorials/basic_tutorial.ipynb>`_ (link to repository) or `Basic Tutorial Binder <https://mybinder.org/v2/gh/UCL-CCS/EasyVVUQ/a6852d6c5ba36f15579e601d7a8d074505f31084?filepath=tutorials%2Fbasic_tutorial.ipynb>`_ (link to Binder to directly run the notebook)
gives a good hands-on introduction to defining parameters and
creating a campaign.


Elements
--------

Within VECMA software components that can be reused in a wide range of
application scenarios are known as ``Elements``.
Within EasyVVUQ we provide five classes of ``Elements`` (:ref:`samplers`,
:ref:`decoders`, :ref:`encoders`, and those providing :ref:`collation`,
for the aggregation step, and :ref:`analysis` functionality) which we
:ref:`decoders`, :ref:`encoders`, and :ref:`analysis` functionality) which we
describe below.

.. _samplers:
Expand All @@ -89,7 +89,7 @@ They deal with generic information in the sense that all parameters use the
nomenclature and units provided by the user rather than anything specific to
any application or workflow.

Detailed information on the Sampler modules is available `here <https://easyvvuq.readthedocs.io/en/dev/_autodoc/easyvvuq.sampling.html>`_.
Detailed information on the Sampler modules is available :doc:`here <_autodoc/easyvvuq.sampling>`.

.. _encoders:

Expand All @@ -107,7 +107,7 @@ generic Encoder base class is picked up and may be used.
This enables EasyVVUQ to be easily extended for new applications by
experienced users.

Detailed information on the Encoder modules is available `here <https://easyvvuq.readthedocs.io/en/dev/_autodoc/easyvvuq.encoders.html>`_.
Detailed information on the Encoder modules is available :doc:`here <_autodoc/easyvvuq.encoders>`.

.. _decoders:

Expand All @@ -121,7 +121,7 @@ facilitate analysis of a wide range of applications.

The `Encoder-Decoder tutorial <https://github.com/UCL-CCS/EasyVVUQ/blob/dev/tutorials/encoder_decoder_tutorial.ipynb>`_
provides a good introduction to using Encoders and Decoders within EasyVVUQ. Detailed information on the Decoder modules
themselves is available `here <https://easyvvuq.readthedocs.io/en/dev/_autodoc/easyvvuq.decoders.html>`_.
themselves is available :doc:`here <_autodoc/easyvvuq.decoders>`.

.. _analysis:

Expand All @@ -133,5 +133,11 @@ on the simulation output across a range of runs.
Different types of analysis (for example bootstrapping of multiple runs from
varied initial conditions) are, or will be, provided by EasyVVUQ.

Detailed information on the Analysis modules is available `here <https://easyvvuq.readthedocs.io/en/dev/_autodoc/easyvvuq.analysis.html>`_
Detailed information on the Analysis modules is available :doc:`here <_autodoc/easyvvuq.analysis>`.

.. _execution:

Execution
---------

Some more information on the use of QCG-Pilothob can be found :doc:`here <QCG-PilotJob-EasyVVUQ>`.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../easyvvuq'))
sys.path.insert(0, os.path.abspath('../..'))

from sphinx.ext.apidoc import main as apidoc_main
apidoc_main(["--force", "-o", "./_autodoc", "../../easyvvuq"])

autodoc_mock_imports = ['dill']
autodoc_mock_imports = ['dill', 'SALib', 'cerberus', 'chaospy', 'scipy', 'qcg', 'kubernetes', 'dask', 'sqlalchemy', 'numpoly', 'sklearn']

# -- Project information -----------------------------------------------------

Expand Down
3 changes: 3 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and uncertainty quantification (VVUQ) for a wide variety of simulations.
It was conceived and developed within the EU funded `VECMA <http://www.vecma.eu/>`_
(Verified Exascale Computing for Multiscale Applications) project.

A good introduction can be found in the paper by D. Suleimenova *et al.*, “Tutorial applications for Verification, Validation and Uncertainty Quantification using VECMA toolkit”, J. Comput. Sci. 53, 101402 (2021), `DOI:10.1016/j.jocs.2021.101402 <https://doi.org/10.1016/j.jocs.2021.101402>`_.

.. _goals:

Goals
Expand Down Expand Up @@ -57,3 +59,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :doc:`_autodoc/modules`
11 changes: 5 additions & 6 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EasyVVUQ installation
Installation
------------

.. note:: To use the library you will need Python 3.7+.
.. note:: To use the library you will need Python 3.8+.

Installation should be straight forward::

Expand All @@ -21,12 +21,11 @@ Github as follows::

git clone https://github.com/UCL-CCS/EasyVVUQ.git
cd EasyVVUQ
pip install -r requirements.txt
python setup.py install
bash install_EasyVVUQ.sh

.. note:: The above assumes that your default `python` is Python 3. If
that is not the case replace `python` with `python3` and `pip`
with `pip3`.
.. note:: The `install_EasyVVUQ.sh` script above assumes that your default `python`
is Python 3. If that is not the case replace `python` with `python3` and
`pip` with `pip3`.

Depending on your setup you may not have permission to install packages.
In that case, we recommend creating a virtual environment using
Expand Down
5 changes: 2 additions & 3 deletions easyvvuq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@
"""
__license__ = "LGPL"

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from . import _version
__version__ = _version.get_versions()['version']
Loading

0 comments on commit 8b23495

Please sign in to comment.