Skip to content

Commit

Permalink
BUG: clean up after conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorov committed Oct 7, 2024
1 parent 0b20e76 commit ef0101d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 5 additions & 7 deletions idc_index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _safe_filter_by_selection(
patientId,
studyInstanceUID,
seriesInstanceUID,
sopInstanceUID=None,
sopInstanceUID,
crdc_series_uuid,
):
if collection_id is not None:
Expand Down Expand Up @@ -205,10 +205,10 @@ def _safe_filter_by_selection(

if sopInstanceUID is not None:
result_df = IDCClient._filter_by_dicom_instance_uid(
result_df, sopInstanceUID
df_index, sopInstanceUID
)
return result_df

if seriesInstanceUID is not None:
result_df = IDCClient._filter_by_dicom_series_uid(
df_index, seriesInstanceUID
Expand Down Expand Up @@ -1512,6 +1512,7 @@ def citations_from_selection(
patientId=patientId,
studyInstanceUID=studyInstanceUID,
seriesInstanceUID=seriesInstanceUID,
sopInstanceUID=None,
crdc_series_uuid=None,
)

Expand Down Expand Up @@ -1604,10 +1605,7 @@ def download_from_selection(
raise ValueError(
"Instance-level access not possible because instance-level index not installed."
)
else:
download_df = self.index

if crdc_series_uuid is not None:
elif crdc_series_uuid is not None:
download_df = pd.concat(
[
self.index[
Expand Down
3 changes: 3 additions & 0 deletions tests/idcindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

# Run tests using the following command from the root of the repository:
# python -m unittest -vv tests/idcindex.py
#
# run specific tests with this:
# pytest ./tests/idcindex.py::TestIDCClient.test_download_dicom_instance

logging.basicConfig(level=logging.DEBUG)

Expand Down

0 comments on commit ef0101d

Please sign in to comment.