8000 add casrn/preferred_name to DSSTox by tfeiler-icf · Pull Request #8 · USEPA/hawc · GitHub
[go: up one dir, main page]

Skip to content

add casrn/preferred_name to DSSTox - #8

Open
tfeiler-icf wants to merge 5 commits into
mainfrom
ICF-202610-generic-dsstox-updates
Open

tfeiler-icf wants to merge 5 commits into
mainfrom
ICF-202610-generic-dsstox-updates

Conversation

@tfeiler-icf
@tfeiler-icf tfeiler-icf commented Nov 2, 2026 •
Copy link
Copy Markdown
Collaborator

DSSTox Model Updates

  • Removes the search GeneratedField; generated via using SearchVector on dtxsid, content["preferredName"], and content["casrn"]
    • The DssTox table only has ~500 rows, we don't need an index (or to do full text search vectorizing on chemical names)
  • Add preferred_name and casrn fields, populated from the existing content json field, originally fetched from dsstox database
    • Searches use these fields now instead of the search field
  • Add RegEx validators to dtxsid and casrn fields
  • App epiv2 chemicals to admin for DSSTox model

- adds model fields with indices
- migration to pull existing data from content JSON
- removes search generated field from DSSTox model and updates
  anyplace leveraging it. Can just search casrn/preferred_name now.
- updates save method to add casrn/prefname population during standard
  dsstox import/save
Comment thread tests/data/fixtures/db.yaml Resolved
Comment thread tests/hawc/apps/study/test_api.py Resolved
Comment thread hawc/apps/assessment/filterset.py Resolved
@tfeiler-icf
tfeiler-icf requested a review from caseyhans November 2, 2026 16:30
@caseyhans caseyhans left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay great stuff, thanks for doing this! I left some feedback but I'm gonna make changes myself so no need to update anything yet. I wanna mess around with these queries... I had some performance concerns but turns out we only have like ~500 DSSTox objects so my concerns might be negligible here.

Comment thread hawc/apps/assessment/filterset.py Resolved
Comment thread hawc/apps/assessment/admin.py Resolved
Comment thread hawc/apps/assessment/autocomplete.py Resolved
Comment thread hawc/apps/assessment/models.py Resolved
Comment thread hawc/apps/assessment/models.py Resolved
Comment thread hawc/apps/assessment/models.py Resolved
Comment thread hawc/apps/study/filterset.py Resolved
Comment thread tests/hawc/apps/study/test_api.py Resolved
Comment thread hawc/apps/assessment/models.py Resolved
@caseyhans caseyhans self-assigned this Nov 10, 2026
@caseyhans
caseyhans marked this pull request as ready for review November 10, 2026 22:10
@caseyhans
Copy link
Copy Markdown
Contributor

Ok, ready for any final review/comments @tfeiler-icf @shanethacker

This branch has not been deployed

No deployments
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.

2 participants

0