-
Notifications
You must be signed in to change notification settings - Fork 324
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
♻️ [MRG] Packaging and console script #15
Conversation
Add empty `arxiv_latex_cleaner/__main__.py` Add empty `arxiv_latex_cleaner/_version.py` Move `arxiv_latex_cleaner.py` into package directory Move `arxiv_latex_cleaner_test.py` into package directory
Add empty `__init__.py` Add version information in `arxiv_latex_cleaner/_version.py`
Fix `import` --> `from ... import` Reworking this as a package changed the way import statements work during testing. This fixes the import structure to make tests pass again.
Drop `__main__` block from `arxiv_latex_cleaner` Start using `run_arxiv_cleaner` as a public method Fix test to reflect public `run_arxiv_cleaner` Add argument parsing to `arxiv_latex_cleaner.__main__`
Add `exit(0)` to `__main__` Add `setup.py` with an entry point to the main module
Add console script explanation, and optional installation info
Hi @hayesall Thanks again! |
Fix two re.sub commands and a docstring
Hey @jponttuset, thank you for catching the I was three commits behind when I started writing, I probably didn't merge them properly after fetching. |
Fix missing space after "user-defined"
Thanks again @hayesall! |
Summary
This refactors the
arxiv_latex_cleaner
into a package, and adds asetup.py
so this may be installed with a console point entry point.Details
arxiv_latex_cleaner.py
into package directoryarxiv_latex_cleaner_test.py
into package directoryarxiv_latex_cleaner/_version.py
__main__
block fromarxiv_latex_cleaner
run_arxiv_cleaner
as a public methodrun_arxiv_cleaner
arxiv_latex_cleaner.__main__
setup.py
with an entry point to the main moduleOne of the biggest changes is the addition of the
setup.py
with an entry point that allows this to be used as a command-line program.