diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2675766..50cc42c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,12 +3,15 @@ name: Build Documentation on: push: pull_request: + workflow_dispatch: + release: + types: [created] jobs: build_docs: - # pull requests are a duplicate of a branch push if they are from within - # the same repo. Skip these + # pull requests are a duplicate of a branch push if within the same repo. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest strategy: matrix: @@ -34,7 +37,7 @@ jobs: uses: supercharge/mongodb-github-action@1.6.0 - name: Start Sirepo Docker container - uses: NSLS-II/start-sirepo-action@v1 + uses: NSLS-II/start-sirepo-action@v2 with: docker-binary: docker @@ -54,13 +57,14 @@ jobs: mamba-version: "*" channels: conda-forge - - name: Install dependencies + - name: Install documentation-building requirements run: | # For reference: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html. set -vxeo pipefail conda env list - mamba install -c conda-forge shadow3 srwpy pandoc + # mamba install -c conda-forge shadow3 srwpy pandoc + mamba install -c conda-forge pandoc pip install --upgrade pip wheel pip install -v . pip install -r requirements-dev.txt @@ -76,7 +80,8 @@ jobs: path: docs/build/html/ - name: Deploy documentation to nsls-ii.github.io - if: github.repository_owner == 'NSLS-II' && github.ref_name == 'main' + # if: github.repository_owner == 'NSLS-II' && github.ref_name == 'main' + if: github.event_name == 'release' # We pin to the SHA, not the tag, for security reasons. # https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 8dd7a87..3ae6ebb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,11 +1,15 @@ name: pre-commit on: - pull_request: push: + pull_request: + workflow_dispatch: jobs: pre-commit: + # pull requests are a duplicate of a branch push if within the same repo. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 83ac879..f953f1e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -3,11 +3,15 @@ name: Unit Tests on: push: pull_request: + workflow_dispatch: # schedule: # - cron: '00 4 * * *' # daily at 4AM jobs: run_tests: + # pull requests are a duplicate of a branch push if within the same repo. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ${{ matrix.host-os }} strategy: matrix: @@ -32,7 +36,7 @@ jobs: uses: supercharge/mongodb-github-action@1.6.0 - name: Start Sirepo Docker container - uses: NSLS-II/start-sirepo-action@v1 + uses: NSLS-II/start-sirepo-action@v2 with: docker-binary: docker @@ -52,13 +56,13 @@ jobs: mamba-version: "*" channels: conda-forge - - name: Install dependencies + - name: Install the package and its dependencies run: | # For reference: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html. set -vxeo pipefail conda env list - mamba install -c conda-forge shadow3 srwpy + # mamba install -c conda-forge shadow3 srwpy pip install --upgrade pip wheel pip install -v . pip install -r requirements-dev.txt diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 0c10185..ba107a6 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -1,7 +1,40 @@ -============ +========================= +Installation instructions +========================= + Installation -============ +------------ + +The package works with Python 3.8+ and can be installed from both PyPI and conda-forge. + +To install the package using the ``pip`` package manager, run the following command: + +.. code:: bash + + $ python3 -m pip install bloptools + +To install the package using the ``conda`` package manager, run the following command: + +.. code:: bash + + $ conda install -c conda-forge bloptools + +If you'd like to use the Sirepo backend and ``sirepo-bluesky`` ophyd objects, please +follow the `Sirepo/Sirepo-Bluesky installation & configuration instructions +`_. + + +Run tests +--------- + +.. code:: bash + + $ pytest -vv -s -x --pdb + + +Build documentation +------------------- -At the command line:: +.. code:: bash - $ pip install bloptools + $ make -C docs/ html diff --git a/docs/source/release-history.rst b/docs/source/release-history.rst index a836474..277a678 100644 --- a/docs/source/release-history.rst +++ b/docs/source/release-history.rst @@ -2,12 +2,24 @@ Release History =============== +v0.4.0 (2023-08-11) +------------------- + +- Easier-to-use syntax when building the agent. +- Modular and stateful agent design for better usability. +- Added the ability to save/load both data and hyperparameters. +- Added passive degrees of freedom. +- Added a number of `test functions / artificial landscapes for optimization + `_. +- Updated the Sphinx documentation theme to `furo `_. + + v0.3.0 (2023-06-17) ------------------- -- Implemented multi-task optimization -- Simplified the syntax on initializing the agent -- Resolved issues discovered at ISS +- Implemented multi-task optimization. +- Simplified the syntax on initializing the agent. +- Resolved issues discovered at NSLS-II ISS. v0.2.0 (2023-04-25) diff --git a/docs/source/tutorials/latent-toroid-dimensions.ipynb b/docs/source/tutorials/latent-toroid-dimensions.ipynb index 5ad5fbe..7814d33 100644 --- a/docs/source/tutorials/latent-toroid-dimensions.ipynb +++ b/docs/source/tutorials/latent-toroid-dimensions.ipynb @@ -86,14 +86,6 @@ "agent.plot_feasibility()\n", "agent.plot_acquisition(strategy=[\"ei\", \"pi\", \"ucb\"])" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "efd5ab4f", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {