summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
blob: 4fb9e9ab80c55eddc72c91677a0af1120be12d02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1] - 2026-05-19

### Fixed
- `pyproject.toml` declared `pytest>=9.0.3` as a **runtime** dependency.
  `pip install pyvyos==0.4.0` therefore pulled pytest into every install.
  Removed; pytest is and was always meant to be a `dev` extra only.
  Runtime dependencies are now `requests>=2.32.0,<3.0` again — matching
  what the `0.4.0` CHANGELOG claimed.

## [0.4.0] - 2025-11-20

`0.4.0` is a cleanup and consolidation release. It is the first version
since `0.2.2` published to PyPI. The git tag `v0.4.0` previously pointed at
the intermediate refactor commit `6b4e901`; it has been moved to the
release commit that includes the cleanup described below.

This release **does not change HTTP payload generation or request/response
behavior**.

### Added
- `examples/basic.py` — runnable end-to-end usage example using the
  supported public API (`from pyvyos import VyDevice`).
- `pyvyos/py.typed` PEP 561 marker, advertising the package as typed.
- `.pre-commit-config.yaml` with neutral hooks (trailing whitespace,
  end-of-file fixer, YAML/TOML syntax check, large-file guard).
- GitHub Actions ecosystem entry in `.github/dependabot.yml` so workflow
  versions stay current.
- Documented public API stability and deprecation timeline in `README.md`.
- Opt-in live end-to-end harness under `tests/pve/` and `tests/e2e/`.
  Maintainers can ssh to a Proxmox host, build a VyOS template once,
  clone a disposable VM, and run a small live test suite against the
  real HTTPS API. Auto-skipped unless `PYVYOS_E2E=1`. Not part of CI.

### Changed
- `requires-python` lowered to `>=3.11` (was `>=3.13`). The codebase
  does not use any 3.13-only syntax, and the lower floor makes the
  package reachable for the typical VyOS automation environment. CI now
  validates against 3.11, 3.12, and 3.13.
- Runtime dependencies trimmed to `requests>=2.32.0,<3.0` only.
  - `python-dotenv` was never imported by the library itself — it is now
    a `dev` extra used by the bundled examples.
  - `urllib3` was never used directly by `pyvyos` — it stays available
    transitively through `requests`.
- `vagrant/` lab setup moved to `examples/vagrant/`.
- `pyvyos.core.*` is now the internal implementation layer; the supported
  public API is `from pyvyos import VyDevice, ApiResponse`. The legacy
  `pyvyos.device` and `pyvyos.rest` shims continue to work without
  warnings.
- `RestClient` logging is now plain and structured: command, op, status,
  elapsed milliseconds. No request-ID field.
- `pyproject.toml`:
  - declared the wheel package explicitly,
  - removed duplicated dependency blocks,
  - dropped the unused `validation` extra,
  - raised the pytest floor for Python 3.13.
- GitHub Actions bumped off Node.js 20 and pinned by full commit SHA
  (per [OpenSSF Scorecard guidance][1]) with a `# vX.Y.Z` comment so
  Dependabot can keep them current:
  `actions/checkout@v6.0.2`, `actions/setup-python@v6.2.0`,
  `astral-sh/setup-uv@v8.1.0`, `pypa/gh-action-pypi-publish@v1.14.0`.
  Pre-commit hooks bumped to `pre-commit/pre-commit-hooks@v6.0.0`.

[1]: https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies
- `.env.example` default flipped to `VYDEVICE_VERIFY_SSL=true`; commented
  with field descriptions.

### Removed
- Root-level stragglers: `CONTRIB.md` (superseded by `CONTRIBUTING.md`),
  `requirements.txt` (duplicated `[project].dependencies`), `test_quick.py`
  (ad-hoc smoke script, covered by `tests/test_shims.py`), and the
  committed `uv.lock` (not appropriate for a library; now gitignored).
- `pyvyos.specs` package (experimental Pydantic models). It was never
  imported by the runtime and had 0% test coverage. Pydantic is no longer
  an optional dependency.
- `pyvyos.exceptions` module (`SDKError`, `HttpError`, `ApiError`,
  `ValidationError`). The hierarchy was defined but never raised anywhere
  in the codebase. Error reporting continues through `ApiResponse.error`.
- `pyvyos.utils.ids.request_id` helper. The generated UUIDs were attached
  to log records but never propagated to callers — half-implemented
  tracing is worse than none. It will be reintroduced if and when real
  observability hooks land.
- `pyvyos.utils` no longer re-exports `request_id`.
- Obsolete tooling: `Makefile` (hard-coded `env/bin/python`),
  `run_tests.sh`, `run_tests.py`.
- Dead workflow `.github/workflows/python-app.yml` (Python 3.12, only ran
  flake8 with pytest commented out, referenced a non-existent
  `requirements.txt`).
- `sphinx/` source tree and `.readthedocs.yaml`: the RTD configuration
  pointed to `docs/source/conf.py` while the Sphinx tree lived under
  `sphinx/source/`, so the build never worked and no documentation was
  ever published. The hand-written Markdown docs under `docs/` are
  retained.
- Stale development notes under `docs/development/` (architecture,
  refactor roadmap, quality-and-utils) — they described the pre-cleanup
  proposal that included specs/exceptions/request_id.
- Tests for the removed modules (`tests/test_exceptions.py`,
  `tests/utils/test_ids.py`).

### Fixed
- `LICENSE` copyright now reads `2023 GravScale, Roberto Bertó`.
- `pyproject.toml` `[tool.pytest.ini_options].env` entries now use the
  `D:` (default) prefix so that operators running the live e2e harness
  can override `VYDEVICE_HOSTNAME` and friends from the shell. The
  previous values silently overwrote shell exports, making it look like
  e2e tests pointed at a stale `192.168.56.100`.

### Compatibility
- Public imports are unchanged:
  - `from pyvyos import VyDevice, ApiResponse`
  - `from pyvyos.device import VyDevice`
  - `from pyvyos.rest import RestClient, ApiResponse`
- HTTP payload generation is unchanged.
- Request and response behaviour is unchanged.
- No compatibility shim has been deprecated in this release.

### Notes
- This release prepares the project for the upcoming `0.5.x` work:
  contract tests for public payloads, fixes to the public method edges
  (`image_add`/`image_delete`, `timeout`, mutable defaults), stdlib-based
  validators, and a tidier internal core.

## [0.3.0] - 2024-XX-XX

Tagged in git but never published to PyPI. Released to PyPI as part of
`0.4.0`.

### Added
- Initial public release of the SDK structure.
- Core functionality for VyOS HTTPS API: configure, retrieve, show,
  generate, reset, config-file, reboot, poweroff, and image operations.

[Unreleased]: https://github.com/vyos-contrib/pyvyos/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/vyos-contrib/pyvyos/compare/v0.2.2...v0.4.0
[0.3.0]: https://github.com/vyos-contrib/pyvyos/releases/tag/v0.3.0