Closed bcoles closed 5 years ago
I agree makingcli.py
available to use from outside of project directory,
but I don't know if there are any benefits we get when we do the same for username_api.py
.
Also, if it's intended to use cli outside, I think guide for it should be added. (i.e. alias, exporting)
Btw, thank you for contributing this project :)
@seeeturtle I ran into an issue where using an absolute path inside cli.py
was insufficient, without also modifying username_api.py
, as cli.py
uses from username_api import check_username
, which contains the same code to load the YAML file.
Sorry, I missed it.
hmm... how about just modify username_api.patterns
from cli.py
?
By the way, I think the data should be an argument of function not a global variable. maybe we can add option for using custom data instead of default data.
How do you think about it, @jayvdb, @manu-chroma ?
hmm... how about just modify
username_api.patterns
fromcli.py
?
That's a much better idea.
I'm done here. This PR should not be merged as is. I'll leave the PR open for discussion.
@bcoles instead of leaving PR open, i'll just open an issue.
Seems like this would be a good idea; allowing the CLI to be invoked from outside the script directory.
Tested with the
cli.py