How manoj8374/polygon-migration-assignment works
Polygon Migration is a staff-facing Django app that fetches competitive-programming problems from Polygon, persists problem and test descriptions in PostgreSQL, and uploads full test files to S3 or Azure. The principal workflow runs through the problems view: fetch and display, save problem metadata, save test descriptions, then upload files. The README also documents staff email login, cached Polygon tests, and optional custom-checker compilation. Some source excerpts are partial, so unsampled internals are represented only where the README documents their role.
Main entry points: views.py Migration workflow · polygon_api.py Polygon client · base.py Storage interface · __init__.py Storage selector
Components 19
Staff access
- Migration page
PolygonMigration/problems/templates/problems/index.html - Email login
PolygonMigration/users/views.py - Staff accounts
PolygonMigration/users/models.py
Problem migration
- Migration workflow
PolygonMigration/problems/views.py - Polygon client
PolygonMigration/problems/polygon_api.py - Test cache
- Checker handling
PolygonMigration/problems/polygon_api.py
Database records
- Problem and tags
PolygonMigration/problems/models.py - Test descriptions
PolygonMigration/problems/models.py - Topic model
PolygonMigration/contents/models.py
Cloud file storage
- Storage selector
PolygonMigration/problems/storage/__init__.py - Storage interface
PolygonMigration/problems/storage/base.py - S3 backend
PolygonMigration/problems/storage/s3.py - Azure backend
PolygonMigration/problems/storage/azure.py - Azure client setup
PolygonMigration/problems/AzureTestcase.py
Other components
- Staff user
- Polygon API
- PostgreSQL
- S3 or Azure
Connections 25
- Staff user → Email login: signs in
README.md - Email login → Staff accounts: authenticates
PolygonMigration/users/views.py - Email login → Migration page: redirects to
PolygonMigration/users/views.py - Staff user → Migration page: uses
README.md - Migration page → Migration workflow: posts actions
README.md - Migration workflow → Polygon client: fetches problem
PolygonMigration/problems/views.py - Polygon client → Polygon API: requests packages
README.md - Polygon client → Test cache: caches tests
README.md - Migration workflow → Problem and tags: saves problem
PolygonMigration/problems/views.py - Migration workflow → Test descriptions: saves tests
PolygonMigration/problems/views.py - Problem and tags → PostgreSQL: persists records
README.md - Test descriptions → PostgreSQL: persists records
README.md - Migration workflow → Storage selector: selects storage
PolygonMigration/problems/views.py - Storage selector → Storage interface: returns backend
PolygonMigration/problems/storage/__init__.py - Storage selector → S3 backend: selects provider
PolygonMigration/problems/storage/__init__.py - Storage selector → Azure backend: selects provider
PolygonMigration/problems/storage/__init__.py - S3 backend → Storage interface: implements
PolygonMigration/problems/storage/s3.py - Azure backend → Storage interface: implements
PolygonMigration/problems/storage/azure.py - Azure backend → Azure client setup: builds client
PolygonMigration/problems/storage/azure.py - Migration workflow → Polygon client: uploads tests
PolygonMigration/problems/views.py - Polygon client → Storage interface: uploads files
PolygonMigration/problems/polygon_api.py - S3 backend → S3 or Azure: writes objects
PolygonMigration/problems/storage/s3.py - Azure backend → S3 or Azure: writes blobs
PolygonMigration/problems/storage/azure.py - Polygon client → Checker handling: fetches checker
PolygonMigration/problems/polygon_api.py - Checker handling → Storage interface: uploads checker
PolygonMigration/problems/tests.py