diff --git a/pgscatalog_utils/download/download_scorefile.py b/pgscatalog_utils/download/download_scorefile.py index d0e5a55..4139fd3 100644 --- a/pgscatalog_utils/download/download_scorefile.py +++ b/pgscatalog_utils/download/download_scorefile.py @@ -47,7 +47,7 @@ def download_scorefile() -> None: f"Setting user agent to {config.PGSC_CALC_VERSION} for PGS Catalog API queries") else: config.PGSC_CALC_VERSION = f"pgscatalog_utils/{version}" - logger.warn(f"No user agent set, defaulting to {config.PGSC_CALC_VERSION}") + logger.warning(f"No user agent set, defaulting to {config.PGSC_CALC_VERSION}") config.OUTDIR = pathlib.Path(args.outdir).resolve() logger.info(f"Download directory: {config.OUTDIR}") diff --git a/tests/test_combine.py b/tests/test_combine.py index 306564f..db92cc9 100644 --- a/tests/test_combine.py +++ b/tests/test_combine.py @@ -33,7 +33,7 @@ def test_fail_combine(scorefiles, tmp_path_factory): @pytest.fixture def _n_variants(pgs_accessions): - result = CatalogQuery(CatalogCategory.SCORE, accession=pgs_accessions, pgsc_calc_version=None).get()[0] + result = CatalogQuery(CatalogCategory.SCORE, accession=pgs_accessions).get()[0] json = result.response n: list[int] = jq.compile("[.results][][].variants_number").input(json).all() return sum(n) diff --git a/tests/test_download.py b/tests/test_download.py index 27e5a6a..f87d8f4 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -92,13 +92,11 @@ def test_download_trait(tmp_path): def test_query_publication(): # publications are relatively static - query: list[CatalogResult] = CatalogQuery(CatalogCategory.PUBLICATION, accession="PGP000001", - pgsc_calc_version=None).get() + query: list[CatalogResult] = CatalogQuery(CatalogCategory.PUBLICATION, accession="PGP000001").get() assert not query[0].pgs_ids.difference({'PGS000001', 'PGS000002', 'PGS000003'}) def test_query_trait(): # new scores may be added to traits in the future - query: list[CatalogResult] = CatalogQuery(CatalogCategory.TRAIT, accession="EFO_0004329", - pgsc_calc_version=None).get() + query: list[CatalogResult] = CatalogQuery(CatalogCategory.TRAIT, accession="EFO_0004329").get() assert not {'PGS001901', 'PGS002115'}.difference(query[0].pgs_ids)