perf(nba): load roster once server-side, stop shipping full CSV to client #408
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
| name: check-export | |
| env: | |
| # Git ref of the reflex monorepo to test templates against. reflex is a uv | |
| # workspace, so reflex and its split-out packages (reflex-base, | |
| # reflex-components-*) have to be installed together from the same tree — | |
| # a dev reflex paired with released sub-packages from PyPI does not work. | |
| REFLEX_REF: "main" | |
| REFLEX_TELEMETRY_ENABLED: false | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| reflex_ref: | |
| description: "reflex monorepo git ref to test against" | |
| default: "main" | |
| jobs: | |
| list-templates: | |
| uses: ./.github/workflows/list-templates.yml | |
| check-export: | |
| needs: [list-templates] | |
| strategy: | |
| matrix: | |
| folder: ${{ fromJSON(needs.list-templates.outputs.templates) }} | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: reflex-dev/reflex | |
| ref: ${{ github.event.inputs.reflex_ref || env.REFLEX_REF }} | |
| path: .reflex-src | |
| fetch-depth: 0 # full history so uv-dynamic-versioning derives a real version | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.10.16 | |
| - id: export-check | |
| run: | | |
| f=${{ matrix.folder }} | |
| if [[ ! -d $f ]]; then | |
| echo "$f is not a directory!" | |
| exit 1 | |
| fi | |
| cd "$f" | |
| if [[ ! -f requirements.txt ]]; then | |
| echo "requirements.txt is MISSING" | |
| exit 1 | |
| fi | |
| if !( grep -w "^reflex" requirements.txt >/dev/null 2>&1 ); then | |
| echo "requirements.txt does not contain 'reflex'" | |
| exit 1 | |
| fi | |
| python -m venv venv | |
| source venv/bin/activate | |
| # Install the whole reflex workspace from the checked-out monorepo, so | |
| # reflex and every split-out package (reflex-base, reflex-components-*) | |
| # are the same dev version. uv resolves the sibling workspace packages | |
| # from the source tree; plain `pip install reflex@git` would instead | |
| # pull released sub-packages from PyPI and break whenever main moves a | |
| # module between packages (e.g. reflex_base.components.memo). | |
| pip install uv | |
| uv pip install "$GITHUB_WORKSPACE/.reflex-src" -r requirements.txt | |
| export OPENAI_API_KEY="dummy" | |
| reflex init | |
| reflex export | tee export_logs.txt | |
| for a in frontend.zip backend.zip; do | |
| if unzip -t "$a"; then | |
| echo "$a prepared as expected" | |
| else | |
| echo "ERROR: $a is not a valid zip file" | |
| exit 1 | |
| fi | |
| done | |
| - name: Check for DeprecationWarning in logs | |
| run: | | |
| cd ${{ matrix.folder }} | |
| dep_lines=$(grep -i "DeprecationWarning:" export_logs.txt || true) | |
| if [ -n "$dep_lines" ]; then | |
| echo "Found Deprecation warning:" | |
| echo "$dep_lines" | |
| exit 1 | |
| else | |
| echo "No deprecated code, all good." | |
| fi |