-
Notifications
You must be signed in to change notification settings - Fork 114
ops: wire frontend into shared task infrastructure (#269) #271
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
Open
edvardm
wants to merge
34
commits into
OpenFilamentCollective:main
Choose a base branch
from
edvardm:support-frontend-in-task-automation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a518ada
extend Taskfile to cover WebUI tasks and eliminate duplication
edvardm a47cdb3
add CONTRIBUTING.md and link it from README
edvardm 62e3204
migrate webui from npm to pnpm
edvardm 6e5a199
fix: specify pnpm version in CI workflow
edvardm 253f1af
rename WebUI -> Frontend in CI workflow name and job id
edvardm 156c936
fix: install dependencies before Playwright browser install in CI
edvardm 775d308
add idiomatic pytest examples for utils functions
edvardm 6817aa8
refine test_utils: apply feedback and use parametrize
edvardm e2fa42e
split normalize_color_hex tests by input type and assertion shape
edvardm c7b84df
parametrize ensure_list scalar wrapping cases
edvardm 4388e96
collapse ensure_list into single parametrized test
edvardm 123c24a
add clean task to remove Python cache files and build artefacts
edvardm 11786af
split test task: test runs pytest only, test-all includes WebUI
edvardm 4fb9ad1
add test-cov task with terminal and HTML coverage reports
edvardm b67c8e4
skip fully-covered files in test-cov terminal report
edvardm ed0b327
sort test-cov terminal report by coverage ascending
edvardm b5baa79
tasks: add fmt alias for format
edvardm 65b0004
format code
edvardm cfd1791
add pre-commit config with ruff hooks; document opt-in setup in CONTR…
edvardm 973743a
switch pre-commit hooks from pre-commit to prek
edvardm 35580b8
migrate dev deps from optional-dependencies to dependency-groups (PEP…
edvardm 738f38f
add pr-notifs task to list open upstream PRs involving me
edvardm 282d025
support optional local/Taskfile.yml for personal tasks not under vers…
edvardm dad0ce3
add pytest CI workflow
edvardm 78eeff4
remove pre-commit from deps and config (handled in separate PR)
edvardm f0a0b1c
revert frontend tooling to npm, aligning with upstream main
edvardm 26f379a
align webui workflow with main (rename frontend-tests.yml)
edvardm f4c3831
revert to main version
edvardm bc1d02a
chore: rm local rule
edvardm ff556b6
add task check to pre-PR checklist in CONTRIBUTING
edvardm 47f1b45
refactor: test-all depends on test instead of duplicating pytest cmd
edvardm c4bfd6d
Update CONTRIBUTING.md
edvardm c062309
CR: pin python version
edvardm bb9ce2f
make note about invalid type
edvardm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Python Tests | ||
| env: | ||
| PYTHON: "3.11" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "ofd/**" | ||
| - "tests/**" | ||
| - "pyproject.toml" | ||
| - "uv.lock" | ||
| pull_request: | ||
| paths: | ||
| - "ofd/**" | ||
| - "tests/**" | ||
| - "pyproject.toml" | ||
| - "uv.lock" | ||
|
|
||
| jobs: | ||
| pytest: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: go-task/setup-task@v2 | ||
| with: | ||
| version: 3.x | ||
|
|
||
| - uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| enable-cache: true | ||
| python-version: ${{ env.PYTHON }} | ||
|
|
||
| - name: Run tests | ||
| run: task test | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,6 @@ dist/ | |
| .cache/ | ||
| .env | ||
| .task/ | ||
| htmlcov/ | ||
| .coverage | ||
| local/ | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Contributing (Developer Setup) | ||
|
|
||
| This guide is for developers working on the OFD codebase. For adding filament data, see the [main README](README.md). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **uv** — `curl -LsSf https://astral.sh/uv/install.sh | sh` or see [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/) | ||
| - **Node.js 22+** | ||
| - **Task** — `brew install go-task` or see [taskfile.dev/installation](https://taskfile.dev/installation/) | ||
|
|
||
| ## Bootstrap | ||
|
|
||
| ```sh | ||
| task setup # installs Python deps (uv) + WebUI deps (npm) | ||
| ``` | ||
|
|
||
| ## Common tasks | ||
|
|
||
| ```sh | ||
| task test # pytest | ||
| task test-all # pytest + Playwright E2E | ||
| task lint # ruff + svelte-check | ||
| task serve # start OFD API server | ||
| ``` | ||
|
|
||
| Run `task --list` for the full list. | ||
|
|
||
| ## Making a PR | ||
|
|
||
| Run `task check` before opening a pull request — it covers lint, data validation, and all tests in one go. | ||
|
|
||
| Keep each PR focused on a single logical change. Smaller, focused PRs are easier to review and less likely to conflict with concurrent work. | ||
|
edvardm marked this conversation as resolved.
|
||
|
|
||
| ## Frontend development | ||
|
|
||
| No need to install Task just to work on the frontend — npm scripts work directly: | ||
|
|
||
| ```sh | ||
| cd webui | ||
| npm run dev # dev server | ||
| npm test # Playwright E2E tests | ||
| npm run check # svelte-check type checking | ||
| npm run build # production build | ||
| ``` | ||
|
|
||
| > **Note:** The frontend currently uses npm directly. If we ever switch to a different package manager (bun, pnpm, etc.), adding a `Taskfile.yml` inside `webui/` would let all tooling and CI use `task` commands, making the package manager an implementation detail that only Taskfile needs to know about. | ||
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.