Skip to content

Commit aefaeaf

Browse files
Merge pull request #7 from flexcompute/dev
v1.1.0-dev: Command palette, faithful GDES FLAP, sweep flowfield restore
2 parents 8a217d1 + 8b94338 commit aefaeaf

323 files changed

Lines changed: 14310 additions & 335866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/pr-to-main.mdc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Checklist enforced whenever creating a PR that targets main
3+
alwaysApply: true
4+
---
5+
6+
# PR-to-Main Requirements
7+
8+
Every pull request that targets `main` **must** satisfy the two gates below before it can be opened. Treat these as blocking — do not create the PR until both are done.
9+
10+
## 1. Update "What's New"
11+
12+
The in-app changelog lives in `flexfoil-ui/src/lib/version.ts` (the `CHANGELOG` array).
13+
14+
- If the current top entry's `version` already matches the release being prepared, **append** new items to that entry.
15+
- Otherwise, **add a new entry** at index 0 with the next version, today's date, and the items.
16+
- Every user-visible change in the PR must have a corresponding `{ category, text }` item. Use the correct category:
17+
- `added` — wholly new feature or capability
18+
- `changed` — enhancement or modification to existing behavior
19+
- `fixed` — bug fix
20+
- Keep descriptions concise (one sentence, no period).
21+
22+
## 2. Keep Documentation in Sync
23+
24+
The docs site lives in `docs-site/docs/` (Docusaurus `.mdx` files).
25+
26+
- If the PR adds, changes, or removes **any** solver behavior, UI feature, API surface, or configuration option, the corresponding doc page must be created or updated in the same PR.
27+
- Docs must reflect the **actual** implementation — no aspirational or outdated content. If existing docs reference behavior that the PR changes, update those docs.
28+
- New major features need their own doc page added to `docs-site/docs/`.
29+
30+
## PR Authoring Checklist
31+
32+
When drafting the PR description, include this checklist (filled in):
33+
34+
```markdown
35+
## Changelog & Docs
36+
- [ ] `flexfoil-ui/src/lib/version.ts` CHANGELOG updated
37+
- [ ] All user-visible changes have a changelog entry
38+
- [ ] New/changed docs pages added or updated in `docs-site/docs/`
39+
- [ ] No stale or aspirational content remains in affected docs
40+
```
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Deploy FlexFoil Beta to flight-sciences dev
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
paths:
7+
- "flexfoil-ui/**"
8+
- "crates/rustfoil-wasm/**"
9+
- "Cargo.toml"
10+
- "Cargo.lock"
11+
- ".github/workflows/deploy-foil-beta.yml"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
id-token: write
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 20
22+
env:
23+
AWS_REGION: us-east-1
24+
AWS_ROLE: ${{ vars.AWS_DEPLOY_ROLE }}
25+
DISTRIBUTION_ID: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID }}
26+
S3_BUCKET: ${{ vars.S3_BUCKET }}
27+
S3_DEPLOY_PATH: /flexfoil-beta
28+
BASE_URL: /flexfoil-beta/
29+
PUBLIC_URL: https://foil.flexcompute.com/flexfoil-beta/
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v5
33+
34+
- name: Setup Rust
35+
uses: dtolnay/rust-toolchain@stable
36+
37+
- name: Install wasm-pack
38+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
39+
40+
- name: Build WASM package
41+
run: |
42+
cd crates/rustfoil-wasm
43+
wasm-pack build --target web --release --out-dir ../../pkg
44+
45+
- name: Setup Node
46+
uses: actions/setup-node@v5
47+
with:
48+
node-version: 20
49+
cache: npm
50+
cache-dependency-path: flexfoil-ui/package-lock.json
51+
52+
- name: Install frontend dependencies
53+
working-directory: ./flexfoil-ui
54+
run: npm ci
55+
56+
- name: Build FlexFoil frontend
57+
working-directory: ./flexfoil-ui
58+
run: npx vite build
59+
env:
60+
NODE_OPTIONS: --max-old-space-size=4096
61+
BASE_URL: ${{ env.BASE_URL }}
62+
VITE_AG_GRID_LICENSE_KEY: ${{ secrets.AG_GRID_ENTERPRISE_LICENSE_KEY }}
63+
64+
- name: Configure AWS credentials
65+
uses: aws-actions/configure-aws-credentials@v4
66+
with:
67+
aws-region: ${{ env.AWS_REGION }}
68+
role-to-assume: ${{ env.AWS_ROLE }}
69+
role-session-name: FlexFoilBetaDeploy
70+
71+
- name: Deploy FlexFoil Beta to S3
72+
working-directory: ./flexfoil-ui/dist
73+
run: |
74+
echo "Deploying to s3://${S3_BUCKET}${S3_DEPLOY_PATH}"
75+
76+
aws s3 rm "s3://${S3_BUCKET}${S3_DEPLOY_PATH}" --recursive
77+
78+
aws s3 cp . "s3://${S3_BUCKET}${S3_DEPLOY_PATH}" \
79+
--recursive --exclude "*" --include "*.html" \
80+
--metadata-directive REPLACE \
81+
--cache-control 'max-age=0, no-cache, no-store, must-revalidate' \
82+
--metadata "deploy-sha1=${GITHUB_SHA}"
83+
84+
aws s3 cp . "s3://${S3_BUCKET}${S3_DEPLOY_PATH}" \
85+
--recursive --exclude "*" --include "*.json" \
86+
--metadata-directive REPLACE \
87+
--cache-control 'max-age=300, must-revalidate' \
88+
--metadata "deploy-sha1=${GITHUB_SHA}"
89+
90+
aws s3 cp . "s3://${S3_BUCKET}${S3_DEPLOY_PATH}" \
91+
--recursive --exclude "*.html" --exclude "*.json" --exclude "*.map" \
92+
--cache-control 'max-age=31536000, immutable' \
93+
--metadata "deploy-sha1=${GITHUB_SHA}"
94+
95+
- name: Invalidate CloudFront
96+
run: |
97+
aws cloudfront create-invalidation \
98+
--distribution-id "${DISTRIBUTION_ID}" \
99+
--paths "/flexfoil-beta/*"
100+
101+
- name: Deployment Summary
102+
run: |
103+
echo "FlexFoil Beta deployed to ${PUBLIC_URL}"

.github/workflows/deploy-foil.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
timeout-minutes: 20
2222
env:
2323
AWS_REGION: us-east-1
24-
AWS_ROLE: REDACTED_AWS_ROLE_ARN
25-
DISTRIBUTION_ID: REDACTED_CLOUDFRONT_ID
26-
S3_BUCKET: REDACTED_S3_BUCKET
24+
AWS_ROLE: ${{ vars.AWS_DEPLOY_ROLE }}
25+
DISTRIBUTION_ID: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID }}
26+
S3_BUCKET: ${{ vars.S3_BUCKET }}
2727
S3_DEPLOY_PATH: /flexfoil
2828
BASE_URL: /flexfoil/
2929
PUBLIC_URL: https://foil.flexcompute.com/flexfoil/

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
timeout-minutes: 15
1919
env:
2020
AWS_REGION: us-east-1
21-
AWS_ROLE: REDACTED_AWS_ROLE_ARN
22-
DISTRIBUTION_ID: REDACTED_CLOUDFRONT_ID
23-
S3_BUCKET: REDACTED_S3_BUCKET
21+
AWS_ROLE: ${{ vars.AWS_DEPLOY_ROLE }}
22+
DISTRIBUTION_ID: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID }}
23+
S3_BUCKET: ${{ vars.S3_BUCKET }}
2424
S3_DEPLOY_PATH: /docs
2525
steps:
2626
- name: Checkout

.github/workflows/pypi-publish.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: Build & Publish flexfoil Python wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- "pypi-v*"
7+
workflow_dispatch:
8+
inputs:
9+
publish:
10+
description: "Publish to PyPI"
11+
type: boolean
12+
default: false
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
# ---------- Build the frontend (shared artifact) ----------
19+
build-frontend:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v5
23+
24+
- uses: dtolnay/rust-toolchain@stable
25+
26+
- name: Install wasm-pack
27+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
28+
29+
- name: Build WASM
30+
run: |
31+
cd crates/rustfoil-wasm
32+
wasm-pack build --target web --release --out-dir ../../pkg
33+
34+
- uses: actions/setup-node@v5
35+
with:
36+
node-version: 20
37+
cache: npm
38+
cache-dependency-path: flexfoil-ui/package-lock.json
39+
40+
- name: Build frontend
41+
run: |
42+
cd flexfoil-ui
43+
npm ci
44+
NODE_OPTIONS="--max-old-space-size=4096" npx vite build
45+
46+
- name: Upload frontend dist
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: frontend-dist
50+
path: flexfoil-ui/dist/
51+
52+
# ---------- Build platform wheels ----------
53+
build-wheels:
54+
needs: build-frontend
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
include:
59+
- os: ubuntu-latest
60+
target: x86_64-unknown-linux-gnu
61+
- os: ubuntu-latest
62+
target: aarch64-unknown-linux-gnu
63+
- os: macos-14
64+
target: aarch64-apple-darwin
65+
- os: macos-14
66+
target: x86_64-apple-darwin
67+
- os: windows-latest
68+
target: x86_64-pc-windows-msvc
69+
70+
runs-on: ${{ matrix.os }}
71+
steps:
72+
- uses: actions/checkout@v5
73+
with:
74+
sparse-checkout: |
75+
crates
76+
packages
77+
Cargo.toml
78+
Cargo.lock
79+
80+
- name: Download frontend dist
81+
uses: actions/download-artifact@v4
82+
with:
83+
name: frontend-dist
84+
path: packages/flexfoil-python/src/flexfoil/_static
85+
86+
- uses: actions/setup-python@v5
87+
with:
88+
python-version: "3.11"
89+
90+
- name: Build wheel
91+
uses: PyO3/maturin-action@v1
92+
with:
93+
target: ${{ matrix.target }}
94+
args: --release --out dist
95+
working-directory: packages/flexfoil-python
96+
manylinux: auto
97+
98+
- name: Upload wheel
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: wheel-${{ matrix.target }}
102+
path: packages/flexfoil-python/dist/*.whl
103+
104+
# ---------- Build sdist ----------
105+
build-sdist:
106+
needs: build-frontend
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: actions/checkout@v5
110+
111+
- name: Download frontend dist
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: frontend-dist
115+
path: packages/flexfoil-python/src/flexfoil/_static
116+
117+
- name: Build sdist
118+
uses: PyO3/maturin-action@v1
119+
with:
120+
command: sdist
121+
args: --out dist
122+
working-directory: packages/flexfoil-python
123+
124+
- name: Upload sdist
125+
uses: actions/upload-artifact@v4
126+
with:
127+
name: sdist
128+
path: packages/flexfoil-python/dist/*.tar.gz
129+
130+
# ---------- Publish to Test PyPI ----------
131+
publish-test:
132+
needs: [build-wheels, build-sdist]
133+
runs-on: ubuntu-latest
134+
if: github.event_name == 'workflow_dispatch'
135+
environment:
136+
name: testpypi
137+
url: https://test.pypi.org/p/flexfoil
138+
permissions:
139+
id-token: write
140+
steps:
141+
- name: Download wheels
142+
uses: actions/download-artifact@v4
143+
with:
144+
path: dist
145+
pattern: wheel-*
146+
merge-multiple: true
147+
148+
- name: Download sdist
149+
uses: actions/download-artifact@v4
150+
with:
151+
name: sdist
152+
path: dist
153+
154+
- name: Publish to Test PyPI
155+
uses: pypa/gh-action-pypi-publish@release/v1
156+
with:
157+
repository-url: https://test.pypi.org/legacy/
158+
packages-dir: dist/
159+
160+
# ---------- Publish to PyPI ----------
161+
publish:
162+
needs: [build-wheels, build-sdist]
163+
runs-on: ubuntu-latest
164+
if: startsWith(github.ref, 'refs/tags/pypi-v') || (github.event_name == 'workflow_dispatch' && inputs.publish)
165+
environment:
166+
name: pypi
167+
url: https://pypi.org/p/flexfoil
168+
permissions:
169+
id-token: write
170+
steps:
171+
- name: Download wheels
172+
uses: actions/download-artifact@v4
173+
with:
174+
path: dist
175+
pattern: wheel-*
176+
merge-multiple: true
177+
178+
- name: Download sdist
179+
uses: actions/download-artifact@v4
180+
with:
181+
name: sdist
182+
path: dist
183+
184+
- name: Publish to PyPI
185+
uses: pypa/gh-action-pypi-publish@release/v1
186+
with:
187+
packages-dir: dist/

0 commit comments

Comments
 (0)