diff --git a/.gitignore b/.gitignore index 111b67d..814af96 100644 --- a/.gitignore +++ b/.gitignore @@ -149,7 +149,7 @@ dmypy.json *.gmt *.gmx -data/ +# Directories to ignore figures/ # OS specifics diff --git a/analysis/[INITIALS]-[DATE]_sample_notebook.ipynb b/analysis/[INITIALS]-[DATE]_sample_notebook.ipynb index 1fbcfe1..f9fff05 100644 --- a/analysis/[INITIALS]-[DATE]_sample_notebook.ipynb +++ b/analysis/[INITIALS]-[DATE]_sample_notebook.ipynb @@ -82,7 +82,7 @@ }, "outputs": [], "source": [ - "from fancypackage.ul import DATA_DIR" + "from fancypackage import FilePaths" ] }, { @@ -124,7 +124,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Any data should be stored in the `data` directory, or somewhere centrally on the cluster. The `data` directly is acessible from anywhere in this repo via `DATA_DIR`: " + "Any data should be stored in the `data` directory, or somewhere centrally on the cluster. The `data` directly is acessible from anywhere in this repo via `FilePaths`: " ] }, { @@ -136,12 +136,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "/nas/groups/treutlein/USERS/mlange/github/analysis_template/data\n" + "/nas/groups/treutlein/USERS/mlange/github/data\n" ] } ], "source": [ - "print(DATA_DIR)" + "print(FilePaths.DATA)" ] }, { @@ -178,7 +178,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.10" + "version": "3.12.7" }, "toc": { "base_numbering": 1, diff --git a/data/dataset_1/processed/.gitkeep b/data/dataset_1/processed/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/data/dataset_1/raw/.gitkeep b/data/dataset_1/raw/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/data/dataset_1/results/.gitkeep b/data/dataset_1/results/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/src/fancypackage/__init__.py b/src/fancypackage/__init__.py index 084105a..89d48bf 100644 --- a/src/fancypackage/__init__.py +++ b/src/fancypackage/__init__.py @@ -1,6 +1,7 @@ from importlib.metadata import version from . import pl, pp, tl, ul +from ._constants import FilePaths -__all__ = ["pl", "pp", "tl", "ul"] +__all__ = ["pl", "pp", "tl", "ul", "FilePaths"] __version__ = version("fancypackage") diff --git a/src/fancypackage/_constants.py b/src/fancypackage/_constants.py new file mode 100644 index 0000000..f8d6dcd --- /dev/null +++ b/src/fancypackage/_constants.py @@ -0,0 +1,11 @@ +from pathlib import Path + + +class FilePaths: + """Paths to the data and figures directories.""" + + ROOT = Path(__file__).parents[3].resolve() + + DATA = ROOT / "data" + FIGURES = ROOT / "figures" + DATASET_1 = DATA / "dataset_1" diff --git a/src/fancypackage/ul/__init__.py b/src/fancypackage/ul/__init__.py index 014120e..31d0f73 100644 --- a/src/fancypackage/ul/__init__.py +++ b/src/fancypackage/ul/__init__.py @@ -1 +1 @@ -from .constants import DATA_DIR, FIG_DIR +from .basic import basic_utility diff --git a/src/fancypackage/ul/basic.py b/src/fancypackage/ul/basic.py new file mode 100755 index 0000000..39c9a2a --- /dev/null +++ b/src/fancypackage/ul/basic.py @@ -0,0 +1,17 @@ +from anndata import AnnData + + +def basic_utility(adata: AnnData) -> int: + """Run a utility function + + Parameters + ---------- + adata + The AnnData object to do something with + + Returns + ------- + Some integer value. + """ + print("Implement a utility function here.") + return 0 diff --git a/src/fancypackage/ul/constants.py b/src/fancypackage/ul/constants.py deleted file mode 100644 index 75df2eb..0000000 --- a/src/fancypackage/ul/constants.py +++ /dev/null @@ -1,7 +0,0 @@ -from pathlib import Path - -ROOT = Path(__file__).parents[3].resolve() - - -DATA_DIR = ROOT / "data" -FIG_DIR = ROOT / "figures"