From 35ab077680f7f9808ef5deb3d817c59c1ba57267 Mon Sep 17 00:00:00 2001 From: alessandrofelder Date: Fri, 10 Mar 2023 11:02:04 +0000 Subject: [PATCH 1/2] avoid using deprecated pkg_resources --- src/cellfinder_core/tools/source_files.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/cellfinder_core/tools/source_files.py b/src/cellfinder_core/tools/source_files.py index 3d72e662..d945c330 100644 --- a/src/cellfinder_core/tools/source_files.py +++ b/src/cellfinder_core/tools/source_files.py @@ -1,11 +1,6 @@ -from pkg_resources import resource_filename - - +from pathlib import Path def source_config_cellfinder(): - return resource_filename("cellfinder_core", "config/cellfinder.conf") - + return Path(__file__).parent.parent / "config" / "cellfinder.conf" def source_custom_config_cellfinder(): - return resource_filename( - "cellfinder_core", "config/cellfinder.conf.custom" - ) + return Path(__file__).parent.parent / "config" / "cellfinder.conf.custom" \ No newline at end of file From da1dd7e27123ed39f7c1d1be3e8e8df46e2b710d Mon Sep 17 00:00:00 2001 From: alessandrofelder Date: Fri, 10 Mar 2023 11:23:42 +0000 Subject: [PATCH 2/2] fix linting --- src/cellfinder_core/tools/source_files.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cellfinder_core/tools/source_files.py b/src/cellfinder_core/tools/source_files.py index d945c330..51b16c07 100644 --- a/src/cellfinder_core/tools/source_files.py +++ b/src/cellfinder_core/tools/source_files.py @@ -1,6 +1,9 @@ from pathlib import Path + + def source_config_cellfinder(): return Path(__file__).parent.parent / "config" / "cellfinder.conf" + def source_custom_config_cellfinder(): - return Path(__file__).parent.parent / "config" / "cellfinder.conf.custom" \ No newline at end of file + return Path(__file__).parent.parent / "config" / "cellfinder.conf.custom"