From 393990666949e19df6e13188622c5ba8c3379712 Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 09:57:28 -0600 Subject: [PATCH 1/7] release and Readme --- .github/workflows/_release.yml | 23 +++++++++++++++++++++++ .github/workflows/ci.yml | 17 ++++++----------- README.md | 10 +++++----- 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/_release.yml diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml new file mode 100644 index 0000000..9f376b2 --- /dev/null +++ b/.github/workflows/_release.yml @@ -0,0 +1,23 @@ +on: + workflow_call: + +jobs: + artifacts: + runs-on: ubuntu-latest + + steps: + - name: Download artifacts + uses: actions/download-artifact@v7 + with: + merge-multiple: true + + - name: Create GitHub Release + # We pin to the SHA, not the tag, for security reasons. + # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions + uses: softprops/action-gh-release@v2 + with: + prerelease: + ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') + || contains(github.ref_name, 'rc') }} + files: "*" + generate_release_notes: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ec36fd..43dcd37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,6 @@ jobs: runs-on: ${{ matrix.runs-on }} python-version: ${{ matrix.python-version }} - # docs: - # uses: ./.github/workflows/_docs.yml - # permissions: - # contents: write - dist: uses: ./.github/workflows/_dist.yml @@ -48,9 +43,9 @@ jobs: # codeql: # uses: ./.github/workflows/_codeql.yml - # release: - # needs: [dist, test, docs] - # if: github.ref_type == 'tag' - # uses: ./.github/workflows/_release.yml - # permissions: - # contents: write + release: + needs: [dist, test] + if: github.ref_type == 'tag' + uses: ./.github/workflows/_release.yml + permissions: + contents: write diff --git a/README.md b/README.md index ae1f4f1..3388ce5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CI](https://github.lightsource.ca/daq/kv-dict/actions/workflows/ci.yml/badge.svg)](https://github.lightsource.ca/daq/kv-dict/actions/workflows/ci.yml) +[![CI](https://github.com/Canadian-Light-Source/kv-dict/actions/workflows/ci.yml/badge.svg)](https://github.com/Canadian-Light-Source/kv-dict/actions/workflows/ci.yml) # kv-dict @@ -6,10 +6,10 @@ KV backed dictionary, similar to RedisJSONDict ## Install Package -- pip: `pip install git+https://github.lightsource.ca/daq/kv-dict` -- uv: `uv add git+https://github.lightsource.ca/daq/kv-dict` +- pip: `pip install kv-dict` +- uv: `uv add kv-dict` - add `--optional FEATURE` to add as an optional dependency -- pixi: `pixi add --git https://github.lightsource.ca/daq/kv-dict` +- pixi: `pixi add --pypi kv-dict` - add `--feature FEATURE` to add as an optional dependency ## Development @@ -19,7 +19,7 @@ instructions may be found [here](https://docs.astral.sh/uv/getting-started/installation/). ```bash -git clone https://github.lightsource.ca/daq/kv-dict.git +git clone https://github.com/Canadian-Light-Source/kv-dict.git cd kv-dict uv sync --all-extras ``` From a592c090eeb328a01c1dbbb957ce06944e4c120b Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:08:35 -0600 Subject: [PATCH 2/7] Update .github/workflows/_release.yml match upload version Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .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 9f376b2..5849bd1 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -7,7 +7,7 @@ jobs: steps: - name: Download artifacts - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v4 with: merge-multiple: true From 27d71b206e2090e4c3506d525e765bead87e6765 Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:10:01 -0600 Subject: [PATCH 3/7] Update .github/workflows/_release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/_release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 5849bd1..adf86a1 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -19,5 +19,7 @@ jobs: prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }} - files: "*" + files: | + *.whl + *.tar.gz generate_release_notes: true From 20edcd92839010256f09dff3c62bb39f72ae46af Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:17:45 -0600 Subject: [PATCH 4/7] Update README.md format changes for Note and Warning blocks to render correctly. --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3388ce5..6a53c64 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ Run a basic `RemoteKVMapping` flow backed by a Redis-compatible server: uv run python examples/remote_mapping_redis_example.py ``` -> [!NOTE] In the devcontainer compose setup, the Redis-compatible service +> [!NOTE] +> In the devcontainer compose setup, the Redis-compatible service > hostname is `redis`. ## Remote Mapping + PostgreSQL Backend Example @@ -51,7 +52,8 @@ Run a basic `RemoteKVMapping` flow backed by PostgreSQL: uv run python examples/remote_mapping_postgres_example.py ``` -> [!NOTE] In the devcontainer compose setup, PostgreSQL is available on the +> [!NOTE] +> In the devcontainer compose setup, PostgreSQL is available on the > internal hostname/port `postgres:5432`. ## Remote Mapping + NATS JetStream KV Backend Example @@ -62,10 +64,12 @@ Run a basic `RemoteKVMapping` flow backed by NATS JetStream KV: uv run python examples/remote_mapping_nats_example.py ``` -> [!IMPORTANT] This example uses `create_bucket=False` (production-style). +> [!IMPORTANT] +> This example uses `create_bucket=False` (production-style). > Ensure the `kv_dict` bucket already exists. -> [!NOTE] In the devcontainer compose setup, NATS is also available to host-side +> [!NOTE] +> In the devcontainer compose setup, NATS is also available to host-side > tools at `nats://127.0.0.1:14222`. Watch the changes in the NATS KV with the CLI client: @@ -124,7 +128,8 @@ replacement of the built-in `dict` behavior. ### Practical guidance -> [!WARNING] `RemoteKVMapping` is backend-backed, not purely in-memory. Avoid +> [!WARNING] +> `RemoteKVMapping` is backend-backed, not purely in-memory. Avoid > relying on insertion-order behavior and reassignment-free updates for mutable > non-list, non-dict nested values. From aedfbf4046b128eb30ac3e7fb3267ebed298413e Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:18:38 -0600 Subject: [PATCH 5/7] Update ci.yml re-add codeql --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43dcd37..6b454f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,8 @@ jobs: permissions: id-token: write - # codeql: - # uses: ./.github/workflows/_codeql.yml + codeql: + uses: ./.github/workflows/_codeql.yml release: needs: [dist, test] From e7a3322b5017f3f707c7cc04161b3460184bf52f Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:23:30 -0600 Subject: [PATCH 6/7] prose-wrap=preserve to keep proper formatting for GitHub --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4173e2b..c7f9362 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,7 +45,7 @@ repos: hooks: - id: prettier types_or: [yaml, markdown, html, css, scss, javascript, json] - args: [--prose-wrap=always] + args: [--prose-wrap=preserve] - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.15.2" From dd477b0f67100d85d0919049303480a5e96907b7 Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Thu, 26 Feb 2026 10:34:38 -0600 Subject: [PATCH 7/7] comments removed --- .github/workflows/_release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index adf86a1..9fcfd75 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -12,13 +12,8 @@ jobs: merge-multiple: true - name: Create GitHub Release - # We pin to the SHA, not the tag, for security reasons. - # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions uses: softprops/action-gh-release@v2 with: - prerelease: - ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') - || contains(github.ref_name, 'rc') }} files: | *.whl *.tar.gz