-
Notifications
You must be signed in to change notification settings - Fork 73
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
Package build improvements: #181
Conversation
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.
A quick review (we will need another iteration after this). Some high-level comments as well:
- You're missing the validation section of the PR?
- You should add the build folder of each component to
.gitignore
- The taskfile replaces the
packager
so we should ensure they generate the same output (from a user's perspective) and that we remove unnecessary files/docs, etc.
BUILDING.md
Outdated
* [Meteor](https://docs.meteor.com/install.html#installation) | ||
* [NodeJS 14](https://nodejs.org/download/release/v14.21.3/) |
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.
Meteor and NodeJS aren't requirements right now.
BUILDING.md
Outdated
* Run `task` from the root of the project | ||
* The package will be available at `out/clp-package` | ||
|
||
NOTE: The taskfile is not set up perfectly so it's possible it may generate an |
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.
We should address this limitation in this PR.
BUILDING.md
Outdated
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.
This doc should be in docs/Building.md
.
[tool.poetry.group.dev.dependencies] | ||
black = "^23.9.1" | ||
docformatter = "^1.7.5" | ||
mypy = "^1.5.1" | ||
ruff = "^0.0.291" |
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.
Let's add these dev dependencies in another PR.
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.
Ok
requirements.txt
Outdated
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.
Do we need these? Shouldn't this all be handled in the taskfile?
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.
We need poetry to build Python packages.
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.
Ah right, sorry, I forgot how the Taskfile was using this.
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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.
Missing empty line at end of file.
Taskfile.yml
Outdated
cmds: | ||
- rm -rf {{.CLP_BUILD_DIR}}/clp-package | ||
|
||
# TODO Clean-up |
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.
Should get rid of the TODO.
f1f2c15
to
7a52e01
Compare
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.
I have changes locally that I will commit once I clean them up, but in the mean time:
- You're still missing the validation section of the PR?
- For the Python components, we don't need the
constraints.txt
andrequirements.txt
files since we're now usingpyproject.toml
- Similarly, in the Python component READMEs, the instructions should be about how to build and install with
poetry
.
@@ -0,0 +1,10 @@ | |||
# CLP Package Utilities | |||
|
|||
This python module contains utilities used by thegit CLP package. |
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.
This python module contains utilities used by thegit CLP package. | |
This python module contains utilities used by the CLP package. |
requirements.txt
Outdated
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.
To ensure reproducible builds, let's lock the versions of these packages.
79264ec
to
4eb5bfd
Compare
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.
Looks good to me
…imestamps; Regenerate venv and wheel when requirements changes.
…nerate output when it's deleted.
20bbea3
to
7c66428
Compare
Description
The package is currently built using a Python script (the so-called "packager") which has no support for incremental builds. In addition, the way we install the Python components into the package is quite hacky and doesn't take advantage of Python's packaging tools.
This PR adds support for building the Python components using poetry and replaces the packager tool with a Taskfile (see Task). The Taskfile allows us to track changes to source files and only rebuild artifacts that depend on the changed source files.
One limitation of this PR (compared to the original packager) is that we haven't added support for automatically building the package in a container. As a result, users of this new build flow will need to setup a build machine/container manually. We hope to resolve this in a future PR.
Validation performed