diff --git a/docs/release/v2.0.5.md b/docs/release/v2.0.5.md deleted file mode 100644 index 9c10d57..0000000 --- a/docs/release/v2.0.5.md +++ /dev/null @@ -1,53 +0,0 @@ -# Release notes โ€” v2.0.5 - -Released: 2025-11-21 - -This release focuses on two related improvements: full strict typing for the codebase -and a clearer, more strongly-typed picture API. Important: this release removes several -deprecated compatibility wrappers from the Device API โ€” this is a breaking change. - -Highlights -- Enforced strict typing across the entire repository - - `mypy` is now run in strict mode over the whole project (tests included). - - Many modules were updated with concrete, well-named type aliases and TypedDicts. - - New `fmd_api/types.py` centralizes JSON/response types and the new `PictureMetadata` TypedDict. - - Fixes were applied across the package to remove runtime Any usages and ensure - proper return annotations and runtime narrowing where needed. - -- Device picture APIs improved - - New method: `Device.get_picture_metadata(num_to_get: int = -1) -> List[PictureMetadata]` - - Returns only dict-like metadata entries (e.g., id, date, filename, size) when the - server exposes them. - - IMPORTANT: To remove historical ambiguity and simplify the public surface, this - release removes the old backward-compatible wrappers: `fetch_pictures()`, - `get_pictures()`, `download_photo()`, `get_picture()`, `take_front_photo()`, - and `take_rear_photo()` are no longer available. Calls must be migrated to the - canonical APIs: `get_picture_blobs()`, `decode_picture()`, `take_front_picture()`, - and `take_rear_picture()`. - - Tests updated and added to assert both behaviors (raw blobs preserved, metadata filtered). - -Why this change? -- Strict typing improves long-term maintainability, reduces runtime bugs, and gives - contributors and users better IDE/typing support. -- The new `get_picture_metadata` method makes it convenient to work with structured - metadata where available while preserving raw data semantics for older servers and - decoding use-cases. - -Notes for integrators (breaking change) -- Removed APIs: `Device.fetch_pictures`, `Device.get_pictures`, `Device.download_photo`, - `Device.get_picture`, `Device.take_front_photo`, `Device.take_rear_photo` have been removed in v2.0.5. -- Migration: - - Replace `fetch_pictures()` / `get_pictures()` -> `get_picture_blobs()` - - Replace `download_photo()` / `get_picture()` -> `decode_picture()` - - Replace `take_front_photo()` -> `take_front_picture()` and `take_rear_photo()` -> `take_rear_picture()` - - If your code depended on these wrappers for deprecated warning behavior, remove that handling. - -If you were relying on `get_picture_blobs` returning only dicts, use `get_picture_metadata()` to receive -only metadata entries (dicts) where available. - -Migration -- No breaking API changes. Prefer `get_picture_metadata` where you only need metadata. - -Acknowledgements -- Thanks to the CI and test suite updates which made enforcing strict typing and landing - these changes safe across the codebase. diff --git a/docs/release/v2.0.0_merge_request.md b/docs/release_notes/v2.0.0.md similarity index 100% rename from docs/release/v2.0.0_merge_request.md rename to docs/release_notes/v2.0.0.md diff --git a/docs/release/v2.0.4.md b/docs/release_notes/v2.0.4.md similarity index 100% rename from docs/release/v2.0.4.md rename to docs/release_notes/v2.0.4.md diff --git a/docs/release_notes/v2.0.5.md b/docs/release_notes/v2.0.5.md new file mode 100644 index 0000000..543ef8c --- /dev/null +++ b/docs/release_notes/v2.0.5.md @@ -0,0 +1,24 @@ +# Release v2.0.5 + +## Overview +This release focuses on code quality, stability, and developer experience. We have implemented Phase 1 of our Strict Typing Enforcement Plan, ensuring the core library is fully type-safe. Additionally, we have significantly improved test coverage and updated documentation. + +## Key Changes + +### ๐Ÿ›ก๏ธ Strict Typing (Phase 1) +- **Full Type Safety**: The `fmd_api` core library (`client.py`, `device.py`, `models.py`) now passes strict `mypy` checks. +- **Improved Signatures**: Public methods now have precise return types and generic type hints (e.g., `List[Dict[str, Any]]`), improving IDE autocompletion and static analysis for consumers. +- **Configuration**: Updated `pyproject.toml` to enforce strict typing rules (disallowing untyped definitions and implicit optionals). + +### ๐Ÿงช Test Coverage Improvements +- **Coverage Boost**: Increased overall test coverage to **97%**. +- **Edge Case Handling**: Added comprehensive tests for `Location` parsing, including scenarios with missing dates or invalid inputs. +- **Deprecation Verification**: Added specific tests to ensure deprecated methods in `Device` (like `take_front_photo`, `fetch_pictures`) continue to function correctly while emitting appropriate warnings. +- **Command Sanitization**: Verified that `Device.lock()` correctly sanitizes and truncates messages. + +### ๐Ÿ“š Documentation +- **Roadmap**: Added `docs/strict_typing_enforcement_plan.md` outlining the roadmap for maintaining type safety. +- **Community Updates**: Updated the community instance URL in `README.md` to point to the new server location (https://server.fmd-foss.org/). + +## Upgrade Guide +This release is fully backward compatible with v2.0.4. No code changes are required for consumers, though you may notice improved type checking results if you use `mypy` in your own projects. diff --git a/docs/release_notes/v2.0.6.md b/docs/release_notes/v2.0.6.md new file mode 100644 index 0000000..301be8a --- /dev/null +++ b/docs/release_notes/v2.0.6.md @@ -0,0 +1,23 @@ +# Release v2.0.6 + +## Overview +This release focuses on code quality, stability, and developer experience. We have implemented Phase 1 of our Strict Typing Enforcement Plan, ensuring the core library is fully type-safe. Additionally, we have achieved **100% test coverage**, ensuring robust handling of edge cases and deprecated methods. + +## Key Changes + +### ๐Ÿ›ก๏ธ Strict Typing (Phase 1) +- **Full Type Safety**: The `fmd_api` core library (`client.py`, `device.py`, `models.py`) now passes strict `mypy` checks. +- **Improved Signatures**: Public methods now have precise return types and generic type hints (e.g., `List[Dict[str, Any]]`), improving IDE autocompletion and static analysis for consumers. +- **Configuration**: Updated `pyproject.toml` to enforce strict typing rules (disallowing untyped definitions and implicit optionals). + +### ๐Ÿงช Test Coverage Improvements +- **Full Coverage**: Increased overall test coverage to **100%**. +- **Edge Case Handling**: Added comprehensive tests for `Location` parsing, including scenarios with missing dates or invalid inputs. +- **Deprecation Verification**: Added specific tests to ensure deprecated methods in `Device` (like `take_front_photo`, `fetch_pictures`) continue to function correctly while emitting appropriate warnings. +- **Command Sanitization**: Verified that `Device.lock()` correctly sanitizes and truncates messages. + +### ๐Ÿ“š Documentation +- **Roadmap**: Added `docs/strict_typing_enforcement_plan.md` outlining the roadmap for maintaining type safety. + +## Upgrade Guide +This release is fully backward compatible with v2.0.5. No code changes are required for consumers, though you may notice improved type checking results if you use `mypy` in your own projects.