From c8a5908e07c78379fbeab02876d4f484618c166e Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 7 Dec 2023 14:52:25 -0500 Subject: [PATCH] Include package data --- jbrowse_jupyter/{ => data}/hg19.json | 0 jbrowse_jupyter/{ => data}/hg19_cgv.json | 0 jbrowse_jupyter/{ => data}/hg38.json | 0 jbrowse_jupyter/{ => data}/hg38_cgv.json | 0 jbrowse_jupyter/util.py | 6 ++++-- 5 files changed, 4 insertions(+), 2 deletions(-) rename jbrowse_jupyter/{ => data}/hg19.json (100%) rename jbrowse_jupyter/{ => data}/hg19_cgv.json (100%) rename jbrowse_jupyter/{ => data}/hg38.json (100%) rename jbrowse_jupyter/{ => data}/hg38_cgv.json (100%) diff --git a/jbrowse_jupyter/hg19.json b/jbrowse_jupyter/data/hg19.json similarity index 100% rename from jbrowse_jupyter/hg19.json rename to jbrowse_jupyter/data/hg19.json diff --git a/jbrowse_jupyter/hg19_cgv.json b/jbrowse_jupyter/data/hg19_cgv.json similarity index 100% rename from jbrowse_jupyter/hg19_cgv.json rename to jbrowse_jupyter/data/hg19_cgv.json diff --git a/jbrowse_jupyter/hg38.json b/jbrowse_jupyter/data/hg38.json similarity index 100% rename from jbrowse_jupyter/hg38.json rename to jbrowse_jupyter/data/hg38.json diff --git a/jbrowse_jupyter/hg38_cgv.json b/jbrowse_jupyter/data/hg38_cgv.json similarity index 100% rename from jbrowse_jupyter/hg38_cgv.json rename to jbrowse_jupyter/data/hg38_cgv.json diff --git a/jbrowse_jupyter/util.py b/jbrowse_jupyter/util.py index 48b3a3c..599d54c 100644 --- a/jbrowse_jupyter/util.py +++ b/jbrowse_jupyter/util.py @@ -58,11 +58,13 @@ def get_default(name, view_type="LGV"): """Returns the configuration object given a genome name.""" if view_type == "CGV": with importlib.resources.open_text( - "jbrowse_jupyter", f"{name}_cgv.json" + "jbrowse_jupyter.data", f"{name}_cgv.json" ) as file: return json.load(file) else: - with importlib.resources.open_text("jbrowse_jupyter", f"{name}.json") as file: + with importlib.resources.open_text( + "jbrowse_jupyter.data", f"{name}.json" + ) as file: return json.load(file)