Skip to content

Commit

Permalink
Merge pull request #205 from medema-group/hotfix/fix-config-pip-install
Browse files Browse the repository at this point in the history
Revert location of config yml file until a default/override config system is in place
  • Loading branch information
adraismawur authored Nov 1, 2024
2 parents a34ee3e + 9a02758 commit ec88659
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions big_scape/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit ec88659

Please sign in to comment.