Skip to content

Move argument parsing inside if __name__ == '__main__' #3

@oleddy

Description

@oleddy

I noticed that in main.py, argument parsing is done outside of the if __name__ == '__main__' statement. This means that if you try to import main as a module or import the run() function from another script (e.g., from deeprtalign.main import run), argparse will throw an error because it is looking for command line arguments. This makes it difficult to, for example, package a script as an executable, because in that context running deeprtalign from the command line (via os.system() for example) rather than importing it as a module causes other issues.

Would it be possible to move all the argument parsing code inside the if __name__ == '__main__' and update the version available for install via pip please? I'm happy to make a fork and submit a pull request if that's easier.

Thanks for building this great tool and making it open source! I really appreciate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions