feat: Make frontend and backend pip-installable#19
Open
timbot wants to merge 1 commit into
Open
Conversation
This commit introduces the necessary configuration to package the frontend and backend as separate, pip-installable packages. This simplifies deployment and dependency management. Key changes: - **Backend:** - Added `pyproject.toml` to define the `turbodrone-backend` package. - Added entry points for various scripts like `turbodrone-web`, `turbodrone-cli`, etc. - Added a `main` function to `web_server.py` to serve as the entry point for the web server. - **Frontend:** - Added `pyproject.toml` and `setup.py` to define the `turbodrone-frontend` package. - The `setup.py` script now handles running `npm build` and packaging the static assets. - A simple FastAPI server is included to serve the frontend, making it self-contained. - Removed unnecessary React imports from a few components.
Author
|
Heya @marshallrichards - I like packages to be pip-installable so I can easily add them to docker images etc. Let me know if this is interesting to you, and if you find any issues with it I can address them. Cheers, Tim. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces the necessary configuration to package the frontend and backend as separate, pip-installable packages. This simplifies deployment and dependency management.
Key changes:
Backend:
pyproject.tomlto define theturbodrone-backendpackage.turbodrone-web,turbodrone-cli, etc.mainfunction toweb_server.pyto serve as the entry point for the web server.Frontend:
pyproject.tomlandsetup.pyto define theturbodrone-frontendpackage.setup.pyscript now handles runningnpm buildand packaging the static assets.