Skip to content

Activities json#41

Merged
pendingintent merged 9 commits intomasterfrom
activities-json
Dec 15, 2025
Merged

Activities json#41
pendingintent merged 9 commits intomasterfrom
activities-json

Conversation

@pendingintent
Copy link
Owner

Added scripts to generate the 'activities' and 'studyCells' entities in the USDM JSON format.

Copilot AI review requested due to automatic review settings December 15, 2025 14:52
@pendingintent pendingintent self-assigned this Dec 15, 2025
@pendingintent pendingintent added the enhancement New feature or request label Dec 15, 2025
@pendingintent pendingintent added this to the v1.2-beta milestone Dec 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces USDM JSON generation for activities and study cells, along with supporting database migrations and UI enhancements.

  • Adds scripts to export USDM-compliant JSON for activities and study cells
  • Implements database migrations for epoch_uid and activity label/description fields
  • Enhances UI to support activity editing with label and description

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/usdm/generate_activities.py Generates USDM Activity-Output JSON with biomedical concept references
src/usdm/generate_study_cells.py Generates USDM StudyCells-Output JSON with arm/epoch/element relationships
src/soa_builder/web/utils.py Adds concept_uid generation and table column checking utilities
src/soa_builder/web/routers/activities.py Extends activity CRUD with label/description, adds UI form handlers
src/soa_builder/web/routers/epochs.py Adds epoch_uid generation and backfills for USDM compliance
src/soa_builder/web/migrate_database.py Adds epoch_uid migration with unique indexing
src/soa_builder/web/initialize_database.py Updates schema to include activity label/description and concept_uid columns
src/soa_builder/web/app.py Integrates migrations, updates freeze/rollback logic for new schema fields
src/soa_builder/web/templates/edit.html Adds inline editing forms for activity properties
src/soa_builder/web/schemas.py Adds optional label/description fields to ActivityCreate/Update
tests/test_study_cell_uid_reuse.py Tests that study_cell_uid is reused for same arm/epoch combinations
tests/test_study_cell_uid_reuse_later.py Tests that study_cell_uid is reused when elements are added later

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

rows = cur.fetchall()
conn.close()
bc_uids = [r[0] for r in rows] or []
print(bc_uids)
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug print statement should be removed from production code. This will output to stdout during normal execution, potentially interfering with the JSON output when using stdout mode.

Suggested change
print(bc_uids)

Copilot uses AI. Check for mistakes.
@pendingintent pendingintent merged commit fb7f69f into master Dec 15, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants