Skip to content

[WIP] Adding an age column to deal with issue 330#399

Merged
manning-ncsa merged 10 commits intoscimma:mainfrom
Bezbakri:rishabh-logage
Apr 29, 2026
Merged

[WIP] Adding an age column to deal with issue 330#399
manning-ncsa merged 10 commits intoscimma:mainfrom
Bezbakri:rishabh-logage

Conversation

@Bezbakri
Copy link
Copy Markdown
Collaborator

@Bezbakri Bezbakri commented Apr 22, 2026

Fixes #330 .

Description of the Change

Checklist

Please check all that apply to your proposed changes

  • HTML code change
  • Added package dependency
  • Added data
  • Changed django model
  • Documentation change
  • Added or changed TaskRunner

Additional context

Comment thread docs/usage/web_api.rst Outdated
@manning-ncsa
Copy link
Copy Markdown
Collaborator

Please add a commit updating the app version and changelog.

SEDFittingResult = apps.get_model("host", "SEDFittingResult")
all_sed_res = SEDFittingResult.objects.all()
for sed_res in all_sed_res:
log_age_16 = sed_res.log_age_16
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Any reason why this is done in two steps instead of directly assigning in one step?

@manning-ncsa
Copy link
Copy Markdown
Collaborator

To test your migration,

  1. Start a dev deployment from scratch (you don't have redownload the required files) from v1.9.5.
  2. Stop the deployment and checkout your feature branch with the migration script.
  3. Restart the deployment and query the database to verify effect. To query the database, add a function to app/host/management/commands/util.py that can be invoked as shown here. This will allow me to easily verify your test myself. We may choose to remove the test function prior to merging to main.

@manning-ncsa
Copy link
Copy Markdown
Collaborator

Here is the procedure I used to test the export/import of transient datasets between the current and proposed version:

# Stop Blast and clear database
bash run/blastctl full_dev purge-db

# Checkout v1.9.4
git checkout v1.9.4
git status --porcelain

# Start Blast
bash run/blastctl full_dev up

# Export 2026dgt via web page

# Stop Blast and checkout new version
bash run/blastctl full_dev down
git checkout rishabh-logage 
bash run/blastctl full_dev up

# Delete transient 2026dgt http://localhost:4000/api/transient/delete/2026dgt/all

# Import 2026dgt from exported archive file

# Export 2026dgt again to compare with original and verify that the new "age" keys exist:
#     ...
#     "log_age_16": 0.5585912229223885,
#     "log_age_50": 4.792816941415436,
#     "log_age_84": 7.2754636677303886,
#     "age_16": 0.5585912229223885,
#     "age_50": 4.792816941415436,
#     "age_84": 7.2754636677303886,
#     ...

# Delete transient again http://localhost:4000/api/transient/delete/2026dgt/all

# Import 2026dgt from archive file exported by new version

@manning-ncsa manning-ncsa merged commit f1fe35a into scimma:main Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] blast age mistakenly reported as log_age in data mode

2 participants