Skip to content

Commit 425f1d3

Browse files
committed
moving CONTEXTFILE_URL to a separate file so it is easier to update
1 parent e70e58c commit 425f1d3

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

reproschema/context_url.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONTEXTFILE_URL = "https://raw.githubusercontent.com/ReproNim/reproschema/ref/linkml/contexts/reproschema"

reproschema/jsonldutils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from copy import deepcopy
66
import requests
77
from urllib.parse import urlparse
8-
from .utils import start_server, stop_server, lgr, fixing_old_schema, CONTEXTFILE_URL
8+
from .utils import start_server, stop_server, lgr, fixing_old_schema
9+
from .context_url import CONTEXTFILE_URL
910
from .models import (
1011
Item,
1112
Activity,

reproschema/redcap2reproschema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pathlib import Path
77
from bs4 import BeautifulSoup
88
from .models import Activity, Item, Protocol, write_obj_jsonld
9-
from .utils import CONTEXTFILE_URL
9+
from .context_url import CONTEXTFILE_URL
1010

1111
matrix_group_count = {}
1212

reproschema/reproschema2redcap.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
Response,
1515
write_obj_jsonld,
1616
)
17-
from .utils import fixing_old_schema, start_server, stop_server, CONTEXTFILE_URL
17+
from .utils import fixing_old_schema, start_server, stop_server
18+
from .context_url import CONTEXTFILE_URL
1819
from .jsonldutils import load_file, _is_file, _is_url
1920

2021

reproschema/tests/test_rs2redcap_redcap2rs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
from ..models import Protocol, Activity, Item, ResponseOption
1010
from ..jsonldutils import load_file, _is_url
11-
from ..utils import fixing_old_schema, start_server, stop_server, CONTEXTFILE_URL
11+
from ..utils import fixing_old_schema, start_server, stop_server
12+
from ..context_url import CONTEXTFILE_URL
1213
from ..redcap2reproschema import normalize_condition
1314

1415

@@ -356,7 +357,6 @@ def test_rs2redcap_redcap2rs(tmpdir):
356357
)
357358
protocol_schema_final = "output_nimh/nimh_minimal/nimh_minimal/nimh_minimal_schema"
358359

359-
breakpoint()
360360
http_kwargs = {}
361361
stop, port = start_server()
362362
http_kwargs["port"] = port

reproschema/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
lgr = get_logger()
1212

13-
# todo: move it somewhere
14-
CONTEXTFILE_URL = "https://raw.githubusercontent.com/ReproNim/reproschema/ref/linkml/contexts/reproschema"
15-
1613

1714
class LoggingRequestHandler(SimpleHTTPRequestHandler):
1815
def log_message(self, format, *args):

0 commit comments

Comments
 (0)