#153 - deprecate Know Your Class and Section feature - #154
Closed
ndigvijay wants to merge 2 commits into
Closed
Conversation
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.
📌 Description
This PR removes the deprecated
knowYourClassAndSectionfeature because the corresponding PESU Academy endpoint,/Academy/a/getStudentClassInfo, no longer works.The removal includes:
knowYourClassAndSectionfrom the authentication request schema.knowYourClassAndSectionfrom the authentication response schema.Requests containing
knowYourClassAndSectionare now treated like any other unknown request field and return a400validation response.🧱 Type of Change
requirements.txt,pyproject.toml🧪 How Has This Been Tested?
tests/unit/)tests/functional/)tests/integration/)Testing performed:
uv run pytest -m 'not secret_required'TEST_*credentials were unavailable.uv run ruff check .knowYourClassAndSectionis absent from both request and response models.✅ Checklist
scripts/run_tests.py)pre-commit run --all-files).envvars updated (if applicable)scripts/benchmark/benchmark_requests.py)🛠️ Affected API Behaviour
app/app.py– Modified/authenticateroute logicapp/pesu.py– Updated scraping or authentication handling🧩 Models
app/models/request.py– Input validation or request schema changesapp/models/response.py– Authentication response formattingapp/models/profile.py– Profile extraction logic🐳 DevOps & Config
Dockerfile– Changes to base image or build process.github/workflows/*.yaml– CI/CD pipeline or deployment updatespyproject.toml/requirements.txt– Dependency version changes.pre-commit-config.yaml– Linting or formatting hook changes📊 Benchmarks & Analysis
scripts/benchmark/benchmark_requests.py– Removed support for the deprecated request flagscripts/benchmark/analyze_benchmark.py– Benchmark result analysis changesscripts/run_tests.py– Custom test runner logic or behavior updates📸 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.