mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2025-05-08 06:06:00 +02:00
Re-work as a proper standalone Python package
Add a setup.py so that installation is easier and a standalone CLI script called csv-metadata-quality is provided. Now the user only needs to run this from a virtual environment inside the project directory: $ pip install . Eventually I could publish this on PyPi when I settle on a more appropriate package name. See: https://packaging.python.org/tutorials/packaging-projects/ See: https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
from csv_metadata_quality import app
|
||||
from sys import argv
|
||||
|
||||
def main():
|
||||
app.run(argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.main(argv)
|
||||
main()
|
||||
|
@ -15,7 +15,7 @@ def parse_args(argv):
|
||||
return args
|
||||
|
||||
|
||||
def main(argv):
|
||||
def run(argv):
|
||||
args = parse_args(argv)
|
||||
|
||||
# Read all fields as strings so dates don't get converted from 1998 to 1998.0
|
||||
|
Reference in New Issue
Block a user