diff options
| author | Roberto Bertó <463349+robertoberto@users.noreply.github.com> | 2026-05-19 02:35:08 +0000 |
|---|---|---|
| committer | Roberto Bertó <463349+robertoberto@users.noreply.github.com> | 2026-05-19 02:35:08 +0000 |
| commit | ea8c349f6dce955696850198b8544d0203b467fb (patch) | |
| tree | 856102b7a4c30c79434d521b9852bef1c055ce09 /docs/development/refactor-roadmap.md | |
| parent | 0f76bcc7179976e893b1d9f296b1b1e7988b0031 (diff) | |
| download | pyvyos-ea8c349f6dce955696850198b8544d0203b467fb.tar.gz pyvyos-ea8c349f6dce955696850198b8544d0203b467fb.zip | |
chore: clean packaging and development tooling
This commit modernizes the project's tooling and packaging without
changing the runtime code. It addresses dead workflows, obsolete
helper scripts, duplicated configuration, and stale developer docs.
Removed:
- .github/workflows/python-app.yml: targeted Python 3.12, referenced a
non-existent requirements.txt, ran only flake8 with pytest commented out
- Makefile: hard-coded env/bin/python paths that do not work with uv
- run_tests.sh and run_tests.py: duplicated each other and referenced
removed modules (test_exceptions, test_quick)
- sphinx/ and .readthedocs.yaml: the RTD config pointed to
docs/source/conf.py while the sphinx tree lived under sphinx/source,
so the build never worked and no docs were ever published
- docs/development/architecture.md, refactor-roadmap.md, and
quality-and-utils.md: described the pre-cleanup proposal that
included specs/exceptions/request_id, now contradicted by the code
Edited:
- pyproject.toml:
- dropped the validation extra (Pydantic) — specs/ is gone
- dropped the duplicated [tool.hatch.metadata].dependencies block
- dropped the duplicated [dependency-groups].dev block
- declared the wheel package explicitly via
[tool.hatch.build.targets.wheel].packages
- bumped pytest floor to >=8.0 (Python 3.13 compatible)
- added richer classifiers (Development Status, audience, topic,
Typing :: Typed), keywords, license file pointer, and a Changelog URL
- .github/workflows/python-pr-validation.yml: upgraded to
actions/checkout@v4 and setup-python@v5, switched to astral-sh/setup-uv,
removed obsolete architecture argument
- .github/dependabot.yml: added the github-actions ecosystem so
workflow versions stay current
Added:
- pyvyos/py.typed: PEP 561 marker advertising the package as typed
- .pre-commit-config.yaml: neutral hooks only (whitespace, EOF, YAML/TOML
syntax, large-file guard); no formatters or linters yet
Kept:
- docs/development/vyos_api/: JSON reference for the VyOS HTTPS API,
useful for future contract tests
Tests still pass: 57/57.
Diffstat (limited to 'docs/development/refactor-roadmap.md')
| -rw-r--r-- | docs/development/refactor-roadmap.md | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/docs/development/refactor-roadmap.md b/docs/development/refactor-roadmap.md deleted file mode 100644 index eeee879..0000000 --- a/docs/development/refactor-roadmap.md +++ /dev/null @@ -1,56 +0,0 @@ -# Refactor Roadmap (Prioritized) - -## Priorities -- P0 (now): safety, compatibility, correctness -- P1 (next): validation, observability, developer UX -- P2 (later): performance, async, resiliency - -## P0 — Immediate -- Stabilize transport: keep `_get_payload(include_empty_path)`; special-case `config-file` -- Keep shims: `pyvyos/device.py` and `pyvyos/rest.py` re-export from `pyvyos/core/*` -- Typed exceptions: introduce `SDKError`, `HttpError`, `ApiError`, `ValidationError` -- Timeouts: ensure sane defaults, expose in `VyDevice` -- Logging: centralize in transport, structured key fields (op, command, status) -- Tests: payload assertions for `config-file` (path: []), regression for others -- Docs: architecture and path rules (done) - -## P1 — Short Term -- Specs (optional): Pydantic models in `pyvyos/specs/commands/*` -- `utils/`: path builders, request_id, safe_json redaction -- Deprecation policy: note in README; warn on internal imports (future only) -- CI: test matrix (Python 3.13), codecov, lint (ruff/flake8), type-check (pyright/mypy) -- Release: conventional commits + CHANGELOG; ensure tags push -- Docs: contributor guide, release playbook (short) - -## P2 — Medium Term -- Async client: `AsyncRestClient` (aiohttp/httpx), opt-in -- Retries & backoff: idempotent ops only; circuit-breaker (future) -- Rate limiting: client-side token bucket (opt-in) -- Caching: read-only `show/retrieve` (TTL) optional -- Batch ops: smarter `configure_multiple_op` planning - -## Migration & Compatibility -- Public API: `from pyvyos import VyDevice, ApiResponse` (stable) -- Internal: prefer `pyvyos.core.*` for new code -- Shims stay until 1.0.0; removal at next major only - -## Testing Plan -- Unit: transport (errors, timeouts), domain (paths) -- Contract: sample JSON fixtures per command -- E2E: optional job against a test VyOS (gated, non-blocking) - -## Release Flow (lean) -- Branch: feature → PR → squash merge -- Pre-release (optional): `-rcX` tags -- Tag + publish: GitHub Action (uv build + PyPI publish) - -## Risks & Mitigations -- Hidden breakages → keep shims, add regression tests -- API drift (VyOS) → specs folder eases updates -- Logging noise → default INFO; debug gated via env -- Security → default `verify=True`, redact secrets in logs - -## Success Criteria -- 0.3.x users unaffected -- New structure adopted by contributors -- Lower maintenance overhead (fewer regressions) |
