Skip to content

Fix sub-package LICENSE files + add build-from-source docs#1634

Open
skrawcz wants to merge 4 commits into
mainfrom
stefan/fix-subpackage-licenses
Open

Fix sub-package LICENSE files + add build-from-source docs#1634
skrawcz wants to merge 4 commits into
mainfrom
stefan/fix-subpackage-licenses

Conversation

@skrawcz

@skrawcz skrawcz commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Addresses the ASF mentor -1 on apache-hamilton-lsp 0.2.0-RC1 (and the same latent issues in the other sub-packages).

1. LICENSE: stale databackend.py notice (all sub-packages)

Each sub-package's LICENSE was copied verbatim from the main apache-hamilton package, carrying a bundled-code notice for hamilton/experimental/databackend.py — a file that ships only in the main package, not in any sub-package. Removed from sdk, contrib, lsp, and ui.

2. LICENSE: lsp pygls path

The pygls/ls_setup.py notice used the monorepo path dev_tools/language_server/tests/ls_setup.py, which doesn't resolve inside the re-rooted archive. Fixed to the archive-relative path tests/ls_setup.py.

3. LICENSE: UI bundled frontend attribution

The apache-hamilton-ui wheel bundles a compiled frontend (hamilton_ui/build/) containing third-party JavaScript dependencies (React, Redux, Chart.js, React Flow, etc.) with no attribution.

  • ui/frontend/package.json: new licenses script generating THIRD-PARTY-LICENSES.txt for production deps (license-checker-rseidelsohn)
  • scripts/apache_release_helper.py: runs npm run licenses after the frontend build so the file is bundled into the wheel
  • ui/backend/LICENSE: documents the bundled frontend and points to hamilton_ui/build/THIRD-PARTY-LICENSES.txt

All bundled frontend deps are permissive (MIT, Apache-2.0, BSD, ISC, etc.). Verified the rebuilt wheel contains hamilton_ui/build/THIRD-PARTY-LICENSES.txt and the corrected LICENSE.

4. Build-from-source docs

The mentor couldn't tell how to build the wheel from the source distribution. Added a "Building from source" section to all four READMEs:

  • 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.

Follow-up

Requires re-cutting RC2 for all four sub-packages after merge.

skrawcz added 3 commits June 15, 2026 23:25
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.
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.
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

@jernejfrank jernejfrank left a comment

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.

I just have that one thing with the license file link, happy to resolve if it is not an issue

Comment thread dev_tools/language_server/README.md Outdated
Comment thread ui/backend/README.md Outdated
Comment thread ui/sdk/README.md Outdated
@skrawcz skrawcz requested review from pjfanning and potiuk June 16, 2026 14:52
Comment thread ui/backend/LICENSE Outdated
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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this should be in the license - can it go in the readme?

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.

Agreed — removed the prose from LICENSE (now clean Apache-2.0 only) and moved the bundled-frontend explanation into the README's License section (37083ab). The actual third-party license texts still ship in the wheel at hamilton_ui/build/THIRD-PARTY-LICENSES.txt.

- READMEs (sdk, lsp, ui): point the License link at the package's own
  bundled LICENSE (./LICENSE) instead of ../../LICENSE, which breaks in
  the re-rooted release tarballs (jernejfrank)
- ui/backend/LICENSE: remove the prose about distribution forms / bundled
  frontend; LICENSE should carry license terms, not narrative (pjfanning)
- ui/backend/README.md: move that bundled-frontend explanation into the
  License section of the README

The bundled frontend's third-party license texts are still shipped in the
wheel at hamilton_ui/build/THIRD-PARTY-LICENSES.txt.
@skrawcz skrawcz requested review from jernejfrank and pjfanning June 17, 2026 05:57

@jernejfrank jernejfrank left a comment

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.

Cool!

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