aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--MANIFEST.in3
-rw-r--r--README.org12
-rw-r--r--etc/strains.csv (renamed from strains.csv)0
-rw-r--r--mypy.ini10
-rw-r--r--pyproject.toml3
-rw-r--r--scripts/__init__.py0
-rw-r--r--scripts/qc.py (renamed from qc.py)4
-rw-r--r--setup.cfg21
-rw-r--r--setup.py3
10 files changed, 59 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 7135ef6..91958fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/README.org b/README.org
index 53ac63c..ecf7815 100644
--- a/README.org
+++ b/README.org
@@ -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
diff --git a/qc.py b/scripts/qc.py
index fee74cb..09758cb 100644
--- a/qc.py
+++ b/scripts/qc.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()