Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm",
"postCreateCommand": "/bin/bash -c 'python -m pip install -r requirements.txt && reflex init'",
"postCreateCommand": "/bin/bash -c 'python -m pip install . && reflex init'",
"forwardPorts": [3000, 8000],
"portsAttributes": {
"3000": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
uses: codespell-project/actions-codespell@v2
18 changes: 7 additions & 11 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
python-version: "3.12"
activate-environment: true

- name: Install Requirements
run: pip install -r requirements.txt
- name: Install the project
run: uv sync --locked --no-dev

- name: Update Reflex CLI
run: pip install reflex-hosting-cli -U
run: uv pip install reflex-hosting-cli -U

- name: Deploy to Reflex
id: deploy
run: |
reflex deploy --project ${{ secrets.DEV_PROJECT_ID }} --token ${{ secrets.DEV_TOKEN }} --no-interactive





14 changes: 7 additions & 7 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_dispatch:
# This allows manual triggering of the workflow


concurrency:
group: deploy-prod
cancel-in-progress: false
Expand All @@ -21,16 +20,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
python-version: "3.12"
activate-environment: true

- name: Install Requirements
run: pip install -r requirements.txt
- name: Install the project
run: uv sync --locked --no-dev

- name: Update Reflex CLI
run: pip install reflex-hosting-cli -U
run: uv pip install reflex-hosting-cli -U

- name: Deploy to Reflex
id: deploy
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to staging
on:
push:
branches:
- 'r/*'
- "r/*"

concurrency:
group: deploy-staging
Expand All @@ -22,16 +22,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
python-version: "3.12"
activate-environment: true

- name: Install Requirements
run: pip install -r requirements.txt
- name: Install the project
run: uv sync --locked --no-dev

- name: Update Reflex CLI
run: pip install reflex-hosting-cli -U
run: uv pip install reflex-hosting-cli -U

- name: Deploy to Reflex
id: deploy
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: integration-tests

env:
TELEMETRY_ENABLED: false
NODE_OPTIONS: '--max_old_space_size=8192'
NODE_OPTIONS: "--max_old_space_size=8192"
REFLEX_DEP: "git+https://github.com/reflex-dev/reflex@main"
on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]
workflow_dispatch:
inputs:
reflex_dep:
Expand All @@ -26,12 +26,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.11'
python-version: "3.11"
activate-environment: true

- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Install Requirements for reflex-web and reflex
run: pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt
run: uv pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}'

- name: Init Website for reflex-web
run: reflex init

- name: Export the website
run: reflex export
run: reflex export
29 changes: 21 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
OPENAI_API_KEY: dummy
TELEMETRY_ENABLED: false
REFLEX_DEP: "git+https://github.com/reflex-dev/reflex@main"
PYTHONUNBUFFERED: 1

on:
push:
Expand All @@ -33,16 +34,28 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11.5", "3.12.0"]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
activate-environment: true

- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Install Requirements for reflex-web and reflex
run: |
pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt pytest playwright pytest-playwright uvicorn
playwright install --with-deps
run: uv pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}'

- name: Install Playwright
run: uv run playwright install --with-deps

- name: Initialize reflex
run: reflex init

- name: Run unit tests
run: |
export PYTHONUNBUFFERED=1
reflex init
pytest tests
run: pytest tests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ pynecone.db
reflex.db
venv/
.env
build
*.egg-info
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ We recommend using a virtual environment with Python 3.10 or higher to run this
6. Install the dependencies.

```bash
python -m pip install -r requirements.txt
python -m pip install .
```

7. Run the project.
Expand Down
36 changes: 0 additions & 36 deletions pypoetry.toml

This file was deleted.

73 changes: 73 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[project]
name = "reflex-web"
version = "0.0.1"
authors = [
{ name = "Nikhil Rao", email = "nikhil@reflex.dev" },
{ name = "Alek Petuskey", email = "alek@reflex.dev" },
]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"email-validator==2.1.1",
"black==23.10.0",
"pandas>=1.5.3",
"psycopg[binary]==3.2.3",
"plotly-express==0.4.1",
"googletrans-py==4.0.0",
"typesense==0.14.0",
"openai==1.13.3",
"pyyaml>=6.0.2",
"flexdown>=0.1.5a12,<0.2",
"reflex @ git+https://github.com/reflex-dev/reflex@main",
"mistletoe>=1.2.1",
"reflex-image-zoom>=0.0.2",
"reflex-chat==0.0.2a1",
"reflex_type_animation==0.0.1",
"reflex-ag-grid==0.0.10",
"replicate==0.32.1",
"reflex-pyplot==0.1.3",
"python-multipart==0.0.20",
]

[dependency-groups]
dev = ["pytest", "playwright", "pytest-playwright", "uvicorn"]

[tool.setuptools.packages.find]
where = ["pcweb"]

[tool.ruff]
target-version = "py311"
output-format = "concise"
lint.isort.split-on-trailing-comma = false
lint.select = [
"ANN001",
"B",
"C4",
"D",
"E",
"ERA",
"F",
"FURB",
"I",
"N",
"PERF",
"PGH",
"PTH",
"RUF",
"SIM",
"T",
"TRY",
"W",
]
lint.ignore = [
"B008",
"D205",
"E501",
"F403",
"SIM115",
"RUF006",
"RUF008",
"RUF012",
"TRY0",
]
lint.pydocstyle.convention = "google"
19 changes: 0 additions & 19 deletions requirements.txt

This file was deleted.

Loading