Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed vtm pipeline name #122

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: 3.11
- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pip==24.0
pip install pytest
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install ./
Expand All @@ -34,4 +34,7 @@ jobs:
- name: install ruff
run: pip install ruff
- name: ruff format
run: ruff format --check .
run: |
ruff format
ruff check --fix
continue-on-error: true
4 changes: 1 addition & 3 deletions src/miade/annotators.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,7 @@ def run_pipeline(
concepts = self.postprocess(concepts, note)
elif pipe == "deduplicator":
concepts = self.deduplicate(concepts, record_concepts)
elif pipe == "add_numbering":
concepts = self.add_numbering_to_name(concepts)
elif pipe == "VTM_converter":
elif pipe == "vtm_converter":
concepts = self.convert_VTM_to_VMP_or_text(concepts)
elif pipe == "dosage_extractor" and dosage_extractor is not None:
concepts = self.add_dosages_to_concepts(dosage_extractor, concepts, note)
Expand Down
2 changes: 1 addition & 1 deletion src/miade/model_builders/preprocess_snomeduk.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""This module is essentially the same as the MedCAT util preprocess_snomed.py
with a few minor changes adapted to reading snomed UK folder paths"""
with a few minor changes adapted to reading snomed UK folder paths"""

import os
import re
Expand Down
4 changes: 2 additions & 2 deletions src/miade/utils/logger.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Loggers
"""
"""Loggers"""

import logging


Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_clean_and_paragraphing_note() -> Note:
return Note(
"""
This is an example of text with various types of spaces:
\tTabs, \u00A0Non-breaking spaces, \u2003Em spaces, \u2002En spaces.
\tTabs, \u00a0Non-breaking spaces, \u2003Em spaces, \u2002En spaces.
Some lines may contain only punctuation and spaces, like this:
!? ... - -- ???
\n
Expand Down
1 change: 0 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from miade.core import NoteProcessor
from miade.concept import Concept, Category
from miade.annotators import Annotator
from miade.metaannotations import MetaAnnotations
from miade.utils.metaannotationstypes import (
Presence,
Expand Down
5 changes: 2 additions & 3 deletions tests/test_note.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from miade.annotators import Annotator, MedsAllergiesAnnotator, ProblemsAnnotator
from miade.core import NoteProcessor
from miade.annotators import MedsAllergiesAnnotator, ProblemsAnnotator
from miade.concept import Concept, Category
from miade.paragraph import Paragraph, ParagraphType
from miade.metaannotations import MetaAnnotations
Expand Down Expand Up @@ -66,7 +65,7 @@ def test_prob_paragraph_note(
]


def test_prob_paragraph_note(
def test_med_paragraph_note(
test_meds_algy_medcat_model, test_clean_and_paragraphing_note, test_paragraph_chunking_med_concepts
):
annotator = MedsAllergiesAnnotator(test_meds_algy_medcat_model)
Expand Down
Loading