diff options
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | MANIFEST.in | 3 | ||||
-rw-r--r-- | README.org | 12 | ||||
-rw-r--r-- | etc/strains.csv (renamed from strains.csv) | 0 | ||||
-rw-r--r-- | mypy.ini | 10 | ||||
-rw-r--r-- | pyproject.toml | 3 | ||||
-rw-r--r-- | scripts/__init__.py | 0 | ||||
-rw-r--r-- | scripts/qc.py (renamed from qc.py) | 4 | ||||
-rw-r--r-- | setup.cfg | 21 | ||||
-rw-r--r-- | setup.py | 3 |
10 files changed, 59 insertions, 3 deletions
@@ -1,4 +1,8 @@ /**/*~ /**/*.pyc /.hypothesis -/instance
\ No newline at end of file +/instance +/build +/dist +/bdist +/*.egg-info
\ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..65f3dd8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include README.org +include etc/* +exclude etc/*~
\ No newline at end of file @@ -58,6 +58,18 @@ To check for correct type usage in the application, run: *** Command-Line Version +Clone this repository +#+BEGIN_SRC shell + git clone http://git.genenetwork.org/fredmanglis/gnqc_py.git +#+END_SRC +then install the application +#+BEGIN_SRC shell + $ python3 -m venv .venv + $ source .venv/bin/activate + (.venv) $ pip install . +#+END_SRC + + To run qc against a file, the syntax is: #+BEGIN_SRC shell python3 -m qc [--strainsfile <strainsfile-path>] [--verbose] <filetype> <filepath> diff --git a/strains.csv b/etc/strains.csv index 50ab6c1..50ab6c1 100644 --- a/strains.csv +++ b/etc/strains.csv diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..ba70688 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,10 @@ +[mypy] + +[mypy-flask.*] +ignore_missing_imports = True + +[mypy-pytest.*] +ignore_missing_imports = True + +[mypy-hypothesis.*] +ignore_missing_imports = True
\ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..087fa09 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires=["setuptools"] +build-backend = "setuptools.build_meta"
\ No newline at end of file diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/scripts/__init__.py @@ -34,7 +34,7 @@ def cli_argument_parser(): "If an absolute path is not provided, then the file will be relative to" f"\t'{os.getcwd()}'")) default_strains_file = os.path.join( - os.path.dirname(__file__), "strains.csv") + os.path.dirname(os.path.dirname(__file__)), "etc/strains.csv") parser.add_argument( "-s", "--strainsfile", help=( @@ -75,7 +75,7 @@ def main(): return 1 if not os.path.exists(args.strainsfile): - print("The file '{args.strainsfile}' does not exist.", file=sys.stderr) + print(f"The file '{args.strainsfile}' does not exist.", file=sys.stderr) return 2 if not is_file_mime(args.filepath, "text/tab-separated-values"): diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..72baf7c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,21 @@ +[metadata] +name = qc +version = 0.0.1 +author = Frederick M. Muriithi +description = Quality control app for average and standard-error files +url = http://git.genenetwork.org/fredmanglis/gnqc_py + +[options] +packages = + tests + scripts + quality_control +install_requires = + rq + python-magic +exclude = tests* +include_package_data = True + +[options.entry_points] +console_scripts = + qc = scripts.qc:main
\ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6068493 --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup() |