Baessler-Lab / swag-tag

A Streamlit-based webapp for annotation of medical images and reports.
2 stars 0 forks source link

bug (scripts): Persistent debugging code prevents application to all studies/reports. #9

Closed laqua-stack closed 1 year ago

laqua-stack commented 1 year ago

Bug Report

Symptom

The function scrape_filetree_and_save_to_database cycles only the first 5 reports.

What is the expected behavior? It should do all reports.

What is the actual behavior? The function scrape_filetree_and_save_to_database cycles only the first 5 reports.

Reproduce

The issue comes from the #DEBUG part, that should have been removed.

        for k, report_fpath in tqdm(enumerate(path_conf.data_dir.rglob('*.txt'))):
            """
            fpath have style: PatientID/StudyInstanceUID.txt
            imagepaths have style PatientID/StudyInstanceUID/SeriesInstanceUID.jpeg
            """

            # DEBUG:
->            if k >= 5:
                break

We will close this issue if:

Additional Context

Next time adding a TODO comment/doing an actual code review could help identify such things before merging a PR. the enumerate part in the for declaration is also unneccessary.

laqua-stack commented 1 year ago

relates to the PR #8 and this Issue #4.

laqua-stack commented 1 year ago

@dieserobin Here we could either revert the already merged PR or we could just make a new branch + new PR.

AmarHek commented 1 year ago

Has this issue been solved?