Skip to content

Commit

Permalink
Made detect_headers method a static method
Browse files Browse the repository at this point in the history
  • Loading branch information
muhanadz committed Mar 30, 2022
1 parent 06ad062 commit 99383af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/omero_metadata/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ def testtables(self, args):
if not initialized:
self.ctx.die(100, "Failed to initialize Table")

def detect_headers(self, csv_path):
@staticmethod
def detect_headers(csv_path):
'''
Function to automatically detect headers from a CSV file. This function
loads the table to pandas to detects the column type and match headers
Expand Down Expand Up @@ -576,7 +577,7 @@ def populate(self, args):
if not args.manual_header and \
not first_row[0].str.contains('# header').bool():
omero_metadata.populate.log.info("Detecting header types")
header_type = self.detect_headers(args.file)
header_type = MetadataControl.detect_headers(args.file)
if args.dry_run:
omero_metadata.populate.log.info(f"Header Types:{header_type}")
else:
Expand Down

0 comments on commit 99383af

Please sign in to comment.