From ff225f9ce1f33f41c88c85b15831076f89b74ed9 Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Mon, 15 Jun 2026 23:25:36 -0700 Subject: [PATCH 1/3] Fix LICENSE files for sdk, contrib, lsp sub-packages The sub-package LICENSE files were copied verbatim from the main apache-hamilton package, carrying a bundled-code notice for hamilton/experimental/databackend.py. That file only ships in the main package, not in any sub-package, so the notice was inaccurate. - sdk, contrib, lsp: remove the databackend.py MIT notice - lsp: fix the pygls/ls_setup.py reference to use the archive-relative path (tests/ls_setup.py) instead of the monorepo path Addresses ASF mentor -1 on apache-hamilton-lsp 0.2.0-RC1. --- contrib/LICENSE | 27 --------------------------- dev_tools/language_server/LICENSE | 27 +-------------------------- ui/sdk/LICENSE | 27 --------------------------- 3 files changed, 1 insertion(+), 80 deletions(-) diff --git a/contrib/LICENSE b/contrib/LICENSE index 60a996edb..261eeb9e9 100644 --- a/contrib/LICENSE +++ b/contrib/LICENSE @@ -199,30 +199,3 @@ 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. - -------------------------------- - -hamilton/experimental/databackend.py is copied from https://github.com/machow/databackend -and is licensed under the MIT License. - -MIT License - -Copyright (c) 2024 databackend contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/dev_tools/language_server/LICENSE b/dev_tools/language_server/LICENSE index 69f3792df..7c12ac2bb 100644 --- a/dev_tools/language_server/LICENSE +++ b/dev_tools/language_server/LICENSE @@ -202,33 +202,8 @@ ------------------------------- -hamilton/experimental/databackend.py is copied from https://github.com/machow/databackend -and is licensed under the MIT License. - -MIT License - -Copyright (c) 2024 databackend contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - This product includes test code derived from pygls (https://github.com/openlawlibrary/pygls): Copyright (c) Open Law Library. All rights reserved. Licensed under the Apache License, Version 2.0. -See dev_tools/language_server/tests/ls_setup.py. +See tests/ls_setup.py. diff --git a/ui/sdk/LICENSE b/ui/sdk/LICENSE index 60a996edb..261eeb9e9 100644 --- a/ui/sdk/LICENSE +++ b/ui/sdk/LICENSE @@ -199,30 +199,3 @@ 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. - -------------------------------- - -hamilton/experimental/databackend.py is copied from https://github.com/machow/databackend -and is licensed under the MIT License. - -MIT License - -Copyright (c) 2024 databackend contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 8f2be827413ad7aa87f095468edf2e15fdb52c0b Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Mon, 15 Jun 2026 23:29:18 -0700 Subject: [PATCH 2/3] Add third-party license attribution for UI bundled frontend The apache-hamilton-ui wheel bundles a compiled frontend (hamilton_ui/build/) containing third-party JavaScript dependencies (React, Redux, Chart.js, React Flow, etc.), but the wheel's LICENSE did not account for them. - ui/backend/LICENSE: remove the inaccurate databackend.py notice (that file ships only in the main apache-hamilton package) and document that the wheel bundles a compiled frontend whose per-dependency license texts live in hamilton_ui/build/THIRD-PARTY-LICENSES.txt - ui/frontend/package.json: add a 'licenses' script that generates THIRD-PARTY-LICENSES.txt for production deps via license-checker-rseidelsohn - apache_release_helper.py: run 'npm run licenses' after the frontend build so the attribution file is bundled into the wheel All bundled frontend deps are permissive (MIT, Apache-2.0, BSD, ISC, etc.). Addresses ASF release-policy requirement for binary artifacts that bundle third-party code. --- scripts/apache_release_helper.py | 7 ++++++ ui/backend/LICENSE | 37 +++++++++++--------------------- ui/frontend/package.json | 2 ++ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/scripts/apache_release_helper.py b/scripts/apache_release_helper.py index 84bb3ca8a..723526039 100644 --- a/scripts/apache_release_helper.py +++ b/scripts/apache_release_helper.py @@ -367,6 +367,13 @@ def create_release_artifacts(package_config: dict, version, no_sign: bool = Fals ["npm", "run", "build", "--prefix", frontend_dir], check=True, ) + # Generate third-party license attributions for the bundled + # frontend dependencies (required since the wheel ships + # compiled JS/CSS). Writes build/THIRD-PARTY-LICENSES.txt. + subprocess.run( + ["npm", "run", "licenses", "--prefix", frontend_dir], + check=True, + ) # Copy built assets to hamilton_ui/build/ if os.path.exists(build_target): shutil.rmtree(build_target) diff --git a/ui/backend/LICENSE b/ui/backend/LICENSE index 60a996edb..9f830c4e3 100644 --- a/ui/backend/LICENSE +++ b/ui/backend/LICENSE @@ -202,27 +202,16 @@ ------------------------------- -hamilton/experimental/databackend.py is copied from https://github.com/machow/databackend -and is licensed under the MIT License. - -MIT License - -Copyright (c) 2024 databackend contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +This package is distributed in two forms: + + * The source distribution (sdist) contains only Apache Hamilton source + code and is licensed under the Apache License, Version 2.0 above. + + * The binary distribution (wheel) additionally bundles a compiled + frontend web application (hamilton_ui/build/) built from the + TypeScript/React sources in ui/frontend/. That bundle includes + third-party JavaScript dependencies (e.g. React, Redux, Chart.js, + React Flow), each under permissive licenses (MIT, Apache-2.0, BSD, + ISC, and similar). The full per-dependency license texts and + copyright notices are included in the wheel at + hamilton_ui/build/THIRD-PARTY-LICENSES.txt. diff --git a/ui/frontend/package.json b/ui/frontend/package.json index 44ec32aea..199f56858 100644 --- a/ui/frontend/package.json +++ b/ui/frontend/package.json @@ -58,6 +58,7 @@ "start": "vite", "build": "vite build", "build:check": "tsc && vite build", + "licenses": "npx --yes license-checker-rseidelsohn --production --plainVertical --excludePackages \"frontend@0.1.0\" --out build/THIRD-PARTY-LICENSES.txt", "preview": "vite preview", "lint": "eslint . --ext .js,.ts,.jsx,.tsx", "lint-fix": "eslint . --ext .js,.ts,.jsx,.tsx --fix", @@ -95,6 +96,7 @@ "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.13.0", "husky": "^9.1.7", + "license-checker-rseidelsohn": "^5.0.1", "lint-staged": "^15.2.11", "postcss": "^8.5.14", "prettier": "^3.4.2", From d4942129238a3fa3d13ad3300b638493972c0066 Mon Sep 17 00:00:00 2001 From: Stefan Krawczyk Date: Tue, 16 Jun 2026 00:29:00 -0700 Subject: [PATCH 3/3] Document build-from-source instructions in sub-package READMEs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ASF mentor noted the source releases did not explain how to build the wheel from the source distribution. Add a 'Building from source' section to each sub-package README: - sdk, lsp, contrib: flit build --no-use-vcs - ui: backend-only sdist builds directly; the wheel requires building the frontend (npm install/build/licenses), copying it into the package, then building the wheel — matching what apache_release_helper.py does --- contrib/README.md | 17 +++++++++++++ dev_tools/language_server/README.md | 21 ++++++++++++++++ ui/backend/README.md | 38 +++++++++++++++++++++++++++++ ui/sdk/README.md | 17 +++++++++++++ 4 files changed, 93 insertions(+) diff --git a/contrib/README.md b/contrib/README.md index f481388df..fe6d0240e 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -209,3 +209,20 @@ If the above apply, run the `init-dataflow` command with `-s` to specify a sanit ## Got questions? Join our [slack](https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g) community to chat/ask Qs/etc. + +## Building from source + +This package uses [flit](https://flit.pypa.io/) as its build backend (declared +in `pyproject.toml`). To build the source distribution and wheel from a source +checkout: + +```bash +# from the contrib directory (the package root) +python -m pip install flit +flit build --no-use-vcs +# artifacts are written to dist/ +``` + +`flit build` produces both the `.tar.gz` source distribution and the +`.whl` wheel. `--no-use-vcs` selects files from the working tree rather than +git, which is what you want when building from an unpacked source release. diff --git a/dev_tools/language_server/README.md b/dev_tools/language_server/README.md index 8c3184767..b4c1c56a6 100644 --- a/dev_tools/language_server/README.md +++ b/dev_tools/language_server/README.md @@ -30,3 +30,24 @@ under the License. This is an implementation of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) to provide a rich IDE experience when creating Apache Hamilton dataflows. It currently powers the Apache Hamilton VSCode extension and could be integrated into other IDEs. + +# Building from source + +This package uses [flit](https://flit.pypa.io/) as its build backend (declared +in `pyproject.toml`). To build the source distribution and wheel from a source +checkout: + +```bash +# from the dev_tools/language_server directory (the package root) +python -m pip install flit +flit build --no-use-vcs +# artifacts are written to dist/ +``` + +`flit build` produces both the `.tar.gz` source distribution and the +`.whl` wheel. `--no-use-vcs` selects files from the working tree rather than +git, which is what you want when building from an unpacked source release. + +# License + +The code here is licensed under the Apache 2.0 license. See the main repository [LICENSE](../../LICENSE) for details. diff --git a/ui/backend/README.md b/ui/backend/README.md index 7d5330b29..ac046d275 100644 --- a/ui/backend/README.md +++ b/ui/backend/README.md @@ -80,6 +80,44 @@ dr = ( ) ``` +## Building from source + +This package uses [flit](https://flit.pypa.io/) as its build backend (declared +in `pyproject.toml`). + +The **source distribution** (`.tar.gz`) is backend-only and builds directly: + +```bash +# from the ui/backend directory (the package root) +python -m pip install flit +flit build --no-use-vcs --format sdist +# artifact is written to dist/ +``` + +The **wheel** additionally bundles a compiled frontend, so it requires +Node.js + npm. Build the frontend first, copy it into the package, then +build the wheel: + +```bash +# 1. build the frontend (from ui/frontend) +cd ../frontend +npm install +npm run build +npm run licenses # generates build/THIRD-PARTY-LICENSES.txt + +# 2. copy the compiled assets into the backend package +rm -rf ../backend/hamilton_ui/build +cp -r build ../backend/hamilton_ui/build + +# 3. build the wheel (from ui/backend) +cd ../backend +flit build --no-use-vcs --format wheel +# artifact is written to dist/ +``` + +The release script `scripts/apache_release_helper.py --package ui` performs all +of these steps automatically. + ## License Apache 2.0. See the main repository [LICENSE](../../LICENSE) for details. diff --git a/ui/sdk/README.md b/ui/sdk/README.md index 6cc9591ea..746a9a304 100644 --- a/ui/sdk/README.md +++ b/ui/sdk/README.md @@ -88,5 +88,22 @@ Then run Apache Hamilton as normal! Each DAG run will be tracked, and you'll hav Apache Hamilton UI. After spinning up the Apache Hamilton UI application, visit it to see your projects & DAGs. +# Building from source + +This package uses [flit](https://flit.pypa.io/) as its build backend (declared +in `pyproject.toml`). To build the source distribution and wheel from a source +checkout: + +```bash +# from the ui/sdk directory (the package root) +python -m pip install flit +flit build --no-use-vcs +# artifacts are written to dist/ +``` + +`flit build` produces both the `.tar.gz` source distribution and the +`.whl` wheel. `--no-use-vcs` selects files from the working tree rather than +git, which is what you want when building from an unpacked source release. + # License The code here is licensed under the Apache 2.0 license. See the main repository [LICENSE](../../LICENSE) for details.