Skip to content

Commit

Permalink
fix: resolve user agent warning in wikibase
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Nov 26, 2024
1 parent 3cc7d04 commit fbb1921
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/therapy/etl/wikidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

import datetime
import json
import os
from pathlib import Path
from typing import Any

from tqdm import tqdm
from wags_tails import CustomData, DataSource
from wags_tails.utils.versioning import DATE_VERSION_PATTERN
from wikibaseintegrator.wbi_config import config as wbi_config
from wikibaseintegrator.wbi_helpers import execute_sparql_query

from therapy import XREF_SOURCES
from therapy.etl.base import Base, EtlError
from therapy.schemas import NamespacePrefix, RecordParams, SourceMeta, SourceName

wbi_config["USER_AGENT"] = (
os.environ.get("WIKIBASE_USER_AGENT")
or "thera_py (https://github.com/cancervariants/therapy-normalization)"
)

# Translate Wikidata keys to standardized namespaces
NAMESPACES = {
"casRegistry": NamespacePrefix.CASREGISTRY.value,
Expand Down

0 comments on commit fbb1921

Please sign in to comment.