Repository navigation
feat: add deprecation notices to SDK, CLI, Launchpad and docs - #734
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5e44238 to
a693c28
Compare
|
Claude finished @olivermeyer's task in 5m 56s —— View job PR Review Complete ✅Comprehensive review of deprecation notices implementation for PYSDK-154. ✅ Critical Checks - All Passed1. Test Markers ✅All new tests have proper category markers:
Verified with: 2. Code Quality ✅make lint → All checks passed
✅ ruff check
✅ ruff format
✅ pyright (0 errors, 0 warnings)
✅ mypy (Success: no issues found)Minor: One warning about invalid noqa directive in 3. Conventional Commits ✅All 7 commits follow the required format: 4. Test Coverage ✅Excellent test coverage for all new functionality:
🎯 Architecture Compliance ReviewExcellent Implementation ✅Single Source of Truth: # src/aignostics/constants.py
DEPRECATION_NOTICE = (
"The Aignostics Python SDK is deprecated. Support ends on April 30, 2027. "
"After that date, the repository and the PyPI project are archived and get no updates. "
f"Use the Aignostics Platform REST API ({PLATFORM_API_DOCS_URL}) or the Console ({CONSOLE_URL})."
)All surfaces correctly reference this constant - no text duplication. ✅ Surfaces Covered:
CLI Implementation Deep Dive 🔍The CLI implementation is particularly clever: Problem: Need to show deprecation notice on stderr but NOT break JSON parsers that read stderr for error objects. Solution: Custom class _RootGroup(TyperGroup):
def parse_args(self, ctx: Any, args: list[str]) -> list[str]:
ctx.meta[_JSON_OUTPUT_REQUESTED] = _requests_json_output(args)
return super().parse_args(ctx, args)Then skip notice if JSON requested: def _print_deprecation_notice(ctx: typer.Context) -> None:
if ctx.meta.get(_JSON_OUTPUT_REQUESTED, False):
return
typer.secho(DEPRECATION_NOTICE, err=True, fg=typer.colors.YELLOW)This preserves backward compatibility for JSON consumers. ✅ 📝 Suggestions (Non-Blocking)1. CLI Argument Detection RobustnessFile: The def _requests_json_output(args: list[str]) -> bool:
return "--format=json" in args or any(
arg == "--format" and value == "json"
for arg, value in pairwise(args)
)Edge cases not handled (likely irrelevant in practice):
Recommendation: Current implementation is fine for real-world usage. Click/Typer will error on malformed arguments anyway. 2. Add Inline DocumentationFile: The class _RootGroup(TyperGroup):
"""Root command group that records if the command arguments request JSON output.
Click empties ``ctx.args`` before it calls the root callback. So the group records the
decision in ``ctx.meta`` while it parses the arguments.
"""Update: I see this comment is already in the docstring! ✅ No action needed. 3. Test Coverage Edge CaseConsider adding a test for @pytest.mark.integration
def test_cli_format_flag_without_value_shows_notice(runner: CliRunner) -> None:
"""Check that an incomplete --format flag still shows the deprecation notice."""
result = runner.invoke(cli, ["application", "--format"])
# Should fail on missing value but notice should appear
assert result.exit_code != 0
assert DEPRECATION_NOTICE in normalize_output(result.stderr)This is not blocking - just defensive. 🔒 Security & ComplianceMedical Device Considerations ✅
Deprecation Best Practices ✅
📚 Documentation QualityComprehensive Coverage ✅CLAUDE.md updated with:
CONTRIBUTING.md updated with:
README.md updated with:
Docs site (
🧪 Test Quality AssessmentNew Tests Added: 11 tests across 4 filesCoverage breakdown:
Test Quality: All tests are well-structured, properly marked, have descriptive names, and test one thing. Subprocess tests properly isolate environment. ✅ 🚀 CI/CD StatusCurrent CI pipeline: In Progress
The PR has 🎨 Code Style & QualityStrengths:
Consistency with Codebase:
🔍 Breaking Changes AnalysisNo breaking changes ✅ What's preserved:
What's added (non-breaking):
📊 Impact AssessmentFiles Changed: 22 files (+428/-10 lines) Change Distribution:
Risk Level: Low
🏆 What's Excellent About This PR
Final SummaryThis PR implements SDK deprecation notices across all user-facing surfaces (library, CLI, GUI, docs) with:
Suggested improvements are minor and non-blocking. This is production-ready. Verdict: ✅ claude:review:passed |
Codecov Report✅ All modified and coverable lines are covered by tests.
|
arne-aignx
left a comment
There was a problem hiding this comment.
Leaving my general comments instead of commenting the code 1 by 1.
The CLI is a bit spammy, when I launch launchpad:
~/Projects/python-sdk (feat/PYSDK-154-deprecation-release ✔) uv run aignostics launchpad
2026-10-12 13:31:56 | 4593 | WARNING | aignostics:<module>:49 | The Aignostics Python SDK is deprecated. Support ends on April 30, 2027. After that date, the repository and the PyPI project are archived and get no updates. Use the Aignostics Platform REST API (https://platform.aignostics.com/api/v1/docs) or the Console (https://platform.aignostics.com). | {'__project__name__': 'aignostics'}
The Aignostics Python SDK is deprecated. Support ends on April 30, 2027. After that date, the repository and the PyPI project are archived and get no updates. Use the Aignostics Platform REST API (https://platform.aignostics.com/api/v1/docs) or the Console (https://platform.aignostics.com).
2026-10-12 13:31:58 | 4688 | WARNING | aignostics:<module>:49 | The Aignostics Python SDK is deprecated. Support ends on April 30, 2027. After that date, the repository and the PyPI project are archived and get no updates. Use the Aignostics Platform REST API (https://platform.aignostics.com/api/v1/docs) or the Console (https://platform.aignostics.com). | {'__project__name__': 'aignostics'}
Using `create_lazy(coroutine=...)` is deprecated and will be removed in NiceGUI 4.0. Use `create_lazy(awaitable=...)` instead.
2026-10-12 13:32:02 | 4721 | WARNING | aignostics:<module>:49 | The Aignostics Python SDK is deprecated. Support ends on April 30, 2027. After that date, the repository and the PyPI project are archived and get no updates. Use the Aignostics Platform REST API (https://platform.aignostics.com/api/v1/docs) or the Console (https://platform.aignostics.com). | {'__project__name__': 'aignostics'}
Also do we want to extend After that date, the repository and the PyPI project are archived and get no updates. by Starting <replace-with-next-release-date> updates are limitted to security updates.?
|
@arne-aignx addressed both points:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CLI now writes a notice to stderr, and CliRunner's result.output mixes stdout and stderr. Compare only stdout for the empty config values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22af85f to
f87508b
Compare
|



Why?
The Python SDK is deprecated (PYSDK-154). Support ends on April 30, 2027, and then the repo and the PyPI project get archived. Users need to see this wherever they use the SDK, with a pointer to the Platform REST API or the Console.
How?
aignostics.constants.DEPRECATION_NOTICEfeeds a log warning on import, a stderr line in the CLI, a Launchpad banner and a Read the Docs banner. The README gets the notice and a migration table, CONTRIBUTING.md gets the maintenance rules, and library users also get aFutureWarning. The CLI skips its stderr line with--format json, because some commands write JSON errors to stderr that callers parse.🤖 Generated with Claude Code