Skip to content

Commit

Permalink
bug: fix reported IDC version
Browse files Browse the repository at this point in the history
resolves #55
  • Loading branch information
fedorov committed Apr 10, 2024
1 parent 400e1f3 commit a251e5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion idc_index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import idc_index_data
import pandas as pd
import psutil
from packaging.version import Version

Check failure on line 20 in idc_index/index.py

View workflow job for this annotation

GitHub Actions / Format

Unable to import 'packaging.version'

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -91,7 +92,8 @@ def _filter_by_dicom_series_uid(df_index, dicom_series_uid):
)

def get_idc_version(self):
return f"v{idc_index_data.__version__}"
idc_version = Version(idc_index_data.__version__).major
return f"v{idc_version}"

def get_collections(self):
unique_collections = self.index["collection_id"].unique()
Expand Down

0 comments on commit a251e5e

Please sign in to comment.