diff --git a/config.yml b/big_scape/config.yml similarity index 100% rename from config.yml rename to big_scape/config.yml diff --git a/big_scape/paths.py b/big_scape/paths.py index 5b6ffa28..14ab1d11 100644 --- a/big_scape/paths.py +++ b/big_scape/paths.py @@ -2,8 +2,8 @@ import pkg_resources -DB_SCHEMA_FILE = pkg_resources.resource_filename( - "bigscape", "big_scape/data/schema.sql" -) -TEMPLATES_OUTPUT_DIR = pkg_resources.resource_filename("bigscape", "big_scape/output") -DEFAULT_CONFIG_FILE = pkg_resources.resource_filename("bigscape", "config.yml") +DB_SCHEMA_FILE = pkg_resources.resource_filename("big_scape", "data/schema.sql") +TEMPLATES_OUTPUT_DIR = pkg_resources.resource_filename("big_scape", "output") +# config is in base directory, not in module +# get path to package directory +DEFAULT_CONFIG_FILE = pkg_resources.resource_filename("big_scape", "config.yml") diff --git a/pyproject.toml b/pyproject.toml index df5f112a..7be727eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,10 @@ dev = [ "Repository" = "https://github.com/medema-group/BiG-SCAPE" # TODO: documentation +[tool.setuptools.package-data] +'big_scape' = ['config.yml'] +'data' = ['data/schema.sql'] + [build-system] requires = ["hatchling"] build-backend = "hatchling.build" diff --git a/test/integration/test_comparison.py b/test/integration/test_comparison.py index 407daa3c..4f915c9a 100644 --- a/test/integration/test_comparison.py +++ b/test/integration/test_comparison.py @@ -456,7 +456,7 @@ def test_calculate_scores_pair(self): "legacy_weights": True, "record_type": bs_enums.RECORD_TYPE.REGION, "cores": 1, - "config_file_path": Path("config.yml"), + "config_file_path": Path("big_scape/config.yml"), } gbks_with_hsp = [