You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hamilton.apache.org by sk...@apache.org on 2026/05/18 03:57:04 UTC
(hamilton) branch stefan/release-sub-packages-prep created (now a1d47de7)
This is an automated email from the ASF dual-hosted git repository.
skrawcz pushed a change to branch stefan/release-sub-packages-prep
in repository https://gitbox.apache.org/repos/asf/hamilton.git
at a1d47de7 Add redirect packages, fix tests, and prep for sub-package release
This branch includes the following new commits:
new a1d47de7 Add redirect packages, fix tests, and prep for sub-package release
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(hamilton) 01/01: Add redirect packages, fix tests, and prep for sub-package release
Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
skrawcz pushed a commit to branch stefan/release-sub-packages-prep
in repository https://gitbox.apache.org/repos/asf/hamilton.git
commit a1d47de71e3121ca6ae1db2812378262d29d64c2
Author: Stefan Krawczyk <st...@cs.stanford.edu>
AuthorDate: Sun May 17 20:48:28 2026 -0700
Add redirect packages, fix tests, and prep for sub-package release
- Add sf-hamilton-{sdk,ui,lsp,contrib}-redirect packages
- Fix LSP: pygls>=2.0 compat (remove deprecated loop kwarg)
- Fix UI: remove broken hamilton-ui entrypoint (use hamilton ui CLI)
- Fix UI: settings_mini STATICFILES_DIRS to build/assets/ (Vite)
- Fix UI: ProjectOut.role type annotation for pydantic 2.x
- Fix SDK test: update polars stats expected values for polars 1.34+
- Fix UI test: relax build directory string check
- Add scripts/verify-sub-packages.md for release validation
---
dev_tools/language_server/hamilton_lsp/server.py | 4 +-
dev_tools/language_server/pyproject.toml | 2 +-
scripts/verify-sub-packages.md | 315 +++++++++++++++++++++
sf-hamilton-contrib-redirect/README.md | 38 +++
sf-hamilton-contrib-redirect/build.sh | 55 ++++
.../pyproject.toml.template | 33 +++
sf-hamilton-lsp-redirect/README.md | 44 +++
sf-hamilton-lsp-redirect/build.sh | 55 ++++
sf-hamilton-lsp-redirect/pyproject.toml.template | 33 +++
sf-hamilton-sdk-redirect/README.md | 44 +++
sf-hamilton-sdk-redirect/build.sh | 55 ++++
sf-hamilton-sdk-redirect/pyproject.toml.template | 33 +++
sf-hamilton-ui-redirect/README.md | 44 +++
sf-hamilton-ui-redirect/build.sh | 55 ++++
sf-hamilton-ui-redirect/pyproject.toml.template | 33 +++
ui/backend/pyproject.toml | 5 -
ui/backend/server/server/settings_mini.py | 2 +-
.../server/trackingserver_projects/schema.py | 2 +-
ui/backend/tests/test_build.py | 6 +-
ui/sdk/tests/tracking/test_polars_stats.py | 16 +-
20 files changed, 847 insertions(+), 27 deletions(-)
diff --git a/dev_tools/language_server/hamilton_lsp/server.py b/dev_tools/language_server/hamilton_lsp/server.py
index 042c4708..c145fdc3 100644
--- a/dev_tools/language_server/hamilton_lsp/server.py
+++ b/dev_tools/language_server/hamilton_lsp/server.py
@@ -91,8 +91,8 @@ class HamiltonLanguageServer(LanguageServer):
CMD_VIEW_REQUEST = "lsp-view-request"
CMD_VIEW_RESPONSE = "lsp-view-response"
- def __init__(self, server: str = "HamiltonServer", version: str = __version__, loop=None):
- super().__init__(server, version, loop=loop, max_workers=2)
+ def __init__(self, server: str = "HamiltonServer", version: str = __version__):
+ super().__init__(server, version)
self.active_uri: str = ""
self.active_version: str = ""
diff --git a/dev_tools/language_server/pyproject.toml b/dev_tools/language_server/pyproject.toml
index 14820afd..15bf3146 100644
--- a/dev_tools/language_server/pyproject.toml
+++ b/dev_tools/language_server/pyproject.toml
@@ -53,7 +53,7 @@ classifiers = [
"Programming Language :: Python :: 3.14",
]
dependencies = [
- "pygls>=1.3.1",
+ "pygls>=2.0",
"apache-hamilton[visualization]>=1.56",
]
diff --git a/scripts/verify-sub-packages.md b/scripts/verify-sub-packages.md
new file mode 100644
index 00000000..40e4f16f
--- /dev/null
+++ b/scripts/verify-sub-packages.md
@@ -0,0 +1,315 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Verifying Sub-Package Releases
+
+This guide covers how to validate the `apache-hamilton-sdk`, `apache-hamilton-ui`,
+`apache-hamilton-lsp`, and `apache-hamilton-contrib` packages before voting on a release.
+
+For the core `apache-hamilton` package verification, see `scripts/verification-script.sh`.
+
+## Quick Start
+
+```bash
+# Set the versions being released
+export SDK_VERSION=0.9.0
+export UI_VERSION=0.0.18
+export LSP_VERSION=0.2.0
+export CONTRIB_VERSION=0.0.9
+```
+
+## apache-hamilton-sdk
+
+### Install and verify version
+
+```bash
+python -m venv /tmp/verify-sdk && source /tmp/verify-sdk/bin/activate
+pip install apache-hamilton apache-hamilton-sdk==${SDK_VERSION}
+
+python -c "import hamilton_sdk; print(hamilton_sdk.__version__)"
+# Expected: (0, 9, 0)
+```
+
+### Run unit tests (from source)
+
+```bash
+cd ui/sdk
+pip install -r requirements.txt -r requirements-test.txt
+pip install -e .
+pytest tests/ -q \
+ --ignore=tests/tracking/test_ibis_stats.py \
+ --ignore=tests/tracking/test_langchain_stats.py
+```
+
+### Acceptance test: SDK tracks a run to UI server
+
+Prerequisite: UI server running with a project created (see apache-hamilton-ui
+section below — run the "UI accepts data from SDK" test which creates a project
+and executes the full flow).
+
+```bash
+cd examples/hamilton_ui
+pip install -r requirements.txt
+python run.py --username voter --project-id 1
+```
+
+This exercises the full SDK → UI pipeline: DAG template registration,
+node-level tracking, attribute collection, and run completion.
+
+### Example to run
+
+See `examples/hamilton_ui/` — the same example above.
+
+---
+
+## apache-hamilton-ui
+
+### Install and verify
+
+```bash
+python -m venv /tmp/verify-ui && source /tmp/verify-ui/bin/activate
+pip install apache-hamilton-ui==${UI_VERSION}
+```
+
+### Start server in mini mode (SQLite, no PostgreSQL needed)
+
+```bash
+export HAMILTON_BASE_DIR=/tmp/verify-hamilton-ui
+mkdir -p $HAMILTON_BASE_DIR/blobs $HAMILTON_BASE_DIR/db
+
+# Run migrations
+hamilton ui --settings-file mini --no-open --port 8241 &
+# Or equivalently from the CLI:
+# python -m hamilton.cli ui --settings-file mini --no-open --port 8241
+
+sleep 5
+```
+
+### Health check
+
+```bash
+python -c "import urllib.request; print(urllib.request.urlopen('http://localhost:8241/api/ping').read())"
+# Expected: b'ok'
+```
+
+### Run build verification tests (from source)
+
+```bash
+cd ui/backend
+pytest tests/test_build.py -v
+```
+
+### Acceptance test: UI serves frontend
+
+```bash
+python -c "
+import urllib.request
+resp = urllib.request.urlopen('http://localhost:8241/')
+html = resp.read().decode()
+assert '<html' in html.lower(), 'Expected HTML response'
+print('UI frontend served successfully')
+"
+```
+
+### Acceptance test: UI accepts data from SDK
+
+This is the key integration test — verifies the UI server can receive and
+store DAG tracking data sent by the SDK.
+
+```bash
+# Install SDK in the same venv
+pip install apache-hamilton apache-hamilton-sdk==${SDK_VERSION} pandas
+
+# Step 1: Open the UI in your browser and create a project.
+# The `hamilton ui` command opens http://localhost:8242 automatically.
+# Create a project and note its ID (shown in the URL, e.g. /dashboard/project/1).
+
+# Step 2: Run the hamilton_ui example against the server
+cd examples/hamilton_ui
+pip install -r requirements.txt
+python run.py --username <your_username> --project-id <project_id>
+# Expected: "Captured execution run. Results can be found at ..."
+
+# Step 3: Verify in the UI
+# Navigate to http://localhost:8242/dashboard/project/<id>/runs
+# You should see the DAG run with node-level details, attributes, etc.
+```
+
+This exercises the full SDK → UI pipeline: DAG template registration,
+node-level tracking, attribute collection, and run completion.
+
+---
+
+## apache-hamilton-lsp
+
+### Install and verify version
+
+```bash
+python -m venv /tmp/verify-lsp && source /tmp/verify-lsp/bin/activate
+pip install "apache-hamilton[visualization]" apache-hamilton-lsp==${LSP_VERSION}
+
+python -c "from hamilton_lsp import __version__; print(__version__)"
+# Expected: 0.2.0
+```
+
+### Run unit tests (from source)
+
+```bash
+cd dev_tools/language_server
+pip install -e . pytest
+pytest tests/ -v
+```
+
+### Acceptance test: LSP responds to initialize request
+
+The LSP communicates over stdin/stdout using JSON-RPC. Send an initialize
+request and verify it responds with server capabilities:
+
+```bash
+python -c "
+import subprocess, json
+
+# The LSP reads from stdin and writes to stdout
+proc = subprocess.Popen(
+ ['hamilton-lsp'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+)
+
+# Send LSP initialize request with Content-Length header
+request = json.dumps({
+ 'jsonrpc': '2.0',
+ 'id': 1,
+ 'method': 'initialize',
+ 'params': {'capabilities': {}}
+})
+message = f'Content-Length: {len(request)}\r\n\r\n{request}'
+proc.stdin.write(message.encode())
+proc.stdin.flush()
+
+# Read response (with timeout)
+import time
+time.sleep(2)
+proc.kill()
+output = proc.stdout.read().decode()
+assert 'capabilities' in output or 'result' in output, f'Unexpected: {output[:200]}'
+print('LSP responded to initialize request')
+"
+```
+
+---
+
+## apache-hamilton-contrib
+
+### Install and verify version
+
+```bash
+python -m venv /tmp/verify-contrib && source /tmp/verify-contrib/bin/activate
+pip install apache-hamilton apache-hamilton-contrib==${CONTRIB_VERSION}
+
+python -c "import importlib.metadata; print(importlib.metadata.version('apache-hamilton-contrib'))"
+# Expected: 0.0.9
+```
+
+### Verify dataflow imports work
+
+```bash
+python -c "
+from hamilton.contrib.user.zilto import xgboost_optuna
+from hamilton import driver
+import inspect
+
+# Verify module has Hamilton functions
+funcs = [n for n, f in inspect.getmembers(xgboost_optuna, inspect.isfunction)
+ if not n.startswith('_')]
+print(f'xgboost_optuna has {len(funcs)} functions')
+assert len(funcs) > 0
+print('Contrib dataflow import: OK')
+"
+```
+
+### Example to run
+
+```bash
+cd examples/contrib
+pip install -r requirements.txt
+python run.py
+```
+
+This runs the `xgboost_optuna` contrib dataflow end-to-end (trains a model,
+tunes hyperparameters, saves results).
+
+---
+
+## All packages together
+
+Verify all 4 sub-packages install alongside core hamilton without conflicts:
+
+```bash
+python -m venv /tmp/verify-all && source /tmp/verify-all/bin/activate
+pip install apache-hamilton==${HAMILTON_VERSION} \
+ apache-hamilton-sdk==${SDK_VERSION} \
+ apache-hamilton-ui==${UI_VERSION} \
+ apache-hamilton-lsp==${LSP_VERSION} \
+ apache-hamilton-contrib==${CONTRIB_VERSION}
+
+python -c "
+import hamilton
+import hamilton_sdk
+import hamilton_ui
+import hamilton_lsp
+import importlib.metadata
+
+print(f'hamilton: {hamilton.version.VERSION}')
+print(f'hamilton-sdk: {hamilton_sdk.__version__}')
+print(f'hamilton-lsp: {hamilton_lsp.__version__}')
+print(f'hamilton-contrib: {importlib.metadata.version(\"apache-hamilton-contrib\")}')
+print('All packages coexist without conflicts')
+"
+```
+
+## Extras chain verification
+
+Verify the `apache-hamilton[sdk]` extra correctly pulls in `apache-hamilton-sdk`:
+
+```bash
+python -m venv /tmp/verify-extras && source /tmp/verify-extras/bin/activate
+pip install "apache-hamilton[sdk,lsp]"
+
+python -c "
+import hamilton_sdk
+import hamilton_lsp
+print('Extras resolution: OK')
+"
+```
+
+## Redirect package verification (after upload)
+
+Verify that old `sf-hamilton-*` package names redirect to the new names:
+
+```bash
+python -m venv /tmp/verify-redirects && source /tmp/verify-redirects/bin/activate
+pip install sf-hamilton-sdk sf-hamilton-ui sf-hamilton-lsp sf-hamilton-contrib
+
+pip show apache-hamilton-sdk | grep Version
+pip show apache-hamilton-ui | grep Version
+pip show apache-hamilton-lsp | grep Version
+pip show apache-hamilton-contrib | grep Version
+```
diff --git a/sf-hamilton-contrib-redirect/README.md b/sf-hamilton-contrib-redirect/README.md
new file mode 100644
index 00000000..f40ddaf7
--- /dev/null
+++ b/sf-hamilton-contrib-redirect/README.md
@@ -0,0 +1,38 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# sf-hamilton-contrib has moved to apache-hamilton-contrib
+
+This package is a redirect. The Hamilton contributed dataflows package is now
+developed under the Apache Software Foundation as **apache-hamilton-contrib**.
+
+## Migration
+
+Replace `sf-hamilton-contrib` with `apache-hamilton-contrib` in your dependencies:
+
+```bash
+pip install apache-hamilton-contrib
+```
+
+All functionality is identical. The package name changed as part of the
+move to the Apache Software Foundation.
+
+For documentation and getting started, see:
+- https://hamilton.apache.org/
+- https://github.com/apache/hamilton
diff --git a/sf-hamilton-contrib-redirect/build.sh b/sf-hamilton-contrib-redirect/build.sh
new file mode 100755
index 00000000..eb219e18
--- /dev/null
+++ b/sf-hamilton-contrib-redirect/build.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Builds the sf-hamilton-contrib redirect package for a given version.
+#
+# Usage:
+# ./build.sh <version>
+# ./build.sh 0.0.9
+
+set -euo pipefail
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ echo "Example: $0 0.0.9"
+ exit 1
+fi
+
+VERSION="$1"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+
+echo "Building sf-hamilton-contrib redirect package for version ${VERSION}..."
+
+# Stamp version into pyproject.toml from template
+sed "s/VERSION/${VERSION}/g" "${SCRIPT_DIR}/pyproject.toml.template" > "${SCRIPT_DIR}/pyproject.toml"
+
+# Clean previous build
+rm -rf "${SCRIPT_DIR}/dist" "${SCRIPT_DIR}/build" "${SCRIPT_DIR}"/*.egg-info
+
+# Build
+cd "${SCRIPT_DIR}"
+python -m build
+
+# Validate
+twine check dist/*
+
+echo ""
+echo "Build complete. Artifacts:"
+ls -la dist/
+echo ""
+echo "To upload: twine upload dist/sf_hamilton_contrib-${VERSION}*"
diff --git a/sf-hamilton-contrib-redirect/pyproject.toml.template b/sf-hamilton-contrib-redirect/pyproject.toml.template
new file mode 100644
index 00000000..2d48766e
--- /dev/null
+++ b/sf-hamilton-contrib-redirect/pyproject.toml.template
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[build-system]
+requires = ["setuptools>=64"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sf-hamilton-contrib"
+version = "VERSION"
+description = "This package has moved to apache-hamilton-contrib. Install apache-hamilton-contrib instead."
+readme = "README.md"
+requires-python = ">=3.10, <4"
+license = "Apache-2.0"
+dependencies = ["apache-hamilton-contrib==VERSION"]
+
+[project.urls]
+Homepage = "https://github.com/apache/hamilton"
+Documentation = "https://hamilton.apache.org/"
diff --git a/sf-hamilton-lsp-redirect/README.md b/sf-hamilton-lsp-redirect/README.md
new file mode 100644
index 00000000..d350729c
--- /dev/null
+++ b/sf-hamilton-lsp-redirect/README.md
@@ -0,0 +1,44 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# sf-hamilton-lsp has moved to apache-hamilton-lsp
+
+This package is a redirect. The Hamilton Language Server is now developed under the
+Apache Software Foundation as **apache-hamilton-lsp**.
+
+## Migration
+
+Replace `sf-hamilton-lsp` with `apache-hamilton-lsp` in your dependencies:
+
+```bash
+pip install apache-hamilton-lsp
+```
+
+Or install via the main package extra:
+
+```bash
+pip install "apache-hamilton[lsp]"
+```
+
+All functionality is identical. The package name changed as part of the
+move to the Apache Software Foundation.
+
+For documentation and getting started, see:
+- https://hamilton.apache.org/
+- https://github.com/apache/hamilton
diff --git a/sf-hamilton-lsp-redirect/build.sh b/sf-hamilton-lsp-redirect/build.sh
new file mode 100755
index 00000000..905c3eec
--- /dev/null
+++ b/sf-hamilton-lsp-redirect/build.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Builds the sf-hamilton-lsp redirect package for a given version.
+#
+# Usage:
+# ./build.sh <version>
+# ./build.sh 0.2.0
+
+set -euo pipefail
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ echo "Example: $0 0.2.0"
+ exit 1
+fi
+
+VERSION="$1"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+
+echo "Building sf-hamilton-lsp redirect package for version ${VERSION}..."
+
+# Stamp version into pyproject.toml from template
+sed "s/VERSION/${VERSION}/g" "${SCRIPT_DIR}/pyproject.toml.template" > "${SCRIPT_DIR}/pyproject.toml"
+
+# Clean previous build
+rm -rf "${SCRIPT_DIR}/dist" "${SCRIPT_DIR}/build" "${SCRIPT_DIR}"/*.egg-info
+
+# Build
+cd "${SCRIPT_DIR}"
+python -m build
+
+# Validate
+twine check dist/*
+
+echo ""
+echo "Build complete. Artifacts:"
+ls -la dist/
+echo ""
+echo "To upload: twine upload dist/sf_hamilton_lsp-${VERSION}*"
diff --git a/sf-hamilton-lsp-redirect/pyproject.toml.template b/sf-hamilton-lsp-redirect/pyproject.toml.template
new file mode 100644
index 00000000..fd8dc14a
--- /dev/null
+++ b/sf-hamilton-lsp-redirect/pyproject.toml.template
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[build-system]
+requires = ["setuptools>=64"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sf-hamilton-lsp"
+version = "VERSION"
+description = "This package has moved to apache-hamilton-lsp. Install apache-hamilton-lsp instead."
+readme = "README.md"
+requires-python = ">=3.10, <4"
+license = "Apache-2.0"
+dependencies = ["apache-hamilton-lsp==VERSION"]
+
+[project.urls]
+Homepage = "https://github.com/apache/hamilton"
+Documentation = "https://hamilton.apache.org/"
diff --git a/sf-hamilton-sdk-redirect/README.md b/sf-hamilton-sdk-redirect/README.md
new file mode 100644
index 00000000..45f54f41
--- /dev/null
+++ b/sf-hamilton-sdk-redirect/README.md
@@ -0,0 +1,44 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# sf-hamilton-sdk has moved to apache-hamilton-sdk
+
+This package is a redirect. The Hamilton SDK is now developed under the
+Apache Software Foundation as **apache-hamilton-sdk**.
+
+## Migration
+
+Replace `sf-hamilton-sdk` with `apache-hamilton-sdk` in your dependencies:
+
+```bash
+pip install apache-hamilton-sdk
+```
+
+Or install via the main package extra:
+
+```bash
+pip install "apache-hamilton[sdk]"
+```
+
+All functionality is identical. The package name changed as part of the
+move to the Apache Software Foundation.
+
+For documentation and getting started, see:
+- https://hamilton.apache.org/
+- https://github.com/apache/hamilton
diff --git a/sf-hamilton-sdk-redirect/build.sh b/sf-hamilton-sdk-redirect/build.sh
new file mode 100755
index 00000000..382cfb1c
--- /dev/null
+++ b/sf-hamilton-sdk-redirect/build.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Builds the sf-hamilton-sdk redirect package for a given version.
+#
+# Usage:
+# ./build.sh <version>
+# ./build.sh 0.9.0
+
+set -euo pipefail
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ echo "Example: $0 0.9.0"
+ exit 1
+fi
+
+VERSION="$1"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+
+echo "Building sf-hamilton-sdk redirect package for version ${VERSION}..."
+
+# Stamp version into pyproject.toml from template
+sed "s/VERSION/${VERSION}/g" "${SCRIPT_DIR}/pyproject.toml.template" > "${SCRIPT_DIR}/pyproject.toml"
+
+# Clean previous build
+rm -rf "${SCRIPT_DIR}/dist" "${SCRIPT_DIR}/build" "${SCRIPT_DIR}"/*.egg-info
+
+# Build
+cd "${SCRIPT_DIR}"
+python -m build
+
+# Validate
+twine check dist/*
+
+echo ""
+echo "Build complete. Artifacts:"
+ls -la dist/
+echo ""
+echo "To upload: twine upload dist/sf_hamilton_sdk-${VERSION}*"
diff --git a/sf-hamilton-sdk-redirect/pyproject.toml.template b/sf-hamilton-sdk-redirect/pyproject.toml.template
new file mode 100644
index 00000000..a5783920
--- /dev/null
+++ b/sf-hamilton-sdk-redirect/pyproject.toml.template
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[build-system]
+requires = ["setuptools>=64"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sf-hamilton-sdk"
+version = "VERSION"
+description = "This package has moved to apache-hamilton-sdk. Install apache-hamilton-sdk instead."
+readme = "README.md"
+requires-python = ">=3.10, <4"
+license = "Apache-2.0"
+dependencies = ["apache-hamilton-sdk==VERSION"]
+
+[project.urls]
+Homepage = "https://github.com/apache/hamilton"
+Documentation = "https://hamilton.apache.org/"
diff --git a/sf-hamilton-ui-redirect/README.md b/sf-hamilton-ui-redirect/README.md
new file mode 100644
index 00000000..ed330084
--- /dev/null
+++ b/sf-hamilton-ui-redirect/README.md
@@ -0,0 +1,44 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# sf-hamilton-ui has moved to apache-hamilton-ui
+
+This package is a redirect. The Hamilton UI is now developed under the
+Apache Software Foundation as **apache-hamilton-ui**.
+
+## Migration
+
+Replace `sf-hamilton-ui` with `apache-hamilton-ui` in your dependencies:
+
+```bash
+pip install apache-hamilton-ui
+```
+
+Or install via the main package extra:
+
+```bash
+pip install "apache-hamilton[ui]"
+```
+
+All functionality is identical. The package name changed as part of the
+move to the Apache Software Foundation.
+
+For documentation and getting started, see:
+- https://hamilton.apache.org/
+- https://github.com/apache/hamilton
diff --git a/sf-hamilton-ui-redirect/build.sh b/sf-hamilton-ui-redirect/build.sh
new file mode 100755
index 00000000..dace06a2
--- /dev/null
+++ b/sf-hamilton-ui-redirect/build.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Builds the sf-hamilton-ui redirect package for a given version.
+#
+# Usage:
+# ./build.sh <version>
+# ./build.sh 0.0.18
+
+set -euo pipefail
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ echo "Example: $0 0.0.18"
+ exit 1
+fi
+
+VERSION="$1"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+
+echo "Building sf-hamilton-ui redirect package for version ${VERSION}..."
+
+# Stamp version into pyproject.toml from template
+sed "s/VERSION/${VERSION}/g" "${SCRIPT_DIR}/pyproject.toml.template" > "${SCRIPT_DIR}/pyproject.toml"
+
+# Clean previous build
+rm -rf "${SCRIPT_DIR}/dist" "${SCRIPT_DIR}/build" "${SCRIPT_DIR}"/*.egg-info
+
+# Build
+cd "${SCRIPT_DIR}"
+python -m build
+
+# Validate
+twine check dist/*
+
+echo ""
+echo "Build complete. Artifacts:"
+ls -la dist/
+echo ""
+echo "To upload: twine upload dist/sf_hamilton_ui-${VERSION}*"
diff --git a/sf-hamilton-ui-redirect/pyproject.toml.template b/sf-hamilton-ui-redirect/pyproject.toml.template
new file mode 100644
index 00000000..0fa6753d
--- /dev/null
+++ b/sf-hamilton-ui-redirect/pyproject.toml.template
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+[build-system]
+requires = ["setuptools>=64"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sf-hamilton-ui"
+version = "VERSION"
+description = "This package has moved to apache-hamilton-ui. Install apache-hamilton-ui instead."
+readme = "README.md"
+requires-python = ">=3.10.1, <4"
+license = "Apache-2.0"
+dependencies = ["apache-hamilton-ui==VERSION"]
+
+[project.urls]
+Homepage = "https://github.com/apache/hamilton"
+Documentation = "https://hamilton.apache.org/"
diff --git a/ui/backend/pyproject.toml b/ui/backend/pyproject.toml
index b52e62cf..fe105a59 100644
--- a/ui/backend/pyproject.toml
+++ b/ui/backend/pyproject.toml
@@ -60,11 +60,6 @@ dependencies = [
"typer",
]
-[project.scripts]
-# Django management commands for cleaner CLI usage with uv
-# Usage: uv run hamilton-ui
-hamilton-ui = "hamilton_ui.server.manage:main"
-
[project.urls]
homepage = "https://www.tryhamilton.dev/"
documentation = "https://hamilton.apache.org/"
diff --git a/ui/backend/server/server/settings_mini.py b/ui/backend/server/server/settings_mini.py
index 91c41513..6cd8c39e 100644
--- a/ui/backend/server/server/settings_mini.py
+++ b/ui/backend/server/server/settings_mini.py
@@ -131,7 +131,7 @@ WSGI_APPLICATION = "server.wsgi.application"
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
STATIC_URL = "/static/"
STATICFILES_DIRS = [
- os.path.join(BASE_DIR, "build/static/"),
+ os.path.join(BASE_DIR, "build/assets/"),
]
# Add for serving the 'index.html' and other build files not in STATICFILES_DIRS
diff --git a/ui/backend/server/trackingserver_projects/schema.py b/ui/backend/server/trackingserver_projects/schema.py
index b6f68863..01464224 100644
--- a/ui/backend/server/trackingserver_projects/schema.py
+++ b/ui/backend/server/trackingserver_projects/schema.py
@@ -212,7 +212,7 @@ class ProjectIn(ProjectBase):
class ProjectOut(ProjectBase):
id: int
- role: str = Field(description="Role of the user in the project", default=None)
+ role: str | None = Field(description="Role of the user in the project", default=None)
visibility: VisibilityOut = Field(description="Resolved visibility of the project")
created_at: datetime.datetime = Field(description="When the project was created")
updated_at: datetime.datetime = Field(description="When the project was last updated")
diff --git a/ui/backend/tests/test_build.py b/ui/backend/tests/test_build.py
index e362ee1a..35160d06 100644
--- a/ui/backend/tests/test_build.py
+++ b/ui/backend/tests/test_build.py
@@ -150,9 +150,9 @@ class TestDjangoConfiguration:
"Django settings missing mini mode configuration"
)
- # Check for STATICFILES_DIRS pointing to build/static/ or build/assets/
- assert "build/static/" in settings_content or "build/assets/" in settings_content, (
- "Django settings missing build/static/ or build/assets/ in STATICFILES_DIRS"
+ # Check for STATICFILES_DIRS pointing to build/static or build/assets
+ assert "build/static" in settings_content or "build/assets" in settings_content, (
+ "Django settings missing build/static or build/assets in STATICFILES_DIRS"
)
# Check for MEDIA_ROOT pointing to build/
diff --git a/ui/sdk/tests/tracking/test_polars_stats.py b/ui/sdk/tests/tracking/test_polars_stats.py
index 9db8e788..31c2346b 100644
--- a/ui/sdk/tests/tracking/test_polars_stats.py
+++ b/ui/sdk/tests/tracking/test_polars_stats.py
@@ -157,13 +157,7 @@ def test_compute_stats_df():
"missing": 0,
"name": "h",
"pos": 7,
- "quantiles": {
- 0.1: "2024-01-01T00:00:00",
- 0.25: "2024-01-03T00:00:00",
- 0.5: "2024-01-06T00:00:00",
- 0.75: "2024-01-10T00:00:00",
- 0.9: "2024-01-14T00:00:00",
- },
+ "quantiles": {},
"std": 0.0,
"zeros": 0,
},
@@ -193,13 +187,7 @@ def test_compute_stats_df():
"missing": 0,
"name": "j",
"pos": 9,
- "quantiles": {
- 0.1: "2022-01-01T00:00:00",
- 0.25: "2022-02-01T00:00:00",
- 0.5: "2022-03-01T00:00:00",
- 0.75: "2022-04-01T00:00:00",
- 0.9: "2022-05-01T00:00:00",
- },
+ "quantiles": {},
"std": 0.0,
"zeros": 0,
},