-
Notifications
You must be signed in to change notification settings - Fork 197
Fix sub-package LICENSE files + add build-from-source docs #1634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
|
||
| * 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. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here with the relative link to repo root |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here too |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick Q: when we make a release, we only have artefacts of this folder in the tarball, will the License link not break?