refactor(resources): one canonical layout, scoped bases, dedup schemas#55
Merged
Merged
Conversation
Implements plans/refactor/04-resource-layer-normalization.md: - Canonical per-resource layout everywhere: operations.py / schemas.py / resources.py. Renamed domain+usage manager.py and envVars/git/ landscape/logs models.py to resources.py; git schema.py -> schemas.py; deleted the zero-byte landscape/resources.py placeholder - envVars/ package renamed to env_vars/; the old camelCase import path remains as a deprecation shim module (warns, re-exports) - Domain entity moves to domain/schemas.py alongside its base (matching Team/Workspace); TeamDomainManager lives in domain/resources.py; domain/__init__.py gains proper re-exports - New TeamScopedResource / WorkspaceScopedResource bases in core/base.py replace six copy-pasted manager __init__s; managers expose team_id/workspace_id consistently - EnvVar derives from CamelModel like every other schema (gains to_dict/to_json/to_yaml) - PipelineStatusList is now an alias of ResourceList[PipelineStatus] instead of a reimplementation - PaginatedResponse: refresh() hoisted from the two response subclasses, limit/offset are non-Optional with defaults (drops the repeated 'or 25' re-defaulting); single _clamp_page_size helper replaces four inline min(max(...)) clamps - Deleted dead utils.dict_to_model_list Only internal module paths moved; all public re-exports (top-level codesphere, package __init__s) are unchanged, plus the envVars shim.
🛡️ Bandit Security Scan Results✅ No security issues found by Bandit. |
Integration Test Results63 tests 0 ✅ 10s ⏱️ For more details on these failures and errors, see this check. Results for commit 8c9f102. |
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.
Implements plans/refactor/04-resource-layer-normalization.md:
Only internal module paths moved; all public re-exports (top-level codesphere, package __init__s) are unchanged, plus the envVars shim.