From 0a3b8bc547600167ff9938621d6dccce417ce3b1 Mon Sep 17 00:00:00 2001 From: Antonia Elsen Date: Wed, 26 Feb 2025 12:43:25 -0800 Subject: [PATCH 01/12] ci: add release and release-please workflows --- .github/workflows/main.yml | 22 +----- .github/workflows/release-please.yml | 18 +++++ .github/workflows/release.yml | 100 +++++++++++++++++++++++++++ release-please-config.json | 5 ++ 4 files changed, 124 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/release-please.yml create mode 100644 .github/workflows/release.yml create mode 100644 release-please-config.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4d25242..ce303f25 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,28 +34,8 @@ jobs: run: | pytest -v - test-examples: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.12" - - - name: Install dependencies + - name: Run examples run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - make - pip install -e . - synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 & sleep 5 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..8d3bf997 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,18 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.RELEASE_PLEASE_AT }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f7b0bc8c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,100 @@ +name: main + +on: + push: + tags: + - "v*" + +permissions: + id-token: write + +jobs: + sdist: + name: Build source distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + - uses: actions/setup-python@v5 + - name: Prep repo + run: | + pip install -r requirements.txt + make + - name: Build sdist + run: python -m build --sdist + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish-testpypi: + name: Publish to testpypi + needs: [sdist] + runs-on: ubuntu-latest + environment: + name: testpypi + url: https://test.pypi.org/legacy/ + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: sdist + path: dist + + - name: List files + run: ls -la dist/ + + - name: Publish package distributions to testpypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + verbose: true + + validate-test-pypi-release: + runs-on: ubuntu-latest + needs: publish-testpypi + steps: + - name: install test pypi release + run: | + # Get version from GitHub ref (removes 'refs/tags/v' prefix) + VERSION=${GITHUB_REF_NAME#v} + pip install --index-url https://test.pypi.org/simple/ science-synapse==$VERSION + + - name: validate + run: | + # Run Help + synapsectl --help + + # Run Simulator + synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 & + sleep 2 + + # Run Example + python synapse/examples/stream_out.py 127.0.0.1:50051 + + # Kill Simulator + kill $(jobs -p) + + publish-pypi: + name: Publish to pypi + needs: [validate-test-pypi-release] + runs-on: ubuntu-latest + if: false # Temporarily disabled + environment: + name: pypi + url: https://pypi.org/p/science-synapse/ + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: sdist + path: dist + + - name: Publish package distributions to pypi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000..38b2b1cb --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,5 @@ +{ + "packages": { ".": { "release-type": "python" } }, + "bootstrap-sha": "4d93567a0c5c6d48d2a7ce3a69e89fbf6395eb81", + "always-update": true +} From 5a918b2620dff3cef88a20e578fe61fb2c15b19f Mon Sep 17 00:00:00 2001 From: Antonia Elsen Date: Fri, 21 Mar 2025 11:56:56 -0700 Subject: [PATCH 02/12] chore: tag 1.0.1rc5 --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7b0bc8c..6a9fb068 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,7 +82,6 @@ jobs: name: Publish to pypi needs: [validate-test-pypi-release] runs-on: ubuntu-latest - if: false # Temporarily disabled environment: name: pypi url: https://pypi.org/p/science-synapse/ From 196866b3cc27137fe525676081cc12615136f641 Mon Sep 17 00:00:00 2001 From: Antonia Elsen Date: Fri, 21 Mar 2025 12:09:54 -0700 Subject: [PATCH 03/12] chore: fixup --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a9fb068..91c82804 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: run: | # Get version from GitHub ref (removes 'refs/tags/v' prefix) VERSION=${GITHUB_REF_NAME#v} - pip install --index-url https://test.pypi.org/simple/ science-synapse==$VERSION + pip install --extra-index-url https://test.pypi.org/simple/ science-synapse==$VERSION - name: validate run: | From a934c319874505a88f487dcbb6da1c0226e796d8 Mon Sep 17 00:00:00 2001 From: Antonia Elsen Date: Fri, 21 Mar 2025 12:13:19 -0700 Subject: [PATCH 04/12] chore: update release-please config, add wait for testpypi package --- .github/workflows/release.yml | 3 +++ .release-please-manifest.json | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .release-please-manifest.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91c82804..6a0a3275 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,9 @@ jobs: runs-on: ubuntu-latest needs: publish-testpypi steps: + - name: wait for package to be available + run: sleep 30 + - name: install test pypi release run: | # Get version from GitHub ref (removes 'refs/tags/v' prefix) diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000..8d7e5f13 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.1" +} From 38633c49b4caab5d418d03272849a25c1fc119e6 Mon Sep 17 00:00:00 2001 From: Antonia Elsen Date: Fri, 21 Mar 2025 12:13:52 -0700 Subject: [PATCH 05/12] chore: fixup --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a0a3275..b3fe0b03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,8 +75,7 @@ jobs: synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 & sleep 2 - # Run Example - python synapse/examples/stream_out.py 127.0.0.1:50051 + synapsectl info 127.0.0.1:50051 # Kill Simulator kill $(jobs -p) From b7ede8cb564cadd1e212a270e8f350e03986d09a Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:14:15 -0700 Subject: [PATCH 06/12] Update version to 2.2.2-test --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 16b4738e..31d7d56d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.1", + version="2.2.2-test", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", From e5e0bc3bef57095f8a9767101acc4f864dc4fc85 Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:16:00 -0700 Subject: [PATCH 07/12] chore: Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 31d7d56d..e369fc05 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.2-test", + version="2.2.2-test.1", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", From 0b89a415ae4dd68a89f8bd7542c518c5d826be1f Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:17:43 -0700 Subject: [PATCH 08/12] chore: Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e369fc05..f8600223 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.2-test.1", + version="2.2.3-test", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", From 68d9fe0b759a80dcb77d24d059f9801e1df3fc12 Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:19:34 -0700 Subject: [PATCH 09/12] chore: Bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f8600223..8c3a2de2 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.3-test", + version="2.2.3", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", From 09a7d49d4b82048545fc838a32f97f37ae974cf1 Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:23:33 -0700 Subject: [PATCH 10/12] Fix tests --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3fe0b03..133e2d14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,7 +75,7 @@ jobs: synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 & sleep 2 - synapsectl info 127.0.0.1:50051 + synapsectl -u 127.0.0.1:50051 info # Kill Simulator kill $(jobs -p) From 5079ae00022d549fb0a4419305af010dda4e571e Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:28:33 -0700 Subject: [PATCH 11/12] Fix tests --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8c3a2de2..1ce2fd5c 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.3", + version="2.2.3rc1", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz", From 861e587dd6827df6ade399ea37d2e7dc33bf4e2a Mon Sep 17 00:00:00 2001 From: Gilbert Montague Date: Thu, 15 May 2025 15:34:04 -0700 Subject: [PATCH 12/12] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1ce2fd5c..b6296d56 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( name="science-synapse", - version="2.2.3rc1", + version="2.2.4", description="Client library and CLI for the Synapse API", author="Science Team", author_email="team@science.xyz",