Skip to content

Rename sf hamilton to apache hamilton#1561

Open
skrawcz wants to merge 3 commits into
mainfrom
stefan/rename-sf-hamilton-to-apache-hamilton
Open

Rename sf hamilton to apache hamilton#1561
skrawcz wants to merge 3 commits into
mainfrom
stefan/rename-sf-hamilton-to-apache-hamilton

Conversation

@skrawcz
Copy link
Copy Markdown
Contributor

@skrawcz skrawcz commented Apr 26, 2026

Summary

Rename all sf-hamilton references to apache-hamilton across the repository.

All 5 Hamilton packages were already migrated to flit + apache-hamilton prefix in their pyproject.toml files, but ~250 files still referenced the old sf-hamilton name in
documentation, examples, error messages, CI workflows, and other places. This PR updates them all for consistency.

What changed

  • Python source (hamilton/plugins/h_*.py, graph.py, cli, etc.) — error messages now say pip install apache-hamilton[...]
  • Documentation (docs/, README.md, package READMEs) — install instructions updated
  • Examples (~170 files) — requirements.txt, .py, .ipynb all reference apache-hamilton
  • CI workflows — PyPI version checks and environment names updated
  • VSCode extension — install commands updated
  • UI frontend — SDK install instruction updated
  • pyproject.tomllsp/sdk/ui extras still point to sf-hamilton-* (only dev prereleases exist on PyPI for the apache-prefixed subpackages); TODO comments mark
    these for update once stable versions are published
  • ui/backend/pyproject.toml — dependency changed from sf-hamilton to apache-hamilton (stable 1.90.0 exists on PyPI)
  • Disable ddtrace pytest pluginddtrace auto-registers a pytest plugin that spawns background threads preventing clean process exit after the test suite. Disabling it
    fixes the test suite hang. Hamilton's own DDOGTracer tests are unaffected.
  • scripts/find_hanging_tests.sh — new utility that runs each test file individually with a timeout to identify tests that prevent pytest from exiting

What did NOT change

  • Import names (e.g., import hamilton, from hamilton.contrib import ...) — unchanged
  • sf-hamilton-redirect/ — intentionally references both names (it's the PyPI redirect package)
  • scripts/generate_announce_email.pysf-hamilton- tag matching for historical changelog
  • scripts/README.md — documents the sf-hamilton redirect workflow

Test plan

  • uv sync resolves cleanly
  • Full test suite passes: 1415 passed, 3 skipped, 2 xpassed (63s, clean exit)
  • Grep audit: only intentional sf-hamilton references remain (3 files)
  • Example smoke tests in fresh venvs (hello_world, data_quality, pandas/materialization, plotly/visualization)
  • apache-hamilton[visualization] extra resolves from PyPI

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

skrawcz added 2 commits April 25, 2026 21:01
Update all references to sf-hamilton package names to use the
apache-hamilton prefix. Covers error messages, install instructions,
requirements.txt files, notebooks, CI workflows, VSCode extension,
and UI components. Import names are unchanged.

The pyproject.toml extras for lsp/sdk/ui still point to sf-hamilton-*
packages until stable apache-hamilton-* versions are published to PyPI.
- Point lsp/sdk/ui extras to sf-hamilton-* with TODO to switch once
  stable apache-hamilton-* versions are published to PyPI
- Update ui/backend dependency from sf-hamilton to apache-hamilton
- Disable ddtrace pytest plugin which spawns background threads that
  prevent clean process exit after the test suite completes

export const example2 = `from hamilton import driver
# pip install sf-hamilton-contrib==0.0.1rc1
# pip install apache-hamilton-contrib==0.0.1rc1
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm maybe we just fix forward...

@skrawcz skrawcz marked this pull request as ready for review April 26, 2026 04:24
The contrib/docs project uses npm (has package-lock.json, no yarn.lock)
but the workflow was using yarn with cache: yarn. This caused webpack
Progress Plugin validation errors. Switch to npm ci for deterministic
installs matching the lockfile.
@skrawcz skrawcz force-pushed the stefan/rename-sf-hamilton-to-apache-hamilton branch from c592e65 to e9ddcb2 Compare April 26, 2026 04:38
@skrawcz skrawcz changed the title Stefan/rename sf hamilton to apache hamilton Rename sf hamilton to apache hamilton Apr 26, 2026
Copy link
Copy Markdown
Contributor

@jernejfrank jernejfrank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's couple of places I think you missed (or let me know that these need to stay sf):

Other than the above it looks good to me. Happy to approve, if the above are not meant to be changed yet.

Comment thread examples/README.md
Docker build takes around `6m16.298s` depending on the system configuration and network.
Alternatively, you can pull the container image from https://hub.docker.com/r/skrawcz/sf-hamilton.
`docker pull skrawcz/sf-hamilton`.
Alternatively, you can pull the container image from https://hub.docker.com/r/skrawcz/apache-hamilton.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in scope of this PR, but does apache have a docker container index we can use? This still seems to run through your account @skrawcz

Copy link
Copy Markdown
Contributor

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, ready to land.

Two small misses worth a quick follow-up (non-blocking):

  • examples/snowflake/hamilton_ui/Dockerfile:22RUN pip install "sf-hamilton[ui,sdk]" should be apache-hamilton[ui,sdk]
  • scripts/build_conda.sh:23pkg='sf-hamilton' (and the comment on L28)

Nice sweep otherwise. Did the parallel rename on Burr (apache/burr#772) and hit the same JSON-escaped notebook pattern — happy to share the regex if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants