Refactor codebase with modular parsers and enhanced schema for expanded data extraction - #7
Merged
marcelo-m7 merged 5 commits intoOct 27, 2025
Conversation
Co-authored-by: marcelo-m7 <117441129+marcelo-m7@users.noreply.github.com>
Contributor
|
@copilot foi adicionado ao ambiente SUPABASE_ANON_KEY para acesso ao Supabase. use e altere somente o schema 'facodi' pois o banco de dados é partilhado. teste e configure corretamente a conexao com o projeto |
…ibility Co-authored-by: marcelo-m7 <117441129+marcelo-m7@users.noreply.github.com>
Co-authored-by: marcelo-m7 <117441129+marcelo-m7@users.noreply.github.com>
…MARY) Co-authored-by: marcelo-m7 <117441129+marcelo-m7@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Expand information extraction and refine code organization
Refactor codebase with modular parsers and enhanced schema for expanded data extraction
Oct 27, 2025
marcelo-m7
approved these changes
Oct 27, 2025
marcelo-m7
marked this pull request as ready for review
October 27, 2025 16:00
Copilot stopped work on behalf of
marcelo-m7 due to an error
October 27, 2025 16:01
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.
Implemented comprehensive refactoring to expand extracted course information and improve code organization through specialized parsers and enhanced database schema.
Architecture Changes
New modular structure:
src/config/- Unified Settings class (28 params) + constants, replaces disparate Config classessrc/models/- 11 Pydantic schemas with automatic validationsrc/parsers/- Specialized HTML parsers with BaseParser abstract classsrc/utils/- Centralized logging with ContextLoggerBackward compatibility maintained: Legacy
Configclass available via import alias.Enhanced Data Extraction
Schema additions (
schema_enhanced.sql):curriculum_structure(hierarchical year→semester→module),scraping_log,change_detectionSpecialized parsers:
CourseParser- Extracts 25+ fields from course pagesCurriculumParser- Parses curriculum tables/lists with automatic year/semester detectionModuleParser- Extracts detailed UC information (syllabus, teaching methods, workload, professor)Usage Example
Test Coverage
Documentation
REFACTORING_GUIDE.md- Architecture overview, component usage, migration guideIMPROVEMENTS_SUMMARY.md- Executive summary with metricsNext Steps
Integration of parsers into existing
scrape_ualg.pyandscrape_ualg_supabase.pyscrapers to utilize enhanced extraction capabilities.Original prompt
#codebase crie um plano de melhorias e refinamento do codigo base considerando minimamente os seguintes pontos:
expanda mais a quantidade de informaçao extraida, como por exempoo inserir o plano curricular e outros. refine a organizacao do codigo
[Chronological Review: The conversation began with the user requesting an analysis of the codebase to generate or update `.github/copilot-instructions.md`. The user emphasized the need for actionable instructions for AI coding agents, focusing on the architecture, developer workflows, project-specific conventions, and integration points. The user then requested an exploration and analysis of the project to update all documentation present in the codebase. Following this, the user initiated a semantic search to create a plan for improvements and refinements in the codebase, specifically to expand the information extracted and refine the organization of the code.][Intent Mapping:
.github/copilot-instructions.mdfor guiding AI coding agents." - The user wants to create or update documentation for AI agents.[Technical Inventory:
[Code Archaeology: No specific files or code changes were discussed in detail, but the focus was on documentation and code organization.]
[Progress Assessment: The user has initiated requests for documentation updates and codebase analysis but has not yet received specific outputs or completed tasks.]
[Context Validation: All critical information for continuation is captured, including user requests for documentation updates and codebase improvements.]
[Recent Commands Analysis:
Last Agent Commands:
Tool Results Summary: No specific results were returned from the semantic search command yet, as it was just initiated.
Pre-Summary State: The agent was actively working on generating a plan for improvements in the codebase when the token budget was exceeded.
Operation Context: The recent commands were executed to align with the user's goals of enhancing the codebase's documentation and organization.]
1. Conversation Overview: - Primary Objectives: 1. "Analyze this codebase to generate or update `.github/copilot-instructions.md` for guiding AI coding agents." 2. "explore e analise o projeto e atualize toda documentacao presente no codigo base." 3. "#semantic_search crie um plano de melhorias e refinamento do codigo base." - Session Context: The conversation has focused on improving documentation and code organization within the Scrape-UAlg-Courses repository. - User Intent Evolution: The user initially sought to update AI documentation, then expanded the request to include a comprehensive analysis of the project and finally requested a specific plan for codebase improvements.- Technical Foundation:
- Repository: Scrape-UAlg-Courses
- Current Branch: feature/supabase
- Default Branch: main
- Tools: Various Supabase commands for managing migrations, branches, and SQL execution.
- Codebase Status:
- No specific files or code changes were discussed in detail, but the focus was on documentation and code organization.
- Problem Resolution:
- Issues Encountered: No specific technical problems were mentioned.
- Solutions Implemented: The user is in the process of generating a plan for improvements.
- Debugging Context: No ongoing troubleshooting efforts were noted.
- Lessons Learned: Insights into the need for better documentation and code organization.
- Progress Tracking:
- Completed Tasks: None reported yet.
- Partially Complete Work: Documentation updates and codebase analysis are in progress.
- Validated Outcomes: No features or code confirmed working through testing yet.
- Active Work State:
- Current Focus: The user is focused on generating a plan for improvements in the codebase.
- Recent Context: The last few exchanges involved requests for documentation updates and a semantic search for codebase improvements.
- Working Code: No specific code snippets were discussed recently.
- Immediate Context: The user was addressing the need for expanded information extraction and refined code organization.
- Recent Operations:
- Last Agent Commands:
- "#semantic_search" - Initiated a semantic search for a plan to improve the codebas...
Created from VS Code via the GitHub Pull Request extension.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.