Merge pull request #1338 from codeflash-ai/docs-and-webapp-updates

Minor docs and webapp updates
This commit is contained in:
Saurabh Misra 2024-12-11 20:46:09 -08:00 committed by GitHub
commit 5574142572
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 3 deletions

View file

@ -81,6 +81,38 @@ jobs:
codeflash
```
You would need to fill in the `#TODO`s in the file above to make it work. Please commit this file to your repository.
If you use a particular Python package manager like Poetry or uv, some helpful configurations are provided below.
#### Config with different Python package managers
The yaml config above is a basic template. Here is how you can run Codeflash with the different Python package managers:
1. Poetry
```yaml
- name: Install Project Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- name: Run Codeflash to optimize code
id: optimize_code
run: |
poetry env use python
poetry run codeflash
```
This assumes that you install poetry with pip and have Codeflash dependency in the `dev` section of your `pyproject.toml` file.
2. uv
```yaml
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv sync --group=dev
- name: Run Codeflash to optimize code
run: uv run codeflash
```
#### Add your API key to your repository secrets

View file

@ -31,7 +31,15 @@ export default async function AuthenticationPage(): Promise<JSX.Element> {
name: session?.user?.name,
},
})
posthog.capture({
distinctId: user.sub,
properties: { username: user.nickname,
email: user.email },
event: "webapp-user-logged-in",
})
await posthog.shutdown()
}
const completedOnboarding = await hasCompletedOnboarding(user.sub)
if (!completedOnboarding) {
console.log("user has not completed onboarding, redirecting")

View file

@ -26,14 +26,14 @@ export default function FirstPage({ className = "" }: FirstPageProps) {
const selectedLabels: string[] = []
await SubmitFirstOnboardingPage(emailInput, selectedLabels, customOption)
router.push("/app")
router.push("/app/gettingstarted")
}
}
const submitSkip = async () => {
setIsSubmitted(true)
await SubmitSkipOnboardingPage()
router.push("/app")
router.push("/app/gettingstarted")
}
return (

View file

@ -2,7 +2,7 @@ import { defineConfig } from "vitest/config"
import react from "@vitejs/plugin-react"
export default defineConfig({
plugins: [react()],
plugins: [react()] as any,
test: {
environment: "jsdom",
},