Skip to content

Commit

Permalink
Merge branch 'dev' into code_scanning_alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
djgroen authored Dec 4, 2024
2 parents 41d1a7f + 02e0076 commit a7f75c1
Show file tree
Hide file tree
Showing 44 changed files with 8,865 additions and 3,129 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ jobs:
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 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py develop
pip install pytest-benchmark
python -m pip install .[tests]
- name: Benchmark with pytest
run: |
pytest tests/test_db_benchmark.py --benchmark-json output.json
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 }}"
9 changes: 4 additions & 5 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:
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 -m pip install --editable .
python -m pip install flake8
python -m pip install --editable .[tests]
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
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
12 changes: 6 additions & 6 deletions .github/workflows/pdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ 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 setuptools
python -m pip install --editable .[docs]
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
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ jobs:
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 -m pip install --editable .
python -m pip install flake8
python -m pip install --editable .[tests]
cd tests/cannonsim/src; make; cd ../../..
pip install pytest-cov
pip install coveralls
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,22 @@ 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
pip install setuptools wheel twine
pip install build twine
- name: Build package
run: python -m build --sdist --wheel
- name: Check package
run: python -m twine check dist/*
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ pep.sh
*.csv
env/
.ipynb_checkpoints/
easyvvuq/_version.py
12 changes: 6 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ sphinx:
# - 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
python:
install:
- method: pip
path: .
extra_requirements:
- docs
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`
14 changes: 8 additions & 6 deletions easyvvuq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
from . import analysis
from . import comparison

# First make sure python version is 3.6+
assert sys.version_info >= (3, 6), (f"Python version must be >= 3.6,"
f"found {sys.version_info}")
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("easyvvuq")
except PackageNotFoundError:
from setuptools_scm import get_version # type: ignore[import]

__version__ = get_version(root="..", relative_to=__file__)

__copyright__ = """
Expand All @@ -36,6 +41,3 @@
"""
__license__ = "LGPL"

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

0 comments on commit a7f75c1

Please sign in to comment.