Skip to content

Conversation

@mikix
Copy link
Contributor

@mikix mikix commented Oct 23, 2025

And do some light refactoring of NLP classes that will make a future addition of multiple-run prompts easier.

Checklist

  • Consider if documentation (like in docs/) needs to be updated
  • Consider if tests should be added

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4632 4593 99% 98% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
cumulus_etl/etl/studies/covid_symptom/covid_tasks.py 100% 🟢
cumulus_etl/etl/studies/irae/irae_tasks.py 100% 🟢
cumulus_etl/etl/tasks/init.py 100% 🟢
cumulus_etl/etl/tasks/base.py 100% 🟢
cumulus_etl/etl/tasks/nlp_task.py 100% 🟢
cumulus_etl/inliner/inliner.py 100% 🟢
cumulus_etl/nlp/models.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 1ac203f by action🐍

And do some light refactoring of NLP classes that will make a future
addition of multiple-run prompts easier.
Comment on lines +147 to +152
# or "$PARAMETER_NAME" :shrug: - for now, just look for those names in particular.
# If we see a wider variety, we can try to skip any single wrapper field, but I
# want to keep the option of studies that have only one top level field for now.
top_keys = set(raw_json)
if len(top_keys) == 1 and {"parameter", "$PARAMETER_NAME"} & top_keys:
raw_json = raw_json.popitem()[1]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the real fix in this PR - everything else was just some light refactoring/updating.


parsed = response.answer.model_dump(mode="json")
self.post_process(parsed, orig_note_text, orig_note)
async def process_note(self, details: NoteDetails) -> tasks.EntryBundle | None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just some logic moved from one function into a helper function, to make it easier for subclassess to override it and add more logic if they want.

@mikix mikix marked this pull request as ready for review October 27, 2025 12:10
@mikix mikix merged commit 63c94ef into main Oct 27, 2025
3 checks passed
@mikix mikix deleted the mikix/claude-fix branch October 27, 2025 12:42
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