Added separate template for create/update/delete/reorder of Epochs#53
Added separate template for create/update/delete/reorder of Epochs#53pendingintent merged 8 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors epoch management by moving create, update, delete, and reorder operations from the main application file to a dedicated epochs.py router module. It introduces a new standalone epochs.html template for epoch management and updates the epoch reorder audit to track epoch names instead of IDs.
Changes:
- Moved epoch CRUD operations from
app.pytorouters/epochs.pywith both API and UI endpoints - Created new
epochs.htmltemplate with inline forms for epoch creation, updating, and deletion - Updated epoch reorder audit to record epoch names rather than IDs in before/after snapshots
- Removed epochs section from
edit.htmltemplate and added navigation link inbase.html
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_epoch_type_audit.py | Entire test file removed |
| tests/test_epoch_reorder_audit_api.py | Updated test to match new API structure and audit format recording epoch names |
| src/soa_builder/web/templates/epochs.html | New template for epoch management UI |
| src/soa_builder/web/templates/edit.html | Removed epochs management section |
| src/soa_builder/web/templates/base.html | Added navigation link to epochs page |
| src/soa_builder/web/schemas.py | Added type field to EpochCreate and EpochUpdate schemas |
| src/soa_builder/web/routers/visits.py | Moved _load_code_value_map function earlier in file |
| src/soa_builder/web/routers/epochs.py | Comprehensive refactor with new API/UI endpoints for epoch operations |
| src/soa_builder/web/audit.py | Fixed logger name |
| src/soa_builder/web/app.py | Commented out/removed epoch-related code moved to router |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
spelling Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
grammar Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
spelling Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/test_epoch_reorder_audit_api.py:1
- Missing null check after
cur.fetchone(). If no epoch is found with the givenepoch_id, this will cause an error when trying to accessrow[0]. Add a check:if not row: raise HTTPException(404, "Epoch not found")before line 442.
import os
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…soa-workbench into ui-add-epoch-page Syntax errors addressed
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
epochs creaet/update/delete/reorder moved to separate template