Repository navigation
perf: split scalar/literal v2 types and declare __lazy_modules__ for Python 3.15 - #8
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
==========================================
+ Coverage 90.11% 90.12% +0.01%
==========================================
Files 28 29 +1
Lines 6261 6271 +10
==========================================
+ Hits 5642 5652 +10
Misses 619 619 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracts all 161 pure scalar/
Literal/Annotated[scalar, Field(...)]type aliases from the generatedv2_protocol.pyinto a lightweight leaf modulecodexed.models.v2_typesand declares PEP 810__lazy_modules__in the barrel__init__.pyfiles.Changes
src/codexed/models/v2_types.py(22 KB, zeroBaseModels, zeromcpimports) and import them back intov2_protocol.py.schemez.split_scalar_type_aliases(from feat(code_generation): add split_scalar_type_aliases helper schemez#16) intoscripts/generate_codex_reference_models.pyand addschemezto thedevdependency group so future schema regenerations keepv2_types.pyin sync automatically.__lazy_modules__tocodexed/__init__.py,codexed/models/__init__.py, andcodexed/client/__init__.py, re-exporting scalar/literal aliases directly fromcodexed.models.v2_types/codexed.models.codex_types.tests/test_lazy_imports.pyverifying all public exports resolve and that importingPersonality/ReasoningEffort/SandboxModeon Python 3.15+ does not loadv2_protocol,codexed.client, ormcp.Python 3.15.2 cold import benchmarks (warm
.pyc, 3-run median)import codexedfrom codexed import Personality, ReasoningEffort, SandboxModepydantic; <5 ms whenpydanticis already loaded)