Skip to content

Commit

Permalink
chore: Bump version to 1.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
karatugo committed Apr 18, 2024
1 parent 726080a commit 45865b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
10 changes: 4 additions & 6 deletions gwas_sumstats_tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ def _env_variable_else(env_var_name: str, default: str) -> str:
"GWAS_CAT_API_STUDIES_URL", "https://www.ebi.ac.uk/gwas/rest/api/studies/"
)

GWAS_CAT_API_INGEST_STUDIES_URL = _env_variable_else(
"GWAS_CAT_API_INGEST_STUDIES_URL",
URL_API_INGEST = _env_variable_else(
"URL_API_INGEST",
"https://www.ebi.ac.uk/gwas/ingest/api/v2/studies/",
# if sandbox, then use
# "https://wwwdev.ebi.ac.uk/gwas/ingest/api/v2/studies/",
)

GWAS_CAT_API_INGEST_STUDIES_URL_SANDBOX = _env_variable_else(
"GWAS_CAT_API_INGEST_STUDIES_URL_SANDBOX",
"https://wwwdev.ebi.ac.uk/gwas/ingest/api/v2/studies/",
)

GWAS_CAT_STUDY_MAPPINGS = {
"genotyping_technology": "genotyping_technology",
Expand Down
11 changes: 3 additions & 8 deletions gwas_sumstats_tools/interfaces/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

from pydantic import ValidationError
from gwas_sumstats_tools.config import (GWAS_CAT_API_STUDIES_URL,
GWAS_CAT_API_INGEST_STUDIES_URL,
GWAS_CAT_API_INGEST_STUDIES_URL_SANDBOX,
URL_API_INGEST,
GWAS_CAT_STUDY_MAPPINGS,
REST_GWAS_CAT_STUDY_MAPPINGS,
STUDY_FIELD_TO_SPLIT,
Expand Down Expand Up @@ -131,7 +130,6 @@ def comment_token(s, mark):
def metadata_dict_from_gwas_cat(
accession_id: str,
is_bypass_rest_api: bool = False,
is_sandbox: bool = False,
) -> dict:
"""Extract metadat from the GWAS Catalog API
Expand All @@ -140,19 +138,16 @@ def metadata_dict_from_gwas_cat(
is_bypass_rest_api(bool, optional): A flag indicating whether the request comes from the sumstats
service. If True, the function bypasses querying the REST API for additional study metadata.
Defaults to False, which means the REST API response will be included in the metadata dict.
is_sandbox(bool, optional): A A flag indicating whether the request comes from the sandbox sumstats
service.
Returns:
Metadata dict
"""
meta_dict = {}
sample_list = []
### DEV ONLY ######
# if is_sandbox:
# study_url = GWAS_CAT_API_INGEST_STUDIES_URL_SANDBOX + accession_id
# if sandbox, then update URL_API_INGEST in config
###################
study_url = GWAS_CAT_API_INGEST_STUDIES_URL + accession_id
study_url = URL_API_INGEST + accession_id
sample_url = study_url + "/samples"
rest_url = GWAS_CAT_API_STUDIES_URL + accession_id

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "gwas-sumstats-tools"
version = "1.0.18"
version = "1.0.19"
description = ""
authors = ["jdhayhurst <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 45865b0

Please sign in to comment.