antigen-ml 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
antigen_ml/__init__.py ADDED
@@ -0,0 +1,10 @@
1
+ """
2
+ antigen-ml: sequence- and structure-based antigenicity prediction.
3
+
4
+ Author : Amit Sah — SignorLab, North Dakota State University
5
+ License: MIT
6
+ """
7
+
8
+ __version__ = "1.0.0"
9
+ __author__ = "Amit Sah"
10
+ __email__ = "amit.sah@ndsu.edu"
antigen_ml/_entry.py ADDED
@@ -0,0 +1,34 @@
1
+ """
2
+ Entry-point wrappers called by the console_scripts / gui_scripts installed
3
+ by pip. gui.py / train.py / predict.py live inside the antigen_ml package
4
+ directory; each script uses ROOT = Path(__file__).resolve().parent and
5
+ sys.path.insert(0, ROOT / "src") so all internal imports resolve correctly
6
+ whether the package is pip-installed or run from source.
7
+ """
8
+
9
+ from __future__ import annotations
10
+ import runpy
11
+ import sys
12
+ from pathlib import Path
13
+
14
+ # After pip install antigen-ml, this file is at:
15
+ # site-packages/antigen_ml/_entry.py
16
+ # The scripts (gui.py, train.py, predict.py) and src/ are siblings:
17
+ # site-packages/antigen_ml/gui.py
18
+ # site-packages/antigen_ml/src/
19
+ _PKG = Path(__file__).resolve().parent
20
+
21
+
22
+ def _run(name: str) -> None:
23
+ script = _PKG / name
24
+ if not script.exists():
25
+ sys.exit(
26
+ f"[antigen-ml] Cannot find {script}.\n"
27
+ "Re-install: pip install --force-reinstall antigen-ml"
28
+ )
29
+ runpy.run_path(str(script), run_name="__main__")
30
+
31
+
32
+ def gui() -> None: _run("gui.py")
33
+ def train() -> None: _run("train.py")
34
+ def predict() -> None: _run("predict.py")