Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert location of config yml file until a default/override config system is in place #205

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading