Update documentation for public OAuth client#7
Merged
Conversation
Update comments to reflect that the "guest" client is now a proper database entry with is_public=True, rather than a special case that doesn't require database entry. Related: #603 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This fixes the broken campus.exe on Windows caused by Poetry generating incorrect shims that try to import from 'main' instead of the actual entry point 'campus_cli.cli:app'. Also adds a smoke test to ensure the campus command works after install, documenting the importance of testing on Windows due to Poetry's known shim generation bugs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
This PR updates documentation for the public OAuth client (see nyjc-computing/campus#604) and fixes critical Windows compatibility issues.
Changes
Documentation Updates
Windows Compatibility Fixes
Added
main.pyworkaround for Poetry Windows shim bugOn Windows, Poetry generates broken
.exeshims that hardcodefrom main import maininstead of correctly parsing the entry point
campus_cli.cli:app. This causescampus.exeto fail with
ModuleNotFoundError: No module named main.The
main.pyfile at the repository root exports themain()function fromcampus_cli.cli, allowing the Poetry-generated shim to work correctly on Windows.Note: This file must remain at the repository root as the shim looks for
mainas a top-level module. Removing it will break the
campuscommand on Windows.Added smoke test for campus command
Added
test_campus_command_works()to verify the campus CLI can be invokedsuccessfully after installation. This test is especially important on Windows
due to Poetry's known shim generation bugs.
Fixed git hooks for Windows
Updated pre-commit and pre-push hooks to use correct Python paths
(
.venv/Scripts/python.exeinstead of non-existentpoetry.exe).Test Plan
campus --helpworks on Windowscampus versioncommand worksRelated Issues