-
Notifications
You must be signed in to change notification settings - Fork 61
✨ Add application skeleton #551
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?
Conversation
❌ 312/313 passed, 4 flaky, 1 failed, 1 skipped, 2h45m32s total ❌ test_e2e_workflow: pyspark.errors.exceptions.connect.SparkConnectGrpcException: () BAD_REQUEST: session_id is no longer usable. Generate a new session_id by detaching and reattaching the compute and then try again [sessionId=38b1a963-075a-4b6b-b459-5e37cd569e56, reason=INACTIVITY_TIMEOUT]. (requestId=91a94f33-912b-4c01-8101-26c3a84762c1) (12m4.725s)
Flaky tests:
Running from acceptance #2393 |
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.
Pull Request Overview
This PR introduces the application skeleton for a full-stack web application with a React frontend and FastAPI backend. The implementation includes a modern tech stack with TailwindCSS, ShadCN UI components, and comprehensive development tooling.
- Adds React-based frontend with TanStack Router, React Query, and ShadCN UI components
- Implements FastAPI backend with user authentication, database configuration, and API endpoints
- Sets up development environment with TypeScript, ESLint, Prettier, and comprehensive build tooling
Reviewed Changes
Copilot reviewed 43 out of 48 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ui/* | Complete React frontend setup with routing, state management, and UI components |
src/databricks/labs/dqx/app/* | FastAPI backend with authentication, configuration, and API endpoints |
pyproject.toml | Added app dependencies for FastAPI, uvicorn, and database libraries |
docs/dqx/docs/dev/contributing.mdx | Added development setup documentation for the new app |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
## Contributing to the DQX App | ||
|
||
DQX App is a web application that provides a user interface for DQX. It is built with React and FastAPI. |
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 we mention Lakehouse app as deployment mechanism to give a bit more context?
@@ -78,6 +86,7 @@ dependencies = [ | |||
"pylint~=3.3.1", | |||
"pylint-per-file-ignores~=1.3", | |||
"pylint-pytest==2.0.0a0", | |||
"pylint_pydantic", |
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.
pin the version
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/{self.database}?sslmode=require" | ||
|
||
|
||
class DatabaseManager(BaseModel): |
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 not belong to config
@@ -0,0 +1,5 @@ | |||
import logoUrl from "/logo.svg"; |
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.
can we use existing logo from docs, or does it have to live inside the app?
|
||
Add a new `.env` file in the root of the project with the following content: | ||
``` | ||
DQX_DEV_TOKEN=<your-databricks-token> |
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 recommend using oauth. Earlier in the docs we have a note on this.
Is this DQX_DEV_TOKEN
correct? it's not a standard evn var and it is not used anywhere in this PR
@@ -47,6 +47,14 @@ pii = [ | |||
# This may be required for the larger models due to Databricks connect memory limitations. | |||
# The models cannot be delcared as dependency here buecase PyPI does not support URL-based dependencies which would prevent releases. | |||
] | |||
app = [ | |||
"fastapi", |
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 pin the versions
|
||
N.b. - The `DQX_DEV_TOKEN` is a Databricks token that you can generate in the Databricks UI or via the Databricks CLI: | ||
```bash | ||
databricks token create --lifetime-seconds 3600 --comment "DQX App Development Token" |
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.
databricks token create --lifetime-seconds 3600 --comment "DQX App Development Token" | |
databricks tokens create --lifetime-seconds 3600 --comment "DQX App Development Token" |
|
||
2. Run the backend in development mode: | ||
```bash | ||
uvicorn src.databricks.labs.dqx.app.app:app --reload |
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.
The only way i could make it work on my machine was to enter the shell hatch shell
or run it, or hatch run python -m uvicorn src.databricks.labs.dqx.app.app:app --reload
, otherwise i was getting zsh: command not found: uvicorn
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR introduces the application skeleton, based on React, Vite, TailwindCSS + ShadCN (frontend) and FastAPI in the backend.