Feat/final refactoring - #6
Conversation
When users select a metric from the 'What Makes a Hackathon Repo?' dropdown, they now see: - Clear definition of what the feature measures - Whether it's a raw GitHub feature or derived (calculated) - For derived features: the calculation formula shown FEATURE_METADATA dictionary added with: - 12 features (Days with Code Changes through Watchers) - User-friendly definitions suitable for non-technical audience - Calculation formulas for 2 derived features: - Days with Code Changes: (last_commit_date − first_commit_date) - Repository Age: (pushed_at − created_at) - Feature type indicator (Raw vs Derived with 📊 and 📐 icons) Display integrated into render_features() with expandable info box that shows automatically when feature is selected. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed st.expander expanded parameter from True to False so the feature definition/calculation box is collapsed by default and only expands when user clicks to read more. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… extracted before from this same notebook
Changed sudoers entry from 'vscode ALL=(ALL) NOPASSWD:ALL' to 'vscode ALL=(ALL) ALL' to require password authentication for sudo commands.
- Enhanced load_predictions() with local-first pattern - Comprehensive error guidance with 2 setup options - Added 9 tests for loading logic - Backward compatible with existing local files
… in repo_analysis notebook - Implemented tests to verify the creation and upload of concept cache JSON to Hugging Face Hub. - Added checks for the export workflow in the notebook, ensuring CSV and Parquet files are generated correctly. - Verified the structure and serialization of the cache dictionary. - Ensured that the upload function is correctly called and that the cache is included in the upload process. - Created integration tests to confirm that the cache can be loaded and handles missing fields gracefully.
…ust prediction pipeline accordingly
- Adjusted correlation weights in `correlation_weights.json` for `n_concepts` and updated threshold, score_min, and score_max values. - Modified the `CorrelationWeights` class to reflect new threshold value. - Updated the `train_correlation_weights` function to use the new threshold. - Added comprehensive tests for cache lifecycle in `test_cache_lifecycle.py`, covering download, enrichment, persistence, and upload scenarios. - Enhanced tests for correlation weights in `test_correlation_weighted.py` to ensure default values align with recent changes. - Updated notebook tests to reflect changes in cell numbers and ensure proper functionality for data loading and cache export. - Created new tests for notebook data loading logic to verify local-first and HF fallback strategies.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e66291c. Configure here.
| # Create non-root user for VS Code | ||
| RUN useradd -ms /bin/bash -u 1000 vscode \ | ||
| && echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
| && echo "vscode ALL=(ALL) ALL" >> /etc/sudoers |
There was a problem hiding this comment.
Devcontainer sudo broken for passwordless user
High Severity
The NOPASSWD:ALL sudoers directive was changed to just ALL, but the vscode user is created via useradd without a password. Since the user has no password set, sudo will now prompt for a password that doesn't exist, effectively making sudo unusable inside the devcontainer. This breaks any workflow (package installs, file permission changes, devcontainer features) that depends on sudo.
Reviewed by Cursor Bugbot for commit e66291c. Configure here.
| }) | ||
|
|
||
| # Display as styled table | ||
| st.write(source_data.to_html(index=False, escape=False), unsafe_allow_html=True) |
There was a problem hiding this comment.
Markdown bold syntax won't render inside HTML table
Low Severity
The total row uses Markdown bold syntax (**Total**, **{total_all}**, etc.) inside a pandas to_html() output rendered via st.write(..., unsafe_allow_html=True). Streamlit's Markdown parser does not process Markdown formatting inside HTML block elements like <table>/<td>. The total row will display with literal asterisks (e.g. **Total**) instead of bold text. Using HTML tags like <b>Total</b> would work correctly with escape=False.
Reviewed by Cursor Bugbot for commit e66291c. Configure here.
…rameters in load_huggingface_dataset
…ies for Hugging Face datasets
…loading with fallback strategies


Changes:
Minor refactoring changes
Note
Medium Risk
Medium risk due to changes in dashboard data-loading behavior (local vs Hugging Face fallback and new failure handling) and modified devcontainer sudoers permissions that may affect developer workflows.
Overview
Adds a local-first with Hugging Face Hub fallback loader for the dashboard dataset, including clearer user-facing error guidance when data is unavailable.
Enhances the Streamlit narrative with data source/completeness breakdowns, feature definitions, safer Fisher odds-ratio handling, and updated concept selection for the topic association chart.
Expands model comparison by adding a majority-vote ensemble and richer metrics (
AUC-ROC, rescaledMCC) across radar/summary tables, and makes the correlation-weighted method’s threshold read fromcorrelation_weights.jsonfor consistency.Adds two new
scripts/utilities to generate static report figures (correlations.pngandfeature_distributions.png), and updates the devcontainer to remove passwordless sudo for thevscodeuser.Reviewed by Cursor Bugbot for commit e66291c. Bugbot is set up for automated code reviews on this repo. Configure here.