| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This PR removes the deprecated Know Your Class and Section (KYCAS) feature end-to-end from the PESUAuth API because the upstream PESU Academy endpoint no longer works, and updates tests/docs/tooling accordingly.
Changes:
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| tests/unit/test_request_model.py | Removes request-model tests that covered the now-removed KYCAS request flag; retains extra-field rejection coverage. |
| tests/unit/test_pesu.py | Drops unit tests and imports related to KYCAS fetch/parsing behavior; minor formatting tweaks. |
| tests/integration/test_app_integration.py | Removes integration coverage for KYCAS request/response behavior and validation. |
| tests/functional/test_authenticate_functional.py | Removes functional tests that exercised KYCAS behavior. |
| scripts/benchmark/util.py | Removes KYCAS payload flag from benchmark request construction. |
| scripts/benchmark/benchmark_requests.py | Removes KYCAS CLI flag and propagation into benchmark requests. |
| README.md | Removes KYCAS from API request/response documentation and examples. |
| app/pesu.py | Removes KYCAS constants and the KYCAS fetch path from authenticate(). |
| app/models/response.py | Removes the KYCAS field from the response schema. |
| app/models/request.py | Removes the KYCAS field from the request schema so it becomes a forbidden extra input. |
| app/models/kycas.py | Deletes the KYCAS response model. |
| app/models/init.py | Removes KYCAS model export from the models package. |
| app/exceptions/authentication.py | Removes the dedicated KYCAS fetch exception type. |
| app/docs/authenticate.py | Removes OpenAPI examples and error examples related to KYCAS. |
| app/app.py | Stops passing the removed KYCAS flag through the /authenticate route into PESUAcademy.authenticate(). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| | `fields` | Yes | `list[str]` | `None` | Which fields to fetch from the profile information. If not provided, all fields will be fetched | | ||
| | **Parameter** | **Optional** | **Type** | **Default** | **Description** | | ||
| | ------------- | ------------ | ----------- | ----------- | ----------------------------------------------------------------------------------------------- | | ||
| | `username` | No | `str` | | The user's SRN or PRN | |
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📌 Description
This PR removes the deprecated knowYourClassAndSection feature because the corresponding PESU Academy endpoint, /Academy/a/getStudentClassInfo, no longer works.
The removal includes:
Requests containing knowYourClassAndSection are now treated like any other unknown request field and return a 400 validation response.
🧱 Type of Change
🧪 How Has This Been Tested?
Testing performed:
✅ Checklist
🛠️ Affected API Behaviour
🧩 Models
🐳 DevOps & Config
📊 Benchmarks & Analysis
📸 Screenshots / API Demos
Example response when a client continues to send the removed field:
{ "status": false, "message": "Could not validate request data - body.knowYourClassAndSection: Extra inputs are not permitted" } The generated OpenAPI request and response schemas no longer include knowYourClassAndSection. 🧠 Additional Notes This is a breaking API change. Clients must remove knowYourClassAndSection from authentication requests and stop expecting it in authentication responses. Direct Python callers must also stop passing the know_your_class_and_section argument to PESUAcademy.authenticate(). The normal profile response continues to provide supported fields such as semester and section.