Skip to content

Commit db4b7b3

Browse files
northwestwitchChiara Rasi
andauthored
Remove deprecated pkg_resources (#352)
* Remove Removed depreacted pkg_resources * Switch to python 3.9 in test --------- Co-authored-by: Chiara Rasi <rasi.chiara@gmacil.com>
1 parent 8165ce1 commit db4b7b3

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

.github/workflows/pytest_codecov.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Set up Python 3.8
16+
- name: Set up Python 3.9
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.8
19+
python-version: 3.9
2020

2121
- name: Install deps
2222
run: |
@@ -46,10 +46,10 @@ jobs:
4646

4747
- uses: actions/checkout@v4
4848

49-
- name: Set up Python 3.8
49+
- name: Set up Python 3.9
5050
uses: actions/setup-python@v5
5151
with:
52-
python-version: 3.8
52+
python-version: 3.9
5353

5454
# Cache package installation step to speed up the following step
5555
- uses: actions/cache@v4
@@ -76,10 +76,10 @@ jobs:
7676
runs-on: ubuntu-latest
7777
steps:
7878
- uses: actions/checkout@v4
79-
- name: Set up Python 3.8
79+
- name: Set up Python 3.9
8080
uses: actions/setup-python@v5
8181
with:
82-
python-version: 3.8
82+
python-version: 3.9
8383
- name: Install deps
8484
run: |
8585
python -m pip install --upgrade pip

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [unreleased]
2+
### Fixed
3+
- Removed depreacted pkg_resources
4+
15
## [4.5.1] - 2024-09-04
26
### Fixed
37
- Bump actions/download-artifact from 2 to 4 in /.github/workflows (recommended by security advisory)
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import pkg_resources
1+
from importlib.resources import files
22

33
###### Files ######
44
hpo_filename = "resources/hp.obo.txt"
@@ -7,12 +7,9 @@
77
json_api = "resources/api.json"
88

99
###### Paths ######
10-
path_to_hpo_terms = pkg_resources.resource_filename("patientMatcher", hpo_filename)
10+
base = files("patientMatcher")
1111

12-
path_to_phenotype_annotations = pkg_resources.resource_filename(
13-
"patientMatcher", phenotype_annotation_filename
14-
)
15-
16-
path_to_benchmark_patients = pkg_resources.resource_filename("patientMatcher", benchmark_patients)
17-
18-
path_to_json_api = pkg_resources.resource_filename("patientMatcher", json_api)
12+
path_to_hpo_terms = str(base.joinpath(hpo_filename))
13+
path_to_phenotype_annotations = str(base.joinpath(phenotype_annotation_filename))
14+
path_to_benchmark_patients = str(base.joinpath(benchmark_patients))
15+
path_to_json_api = str(base.joinpath(json_api))

0 commit comments

Comments
 (0)