Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider exposing core functionality so consumers can import/run it outside of CLI #3

Open
eecavanna opened this issue Jul 18, 2024 · 0 comments
Assignees

Comments

@eecavanna
Copy link
Collaborator

eecavanna commented Jul 18, 2024

Thoughts:

  • Extract the outermost function signature (the one with the Typer stuff) into a separate module, called cli.py
    • The function in that new module will call a function in refscan.py, whose signature is a stripped down version of the original one (i.e. no Typer stuff)
    • Update the pyproject.toml file to specify the main command as the one in cli.py
  • Considerations:
    • What to do with the existing print statements that were designed for CLI usage. Maybe have them rely on either (a) a function parameter that says whether we're in CLI mode or imported mode, or (b) a callback function that does the printing—which could be a noop when in imported mode
@eecavanna eecavanna self-assigned this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant