From 60faf7885af4447bd41915072b16fa60fddf54e5 Mon Sep 17 00:00:00 2001 From: Thomas Morris Date: Thu, 10 Aug 2023 23:37:20 -0400 Subject: [PATCH 1/8] release notes --- .github/workflows/docs.yml | 4 +++- docs/source/release-history.rst | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2675766..6d6e1dd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,6 +3,8 @@ name: Build Documentation on: push: pull_request: + release: + types: [created] jobs: build_docs: @@ -76,7 +78,7 @@ 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.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/docs/source/release-history.rst b/docs/source/release-history.rst index a836474..520d100 100644 --- a/docs/source/release-history.rst +++ b/docs/source/release-history.rst @@ -2,6 +2,15 @@ Release History =============== + +v0.4.0 (2023-08-08) +------------------- + +- Easier-to-use syntax when building the agent +- Modular and stateful agent design for better usability +- Ability to save/load both data and hyperparameters + + v0.3.0 (2023-06-17) ------------------- From 422cc18a971532058d0b16718f88d46f9622aaf5 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 10 Aug 2023 23:45:23 -0400 Subject: [PATCH 2/8] CI: update the docs building workflow to publish the docs on release --- .github/workflows/docs.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6d6e1dd..3c17c10 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,13 +3,13 @@ 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 they are from within the same repo. Skip these if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ubuntu-latest strategy: @@ -36,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 @@ -56,7 +56,7 @@ 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 @@ -78,6 +78,7 @@ 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.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 From de0b70a6afb5475f37b2c6bf30cecea8d787fc9a Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 10 Aug 2023 23:47:49 -0400 Subject: [PATCH 3/8] DOC: update the installation section in the docs --- docs/source/installation.rst | 41 ++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 0c10185..4e25fcc 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 installation instructions at +`https://nsls-ii.github.io/sirepo-bluesky/installation.html `_. + + +Run tests +--------- + +.. code:: bash + + $ pytest -vv -s -x --pdb + + +Build documentation +------------------- -At the command line:: +.. code:: bash - $ pip install bloptools + $ make -C docs/ html From a900191f5da6d3a075a45ac383968e21208104d3 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 10 Aug 2023 23:49:32 -0400 Subject: [PATCH 4/8] DOC: release notes for v0.4.0 --- docs/source/release-history.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/source/release-history.rst b/docs/source/release-history.rst index 520d100..1d38369 100644 --- a/docs/source/release-history.rst +++ b/docs/source/release-history.rst @@ -2,21 +2,24 @@ Release History =============== - -v0.4.0 (2023-08-08) +v0.4.0 (2023-08-10) ------------------- -- Easier-to-use syntax when building the agent -- Modular and stateful agent design for better usability -- Ability to save/load both data and hyperparameters +- 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) From 548016afbdf79084a710e9b6602ebcc95733fe0d Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Thu, 10 Aug 2023 23:48:52 -0400 Subject: [PATCH 5/8] DOC: clean up the last empty cell in `latent-toroid-dimensions.ipynb` --- docs/source/tutorials/latent-toroid-dimensions.ipynb | 8 -------- 1 file changed, 8 deletions(-) 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": { From b5d485da5ee6ff19cb28999d137d08fffd671352 Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Fri, 11 Aug 2023 00:18:29 -0400 Subject: [PATCH 6/8] CI: update the workflows to only run once on PRs from the same repo --- .github/workflows/docs.yml | 6 ++++-- .github/workflows/pre-commit.yml | 6 +++++- .github/workflows/testing.yml | 10 +++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3c17c10..50cc42c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,8 +9,9 @@ on: 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: @@ -62,7 +63,8 @@ jobs: 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 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 From 259bf53d1edfb7e37eb9691719885049d221717e Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Fri, 11 Aug 2023 00:18:48 -0400 Subject: [PATCH 7/8] DOC: bump release date --- docs/source/release-history.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/release-history.rst b/docs/source/release-history.rst index 1d38369..277a678 100644 --- a/docs/source/release-history.rst +++ b/docs/source/release-history.rst @@ -2,7 +2,7 @@ Release History =============== -v0.4.0 (2023-08-10) +v0.4.0 (2023-08-11) ------------------- - Easier-to-use syntax when building the agent. From eebe0c4d6aab79fa388a2ed9288d1073f7cf15ea Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Fri, 11 Aug 2023 00:49:00 -0400 Subject: [PATCH 8/8] DOC: syntax and update the link to sirepo-bluesky docs --- docs/source/installation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 4e25fcc..ba107a6 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -7,21 +7,21 @@ 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:: +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:: +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 installation instructions at -`https://nsls-ii.github.io/sirepo-bluesky/installation.html `_. +follow the `Sirepo/Sirepo-Bluesky installation & configuration instructions +`_. Run tests