Skip to content
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

Make asset compilation part of the build_wheel hatchling build_hook #45929

Open
potiuk opened this issue Jan 22, 2025 · 0 comments
Open

Make asset compilation part of the build_wheel hatchling build_hook #45929

potiuk opened this issue Jan 22, 2025 · 0 comments
Labels
area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code area:UI Related to UI/UX. For Frontend Developers.
Milestone

Comments

@potiuk
Copy link
Member

potiuk commented Jan 22, 2025

Currently, we have custom build hook in hatchling that performs two things:

  • retrieval of .git commit (needs git to be available on path)
  • compiling www-assets (needs pre-commit to be available on path)

We are not using npm but pnpm in airflow ui - new Airflow 3.0 UI and we are going to drop the old www - npm driven environment. PNPM is way more portable and easy to install and 2x faster than npm so we could potentially move both git and asset compilation to build_wheel build hook, so that asset compilation happens always when airlfow is installed for editable installation or when wheel is built.

We could install pnpm via https://pnpm.io/installation#on-posix-systems and do the git bit might be optionally skipped if git is not available.

This way the contributors will not have to worry about compiling assets when installing airlfow locally for development or building wheels - the compilation would happen automatically when pip install -e . or uv sync or and PEP compliant "build wheel` happens.

This has the drawback of longer first-time installation and needs a bit smart determination on how to inform that the package needs to be reinstalled / buiild_hook run during the development.

@potiuk potiuk converted this from a draft issue Jan 22, 2025
@potiuk potiuk added this to the Airflow 3.0.0 milestone Jan 22, 2025
@dosubot dosubot bot added area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code area:UI Related to UI/UX. For Frontend Developers. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code area:UI Related to UI/UX. For Frontend Developers.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant