Skip to content

Commit

Permalink
Merge branch 'develop' into refactor/pathlib
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Apr 26, 2023
2 parents c1aaeb9 + 19349da commit 6299d23
Show file tree
Hide file tree
Showing 22 changed files with 50 additions and 181 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
include:
- os: macos-latest
python-version: 3.9
mpi-version: "mpich"
mpi-version: "mpich=4.0.3"
comms-type: m
- os: macos-latest
python-version: 3.9
mpi-version: "mpich"
mpi-version: "mpich=4.0.3"
comms-type: l
- os: ubuntu-latest
python-version: "3.10"
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ formats:
- pdf

python:
version: 3.7
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ increased parallelism.
libEnsemble aims for:

• **Extreme scaling**: Run on or across_ laptops, clusters, and leadership-class machines.
• **Dynamic Ensembles**: Generate new tasks on-the-fly based on previous computations.
• **Dynamic Resource Management**: Reassign resource partitions of any size for tasks.
• **Dynamic ensembles**: Generate new tasks on-the-fly based on previous computations.
• **Dynamic resource management**: Reassign resource partitions of any size for tasks.
• **Monitoring/killing of applications**: Ensemble members can poll or kill running apps.
• **Resilience/fault tolerance**: libEnsemble can restart incomplete tasks or entire ensembles.
• **Portability and flexibility**: Run identical libEnsemble scripts on different machines.
Expand Down
35 changes: 0 additions & 35 deletions docs/_static/my_theme.css

This file was deleted.

14 changes: 0 additions & 14 deletions docs/_templates/page.html

This file was deleted.

13 changes: 4 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,11 @@
import os
import sys
from datetime import datetime
from unittest.mock import MagicMock

exec(open("../libensemble/version.py").read())


if sys.version_info >= (3, 3):
from unittest.mock import MagicMock
else:
from mock import MagicMock


class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
Expand Down Expand Up @@ -87,8 +82,7 @@ def __getattr__(cls, name):

# If your documentation needs a minimal Sphinx version, state it here.
#
needs_sphinx = "3.3"
nitpicky = True
needs_sphinx = "5.3"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -102,6 +96,7 @@ def __getattr__(cls, name):
"sphinx.ext.imgconverter",
"sphinx.ext.mathjax",
"sphinxcontrib.autodoc_pydantic",
"sphinx_design",
]
bibtex_bibfiles = ["references.bib"]
bibtex_default_style = "unsrt"
Expand Down Expand Up @@ -210,7 +205,7 @@ def __getattr__(cls, name):
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]
# html_static_path = []


Expand Down
24 changes: 3 additions & 21 deletions docs/examples/alloc_funcs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ give_sim_work_first
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`give_sim_work_first.py`
.. dropdown:: :underline:`give_sim_work_first.py`

.. literalinclude:: ../../libensemble/alloc_funcs/give_sim_work_first.py
:language: python
Expand All @@ -38,22 +34,12 @@ fast_alloc
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`fast_alloc.py`
.. dropdown:: :underline:`fast_alloc.py`

.. literalinclude:: ../../libensemble/alloc_funcs/fast_alloc.py
:language: python
:linenos:

fast_alloc_to_aposmm
--------------------
.. automodule:: fast_alloc_to_aposmm
:members:
:undoc-members:

.. _start_only_persistent_label:

start_only_persistent
Expand All @@ -62,11 +48,7 @@ start_only_persistent
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`start_only_persistent.py`
.. dropdown:: :underline:`start_only_persistent.py`

.. literalinclude:: ../../libensemble/alloc_funcs/start_only_persistent.py
:language: python
Expand Down
12 changes: 2 additions & 10 deletions docs/examples/sampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ sampling
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`sampling.py`
.. dropdown:: :underline:`sampling.py`

.. literalinclude:: ../../libensemble/gen_funcs/sampling.py
:language: python
Expand All @@ -24,11 +20,7 @@ persistent_sampling
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`persistent_sampling.py`
.. dropdown:: :underline:`persistent_sampling.py`

.. literalinclude:: ../../libensemble/gen_funcs/persistent_sampling.py
:language: python
Expand Down
18 changes: 3 additions & 15 deletions docs/examples/sim_funcs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ six_hump_camel
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`six_hump_camel.py`
.. dropdown:: :underline:`six_hump_camel.py`

.. literalinclude:: ../../libensemble/sim_funcs/six_hump_camel.py
:language: python
Expand All @@ -41,11 +37,7 @@ noisy_vector_mapping
:members:
:undoc-members:

.. container:: toggle

.. container:: header

:underline:`noisy_vector_mapping.py`
.. dropdown:: :underline:`noisy_vector_mapping.py`

.. literalinclude:: ../../libensemble/sim_funcs/noisy_vector_mapping.py
:language: python
Expand All @@ -68,11 +60,7 @@ executor_hworld
.. automodule:: executor_hworld
:members:

.. container:: toggle

.. container:: header

:underline:`executor_hworld.py`
.. dropdown:: :underline:`executor_hworld.py`

.. literalinclude:: ../../libensemble/sim_funcs/executor_hworld.py
:language: python
Expand Down
6 changes: 1 addition & 5 deletions docs/examples/tasmanian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ use either *venv* or *--user* install.
.. role:: underline
:class: underline

.. container:: toggle

.. container:: header

:underline:`persistent_tasmanian.py`
.. dropdown:: :underline:`persistent_tasmanian.py`

.. literalinclude:: ../../libensemble/gen_funcs/persistent_tasmanian.py
:language: python
Expand Down
6 changes: 1 addition & 5 deletions docs/platforms/polaris.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ To install further packages, including updating libEnsemble, you may either crea
a virtual environment on top of this (if just using ``pip install``) or clone the base
environment (if you need ``conda install``). More details at `Python for Polaris`_.

.. container:: toggle

.. container:: header

Example of Conda + virtual environment
.. dropdown:: Example of Conda + virtual environmentggle

E.g.,~ to create a virtual environment that allows installation of further packages::

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sphinx==5.3.0
sphinxcontrib-bibtex
ipykernel
autodoc_pydantic
sphinx-design
14 changes: 4 additions & 10 deletions docs/running_libE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,8 @@ a calling script in a familiar manner::

This produces an initial ``my_calling_script.json`` serialization conforming to PSI/J's specification:

.. container:: toggle

.. container:: header

``my_calling_script.json``
.. dropdown:: `my_calling_script.json``
:color: success

.. code-block:: JSON
Expand Down Expand Up @@ -209,11 +206,8 @@ Results in::

This also produces a Job-specific representation, e.g:

.. container:: toggle

.. container:: header

``8ba9de56.my_calling_script.json``
.. dropdown:: ``8ba9de56.my_calling_script.json``
:color: success

.. code-block:: JSON
Expand Down
12 changes: 2 additions & 10 deletions docs/tutorials/executor_forces_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ Write an alternative Calling Script similar to above, but with the following dif
3. Set :ref:`libEnsemble's logger<logger_config>` to print debug messages.
4. Use the :meth:`save_libE_output()<tools.save_libE_output>` function to save the History array and ``persis_info`` to files after libEnsemble completes.

.. container:: toggle

.. container:: header

**Click Here for Solution**
.. dropdown:: **Click Here for Solution**

.. code-block:: python
:linenos:
Expand Down Expand Up @@ -357,11 +353,7 @@ These may require additional browsing of the documentation to complete.
then reads the output ``.stat`` file, and calls :meth:`task.kill()<executor.Task.kill>` if the output file contains ``"kill\n"``
or if ``task.runtime`` exceeds sixty seconds.

.. container:: toggle

.. container:: header

**Click Here for Solution**
.. dropdown:: **Click Here for Solution**

.. code-block:: python
:linenos:
Expand Down
18 changes: 3 additions & 15 deletions docs/tutorials/local_sine_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ Exercise
Write a simple generator function that instead produces random integers, using
the ``numpy.random.Generator.integers(low, high, size)`` function.

.. container:: toggle

.. container:: header

**Click Here for Solution**
.. dropdown:: **Click Here for Solution**

.. code-block:: python
:linenos:
Expand Down Expand Up @@ -185,11 +181,7 @@ Exercise
Write a simple simulator function that instead calculates the *cosine* of a received
value, using the ``numpy.cos(x)`` function.

.. container:: toggle

.. container:: header

**Click Here for Solution**
.. dropdown:: **Click Here for Solution**

.. code-block:: python
:linenos:
Expand Down Expand Up @@ -353,11 +345,7 @@ Write a Calling Script with the following specifications:
4. Set libEnsemble to stop execution after 160 *generations* using the ``gen_max`` key
5. Print an error message if any errors occurred while libEnsemble was running

.. container:: toggle

.. container:: header

**Click Here for Solution**
.. dropdown:: **Click Here for Solution**

.. code-block:: python
:linenos:
Expand Down
2 changes: 1 addition & 1 deletion install/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:

dependencies:
- sphinxcontrib-bibtex
- python>=3.7
- python>=3.8
1 change: 1 addition & 0 deletions install/testing_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pytest-timeout==2.1.0
mock==4.0.3
coveralls==3.3.1
python-dateutil==2.8.2
anyio==3.6.2

0 comments on commit 6299d23

Please sign in to comment.