Files
omnigent-ai--omnigent/justfile
Zeyi (Rice) Fan 244ded1ed9 chore(deps): move development tooling to internal groups (#4626)
## Related issue

N/A

## Summary

The published `dev` extra mixed repository workflows with installable Omnigent capabilities. Move contributor-only dependencies to PEP 735 groups so package extras describe product functionality and CI installs only the workflow dependencies it executes.

- Replace the `dev` extra with local-only `lint`, `test`, and aggregate `dev` groups; configure no default groups so plain `uv sync` matches the published base package.
- Remove the retired mypy dependency/configuration, `types-PyYAML`, the orphaned `pathspec` declaration, and the duplicate `filelock` declaration.
- Migrate workflows, actions, contributor commands, tests, and development skills from `--extra dev` to the smallest required group, or no group for application/benchmark jobs.
- Compose Pyrefly's lint environment from the `lint` group plus the existing `hindsight`, `nimble`, `s3`, and `tracing` capability extras. Remove the OpenTelemetry missing-import configuration and Nimble's inline missing-import suppression so real package types remain checked.
- Update OpenShell, e2e, browser-test, Slack, and implementation-plan commands to compose capability extras with repository groups explicitly. Document why read-only/tools-less agent workflows intentionally keep runtime-only environments.
- Avoid `--all-extras`: it resolves but selects 240 product packages, including unrelated large/native integrations. Keep capability ownership explicit instead.

ELI5: product features remain extras users can install; lint and test toolboxes become private repository groups that never appear in the wheel.

```text
published wheel: base + capability extras
repository:      lint group | test group | dev = lint + test
CI lint:         lint + explicitly type-checked capability extras
```

## Test Plan

- `uv lock && just normalize-locks`
- Built the wheel and verified its metadata contains no `dev` extra or lint/test dependencies.
- Verified a fresh base environment imports Omnigent, excludes lint/test/pathspec packages, and imports each release benchmark script.
- `uv run --isolated --frozen --group lint --extra hindsight --extra nimble --extra s3 --extra tracing pre-commit run pyrefly --all-files`
- `uv run --isolated --frozen --group lint python scripts/gen_routing_pb2.py --check`
- Verified isolated `test` and aggregate `dev` group membership independently.
- `uv run --isolated --frozen --group test pytest tests/tools/builtins/test_hindsight.py tests/tools/builtins/test_nimble_research.py tests/stores/test_s3_artifact_store.py tests/db/test_d1_fts_dialect.py -q` (172 passed)
- `uv run --isolated --frozen --group test --extra tracing pytest tests/runtime/test_telemetry.py tests/inner/test_tracing_genai_semconv.py -q` (69 passed)
- `uv run --isolated --frozen --extra openshell --group test pytest tests/onboarding/sandboxes/test_openshell.py tests/server/test_managed_hosts.py -q` (259 passed)
- Verified load-test modules import with only `loadtest` and `agents-sdk` extras.
- Ran the exact locked lint sync against PyPI and Pyrefly passed.
- Rebased onto current `origin/main`; migrated the newly added compatibility-smoke test actions and host benchmark workflow.
- Surveyed all tracked uv install/run commands and removed every remaining published-`dev`/implicit-tooling command. Verified the documented e2e and Slack environments and collected the Kimi/live-DDG tests in fresh group-selected environments.
- `uv run --frozen pre-commit run --all-files`

## Demo

N/A — dependency metadata and CI configuration only.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [ ] UI / frontend change
- [x] Refactor / chore
- [ ] Docs
- [ ] Test / CI
- [ ] Breaking change

## Test coverage

- [ ] Unit tests added / updated
- [ ] Integration tests added / updated
- [ ] E2E tests added / updated
- [x] Manual verification completed
- [x] Existing tests cover this change
- [ ] Not applicable

## Coverage notes

Fresh isolated environments validated the base, lint, test, aggregate dev, tracing-test, and load-test dependency boundaries. Focused tests prove retained optional clients are genuine test runtimes, while wheel inspection proves repository groups are not published.

Signed-off-by: Zeyi (Rice) Fan <zeyi.f@databricks.com>
2026-08-13 18:00:38 -07:00

112 lines
2.4 KiB
Makefile

default:
@just --list
export FASTLANE_SKIP_UPDATE_CHECK := "1"
# iOS device override (default: iPhone 17 Pro)
DEVICE := env("OMNIGENT_IOS_SIMULATOR", "iPhone 17 Pro")
# --- uv Python env ---
_check-uv:
uv run --no-sync ruff --version
uv run --no-sync pyrefly --version
uv run --no-sync pre-commit --version
_ensure-uv:
uv sync --extra all --group dev
# --- iOS Ruby dependencies ---
_check-ios:
cd web/ios && bundle check
_ensure-ios:
cd web/ios && (bundle check || bundle install)
# --- omnidev Rust dev tool ---
_install-omnidev:
cargo install --path dev/omnidev --locked --force
_check-omnidev:
command -v omnidev >/dev/null 2>&1
_ensure-omnidev:
command -v omnidev >/dev/null 2>&1 || just _install-omnidev
# --- Aggregate setup checks / installs ---
[group('setup')]
check: _check-uv _check-ios _check-omnidev
[group('setup')]
ensure: _ensure-uv _ensure-ios _ensure-omnidev
# --- Local dev ---
[group('dev')]
dev: _ensure-omnidev
omnidev
[group('dev')]
dev-mobile: _ensure-omnidev
omnidev --vite-host 0.0.0.0 --trust-lan-origins
# --- Mobile builds ---
[group('mobile')]
run-ios: _ensure-ios
cd web/ios && bundle exec fastlane simulator device:"{{ DEVICE }}"
[group('mobile')]
run-android:
cd web/android && ./gradlew installDebug runDebug
[group('mobile')]
android-reverse:
cd web/android && ./gradlew reverseProxy
# --- Electron desktop app ---
_ensure-web:
cd web && test -d node_modules || pnpm install
_ensure-electron:
cd web/electron && test -d node_modules || pnpm install
[group('electron')]
electron-dev: _ensure-web _ensure-electron
pnpm --filter web/electron run dev
[group('electron')]
electron-build: _ensure-web _ensure-electron
pnpm --filter web/electron run build
# --- Lint ---
[group('lint')]
lint: _ensure-uv
uv run --no-sync pre-commit run
[group('lint')]
lint-all: _ensure-uv
uv run --no-sync pre-commit run --all-files
[group('lint')]
typecheck-python: _ensure-uv
uv run --no-sync pyrefly check
[group('lint')]
lint-ts:
pnpm install --frozen-lockfile --filter web --filter omnigent-vscode
pnpm --filter web run lint
pnpm --filter web run type-check
pnpm --filter omnigent-vscode run type-check
# --- Lockfile maintenance ---
[group('lint')]
normalize-locks: _ensure-uv
uv run --no-sync scripts/normalize_uv_lock_registry.py uv.lock || true