Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'
- uses: pre-commit/action@v3.0.1

test-core:
Expand All @@ -22,10 +22,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.12"]
include:
- os: macos-latest
python-version: "3.13"
python-version: "3.12"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -57,10 +57,10 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'

- name: Install package
run: |
Expand Down Expand Up @@ -101,17 +101,17 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'

- name: Build wheel and sdist
run: uv build

- name: Install wheel in a clean venv
run: |
uv venv /tmp/uxarray-mcp-wheel --python 3.13
uv venv /tmp/uxarray-mcp-wheel --python 3.12
uv pip install --python /tmp/uxarray-mcp-wheel/bin/python dist/uxarray_mcp-*.whl
/tmp/uxarray-mcp-wheel/bin/uxarray-mcp --help

Expand All @@ -121,7 +121,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
python-version: ["3.13"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -151,10 +151,10 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.12'

- name: Install docs dependencies
run: |
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.12"

- name: Build distributions
run: uv build
Expand All @@ -38,7 +38,7 @@ jobs:

- name: Install wheel in a clean venv
run: |
uv venv /tmp/uxarray-mcp-wheel --python 3.13
uv venv /tmp/uxarray-mcp-wheel --python 3.12
uv pip install --python /tmp/uxarray-mcp-wheel/bin/python dist/uxarray_mcp-*.whl
/tmp/uxarray-mcp-wheel/bin/uxarray-mcp --help

Expand Down Expand Up @@ -75,18 +75,18 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.12"

- name: Install released wheel from PyPI
env:
REF_NAME: ${{ inputs.tag || github.ref_name }}
run: |
version="${REF_NAME#v}"
echo "Verifying uxarray-mcp==${version} from PyPI"
uv venv /tmp/uxarray-mcp-pypi --python 3.13
uv venv /tmp/uxarray-mcp-pypi --python 3.12
installed=0
for attempt in 1 2 3 4 5; do
if uv pip install --python /tmp/uxarray-mcp-pypi/bin/python \
Expand Down Expand Up @@ -125,11 +125,11 @@ jobs:
if: env.CONDA_FEEDSTOCK_REPOSITORY != '' && env.CONDA_FEEDSTOCK_TOKEN != ''
uses: astral-sh/setup-uv@v5

- name: Set up Python 3.13
- name: Set up Python 3.12
if: env.CONDA_FEEDSTOCK_REPOSITORY != '' && env.CONDA_FEEDSTOCK_TOKEN != ''
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.12"

- name: Build source distribution for hash
if: env.CONDA_FEEDSTOCK_REPOSITORY != '' && env.CONDA_FEEDSTOCK_TOKEN != ''
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.12
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,21 @@ Pick one. `uv` is the easiest; `pip` works too.

```bash
# Recommended
uv tool install uxarray-mcp
uv tool install --python 3.12 uxarray-mcp

# Or from a fresh clone (developer path)
git clone https://github.com/UXARRAY/uxarray-mcp-server.git
cd uxarray-mcp-server && uv sync
cd uxarray-mcp-server && uv sync --python 3.12
```

> **Why `--python 3.12`?** The server uses Globus Compute to submit work to
> HPC endpoints, and Globus Compute's serializer is fragile across Python
> minor versions — a 3.13 submitter against a 3.12 endpoint worker raises
> `WorkerLost` on non-trivial payloads. HPC sites broadly ship 3.12 conda
> stacks today, so we pin the install to match. Tracking removal of this pin
> at [globus/globus-compute#2139](https://github.com/globus/globus-compute/issues/2139).
> `uv` downloads 3.12 automatically if your system doesn't have it.

### Step 2 — Write a starter config

```bash
Expand Down
13 changes: 7 additions & 6 deletions docs/operating-an-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ globus-compute-endpoint configure uxarray
> versions (3.12 ↔ 3.13). The packaged MCP tools route through
> `AllCodeStrategies` and survive minor differences for simple payloads, but
> raw `Executor.submit()` calls and any user code dropping down to the SDK
> directly will hit pickle protocol errors and `WorkerLost`. The simplest
> rule: pick a Python on the worker (3.12 is broadly available across HPC
> sites today) and match it on the submitter side with
> `uv tool install --python 3.12 uxarray-mcp`. `uxarray-mcp doctor` will
> surface a warning at probe time when versions differ.
> directly will hit pickle protocol errors and `WorkerLost`. **uxarray-mcp
> pins to Python 3.12 today** ([globus/globus-compute#2139](https://github.com/globus/globus-compute/issues/2139)
> tracks the upstream fix that will let us broaden this). Stand up your
> endpoint on 3.12 and your submitter install will already match;
> `uxarray-mcp doctor` will surface a warning at probe time if anything is
> off.

Edit `~/.globus_compute/uxarray/config.yaml` and set the scheduler block.
Minimum diff from the generated template (PBS example shown — see Step 3
Expand Down Expand Up @@ -214,7 +215,7 @@ home is small):
# Use the site's recommended conda or module first
module load conda # or whatever your site provides

conda create -n gce python=3.11 -c conda-forge -y
conda create -n gce python=3.12 -c conda-forge -y
conda activate gce
pip install globus-compute-endpoint
```
Expand Down
10 changes: 9 additions & 1 deletion docs/remote-hpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,17 @@ If not:
## Step 2 — Install the HPC extras locally (1 min)

```bash
uv tool install "uxarray-mcp[hpc]" # or `uv tool upgrade --extra hpc uxarray-mcp`
uv tool install --python 3.12 "uxarray-mcp[hpc]"
# or to upgrade an existing install:
# uv tool upgrade --python 3.12 --extra hpc uxarray-mcp
```

The `--python 3.12` flag matters: most HPC endpoints today (chrysalis,
Casper, Improv) run Python 3.12 conda stacks, and Globus Compute's serializer
is fragile across Python minor versions. Mismatch raises `WorkerLost` on
non-trivial payloads. Tracked upstream at
[globus/globus-compute#2139](https://github.com/globus/globus-compute/issues/2139).

This adds the `globus-compute-sdk` to your local install. Verify:

```bash
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: Apache Software License",
]
authors = [
{ name = "Rajeev Jain", email = "rajeeja@gmail.com" },
{ name = "Dayan Abdulla", email = "dayanabdulla000@gmail.com" },
]
license = { file = "LICENSE" }
requires-python = ">=3.11"
# Pinned to 3.12 until globus/globus-compute#2139 lands a published submitter ↔
# worker compatibility story. HPC sites broadly ship Python 3.12 conda stacks
# today; matching that minor version on the submitter side avoids WorkerLost
# from pickle protocol skew. Revisit when upstream confirms multi-version
# support and broaden requires-python back to >=3.11.
requires-python = ">=3.12,<3.13"
dependencies = [
"fastmcp>=3.4.0",
"holoviews>=1.19.0",
Expand Down
Loading
Loading