Repository navigation
refactor(model): remigrate webauth models into campus.model - #984
Merged
Merged
Conversation
Move HttpAuthProperty / HttpHeader / HttpHeaderWithAuth back into campus.model (as campus/model/http.py, re-exported via campus.model), restoring the pre-extraction API so the consumer layer and the SDK can share these classes without campus-core (#982, phase 3 prep for #970). - in-repo import sites switched directly: flask_campus/utils, webauth/http, tests/flask_test/{campus_request,json_client} - unit tests moved: tests/unit/webauth/test_header.py -> tests/unit/model/test_http.py - campus.webauth.models kept as a temporary compatibility shim that re-exports from campus.model: campus_python's json_client still imports the old path; the shim is removed in a follow-up PR once the SDK flips to campus.model and downstream locks catch up - docs updated: architecture.md (model section gains the header models), flask_campus/README.md import paths Refs #982 #970
- campus.webauth: description no longer claims to hold the models - campus.webauth.http: 'configs and models' -> schemes/config, with a pointer to the header representations' new campus.model home - campus.model: note the dict/str-based header exception to the dataclass convention Refs #982
This was referenced Oct 28, 2026
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.
Refs #982 (parent: #970, phase 3 prep). Coordination plan agreed on #982: copy-before-delete — this PR lands the new location with a compatibility shim; the SDK flip (campus-api-python) and the shim deletion follow as separate steps so CI and the weekly Railway autodeploy stay green throughout.
What
Move
HttpAuthProperty/HttpHeader/HttpHeaderWithAuthfromcampus/webauth/models/tocampus/model/http.py(the historical home), re-exported viacampus.model— restoring the pre-extractioncampus.model.HttpHeaderAPI. These are stdlib-only pure data classes that the consumer layer (flask_campus) and the SDK (campus_python) both need; they belong in the data-model layer so the planned campus-flask distribution needs only common + model, never core.campus/flask_campus/utils.py,campus/webauth/http/__init__.py,tests/flask_test/campus_request.py,tests/flask_test/json_client.py.tests/unit/webauth/test_header.py→tests/unit/model/test_http.py.campus.webauth.modelskept as a temporary shim re-exporting fromcampus.model. It exists solely for campus_python'sjson_client(import atcampus_python/json_client/__init__.py:18), whose lock still resolves a campus-suite commit without the new path. Follow-up PR (after the SDK import flips tocampus.modeland campus's SDK lock advances): delete the shim + dropmodelsfromcampus/webauth/__init__.py.modelstays allowed-dep{common}(http.py is stdlib-only);webauth → modelwas already a declared edge (SHARED_ALLOWED).Verification
campus.webauth.modelsruff check .: greenNext (per #982 coordination plan)
campus.model+poetry update campus-suitein the same PR.campus-api-pythonlock in the same PR (grep gate: zerowebauth.modelsimporters).