usc-isi-i2 / table-linker

Table Linker
MIT License
21 stars 8 forks source link

Added command to check candidates and logging option to all commands. #44

Closed sriamazingram closed 3 years ago

saggu commented 3 years ago

this code

        if kwargs["logfile"]:
            with open(kwargs["logfile"],"a") as f:
                print(f'clean Time: {str(end-start)}s'
                      f' Input: {kwargs["input_file"]}',file=f)
        else:
            print(f'clean Time: {str(end-start)}s'
                  f' Input: {kwargs["input_file"]}',file=sys.stderr)

should be a utility function and that function should be called everywhere. Please change.

Also add a unit tests for you new command, example: https://github.com/usc-isi-i2/table-linker/tree/master/tl/unittests

Guidelines for unit tests

https://docs.google.com/document/d/18jqaybx2xwAfaQyiB92GUPBRUovKUaWpI8kPetHSlfg/edit?usp=sharing

@sriamazingram

saggu commented 3 years ago

Closing, need to create a new PR.