Skip to content

Update documentation for public OAuth client#7

Merged
nycomp merged 4 commits into
mainfrom
bugfix/oauth-public-client-support
May 22, 2026
Merged

Update documentation for public OAuth client#7
nycomp merged 4 commits into
mainfrom
bugfix/oauth-public-client-support

Conversation

@nycomp
Copy link
Copy Markdown
Contributor

@nycomp nycomp commented May 21, 2026

Summary

This PR updates documentation for the public OAuth client (see nyjc-computing/campus#604) and fixes critical Windows compatibility issues.

Changes

Documentation Updates

  • Updated comments and documentation for public OAuth client support

Windows Compatibility Fixes

  • Added main.py workaround for Poetry Windows shim bug

    On Windows, Poetry generates broken .exe shims that hardcode from main import main
    instead of correctly parsing the entry point campus_cli.cli:app. This causes campus.exe
    to fail with ModuleNotFoundError: No module named main.

    The main.py file at the repository root exports the main() function from
    campus_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 main
    as a top-level module. Removing it will break the campus command on Windows.

  • Added smoke test for campus command

    Added test_campus_command_works() to verify the campus CLI can be invoked
    successfully 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.exe instead of non-existent poetry.exe).

Test Plan

  • Smoke tests pass (9/9 tests)
  • campus --help works on Windows
  • campus version command works
  • Git hooks (pre-commit, pre-push) execute successfully
  • Ruff linting passes

Related Issues

ngjunsiang and others added 4 commits May 21, 2026 15:52
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>
@nycomp nycomp merged commit 77c95c9 into main May 22, 2026
1 check passed
@nycomp nycomp deleted the bugfix/oauth-public-client-support branch May 22, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants