PrincetonUniversity / blocklint

MIT License
7 stars 7 forks source link

Add default module entrypoint #11

Closed jaedoucette closed 3 years ago

jaedoucette commented 3 years ago

-> Allows invocation with python -m blocklint after installation, following standard conventions for linting tools.

-> If possible, package should be redeployed to PyPI after merging this PR

troycomi commented 3 years ago

Looks innocuous enough. Can you add a test to make sure it's running as intended? I think something like this in tests/acceptance_test.sh should suffice:

echo "  module entrypoint"
diff <(python -m blocklint tests/sample_files/test.{cc,py,txt}) \
    tests/sample_files/default.txt

I assume argument parsing is identical, but maybe do the same for another test or two.

troycomi commented 3 years ago

Also, I need to fix the pre-commit-hooks.yaml (PR soon). When these 3 PRs are merged I will make a new release to pypi.