This pull request includes significant changes to the access_amherst_backend project, focusing on improving event similarity detection, enhancing the dashboard, and adding new functionality for Gantt charts. The most important changes are grouped by theme below:
This pull request includes significant changes to the
access_amherst_backend
project, focusing on improving event similarity detection, enhancing the dashboard, and adding new functionality for Gantt charts. The most important changes are grouped by theme below:Event Similarity Detection:
access_amherst_backend/access_amherst_algo/calendar_scraper/calendar_saver.py
: Replaced the existing event similarity check usingdifflib.SequenceMatcher
with a more robust approach using TF-IDF vectors and cosine similarity to compare event titles. [1] [2] [3]Dashboard Enhancements:
access_amherst_backend/access_amherst_algo/templates/access_amherst_algo/dashboard.html
: Added new scripts and styles to improve the dashboard layout, including forcing a two-column grid, increasing the maximum width, and preventing card overflow. Also added a Gantt chart for visualizing overlapping events and adjusted the heatmap container styling. [1] [2] [3] [4] [5] [6]New Gantt Chart Functionality:
access_amherst_backend/access_amherst_algo/urls.py
: Added a new URL pattern for updating the Gantt chart data.access_amherst_backend/access_amherst_algo/views.py
: Implemented theupdate_gantt
view to fetch events within a specified date and time range, returning the data in JSON format for the Gantt chart.Debugging and Development:
access_amherst_backend/access_amherst_backend/settings.py
: Enabled debug mode and added127.0.0.1
to the allowed hosts to facilitate local development.