From 15c3cd43f9745556bc3ffbb6ce83bf792ac01b9c Mon Sep 17 00:00:00 2001 From: Devin Slick Date: Sat, 22 Nov 2025 13:00:59 -0600 Subject: [PATCH 1/2] Correcting release notes and updating to v2.0.6 --- docs/release/v2.0.5_release_notes.md | 23 ++++++++++++++++++ .../v2.0.0.md} | 0 docs/{release => release_notes}/v2.0.4.md | 0 docs/release_notes/v2.0.5.md | 24 +++++++++++++++++++ docs/release_notes/v2.0.6.md | 23 ++++++++++++++++++ pyproject.toml | 2 +- 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 docs/release/v2.0.5_release_notes.md rename docs/{release/v2.0.0_merge_request.md => release_notes/v2.0.0.md} (100%) rename docs/{release => release_notes}/v2.0.4.md (100%) create mode 100644 docs/release_notes/v2.0.5.md create mode 100644 docs/release_notes/v2.0.6.md diff --git a/docs/release/v2.0.5_release_notes.md b/docs/release/v2.0.5_release_notes.md new file mode 100644 index 0000000..c8f0f84 --- /dev/null +++ b/docs/release/v2.0.5_release_notes.md @@ -0,0 +1,23 @@ +# 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, 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 +- **Coverage Boost**: Increased overall test coverage to **99%**. +- **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 +- 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.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/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..d56d4b4 --- /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 **99%**. +- **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..9fd1d05 --- /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 significantly improved 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 +- **Coverage Boost**: Increased overall test coverage to **99%**. +- **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 +- 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.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/pyproject.toml b/pyproject.toml index 0554401..acfe800 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fmd_api" -version = "2.0.5" +version = "2.0.6" authors = [{name = "devinslick"}] description = "A Python client for the FMD (Find My Device) server API" readme = "README.md" From de9cd6816718a1ef24c5b0baabb62fcd8bb75119 Mon Sep 17 00:00:00 2001 From: Devin Slick Date: Sat, 22 Nov 2025 13:16:03 -0600 Subject: [PATCH 2/2] Consolidate release notes --- docs/release/v2.0.5.md | 53 ---------------------------- docs/release/v2.0.5_release_notes.md | 23 ------------ docs/release_notes/v2.0.5.md | 2 +- docs/release_notes/v2.0.6.md | 8 ++--- 4 files changed, 5 insertions(+), 81 deletions(-) delete mode 100644 docs/release/v2.0.5.md delete mode 100644 docs/release/v2.0.5_release_notes.md 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.5_release_notes.md b/docs/release/v2.0.5_release_notes.md deleted file mode 100644 index c8f0f84..0000000 --- a/docs/release/v2.0.5_release_notes.md +++ /dev/null @@ -1,23 +0,0 @@ -# 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, 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 -- **Coverage Boost**: Increased overall test coverage to **99%**. -- **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 -- 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.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.5.md b/docs/release_notes/v2.0.5.md index d56d4b4..543ef8c 100644 --- a/docs/release_notes/v2.0.5.md +++ b/docs/release_notes/v2.0.5.md @@ -11,7 +11,7 @@ This release focuses on code quality, stability, and developer experience. We ha - **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 **99%**. +- **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. diff --git a/docs/release_notes/v2.0.6.md b/docs/release_notes/v2.0.6.md index 9fd1d05..301be8a 100644 --- a/docs/release_notes/v2.0.6.md +++ b/docs/release_notes/v2.0.6.md @@ -1,7 +1,7 @@ # 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 significantly improved test coverage, ensuring robust handling of edge cases and deprecated methods. +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 @@ -11,13 +11,13 @@ This release focuses on code quality, stability, and developer experience. We ha - **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 **99%**. +- **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 -- Added `docs/strict_typing_enforcement_plan.md` outlining the roadmap for maintaining type safety. +- **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.4. No code changes are required for consumers, though you may notice improved type checking results if you use `mypy` in your own projects. +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.