♻️ [MRG] Packaging and console script#15
Merged
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
Collaborator
|
Hi @hayesall Thanks again! |
jponttuset
reviewed
Dec 13, 2019
jponttuset
reviewed
Dec 13, 2019
jponttuset
reviewed
Dec 13, 2019
Fix two re.sub commands and a docstring
Contributor
Author
|
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. |
hayesall
commented
Dec 13, 2019
Fix missing space after "user-defined"
Collaborator
|
Thanks again @hayesall! |
goemon07
added a commit
to spritz-group/arxiv-latex-cleaner
that referenced
this pull request
Mar 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This refactors the
arxiv_latex_cleanerinto a package, and adds asetup.pyso this may be installed with a console point entry point.Details
arxiv_latex_cleaner.pyinto package directoryarxiv_latex_cleaner_test.pyinto package directoryarxiv_latex_cleaner/_version.py__main__block fromarxiv_latex_cleanerrun_arxiv_cleaneras a public methodrun_arxiv_cleanerarxiv_latex_cleaner.__main__setup.pywith an entry point to the main moduleOne of the biggest changes is the addition of the
setup.pywith an entry point that allows this to be used as a command-line program.