Skip to content

Commit 948d7ff

Browse files
Rename source_label to source_name
1 parent ba820b6 commit 948d7ff

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

app/db/types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,21 +530,21 @@ class ExternalSource(StrEnum):
530530
class ExternalSourceInfo(TypedDict):
531531
"""Additional information for the external source."""
532532

533-
label: str
533+
name: str
534534
allowed_url: str
535535

536536

537537
EXTERNAL_SOURCE_INFO: dict[ExternalSource, ExternalSourceInfo] = {
538538
ExternalSource.channelpedia: {
539-
"label": "Channelpedia",
539+
"name": "Channelpedia",
540540
"allowed_url": "https://channelpedia.epfl.ch/",
541541
},
542542
ExternalSource.icgenealogy: {
543-
"label": "ICGenealogy",
543+
"name": "ICGenealogy",
544544
"allowed_url": "https://icg.neurotheory.ox.ac.uk/",
545545
},
546546
ExternalSource.modeldb: {
547-
"label": "ModelDB",
547+
"name": "ModelDB",
548548
"allowed_url": "https://modeldb.science/",
549549
},
550550
}

app/schemas/external_url.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class NestedExternalUrlRead(
4747

4848
@computed_field
4949
@property
50-
def source_label(self) -> str:
51-
return EXTERNAL_SOURCE_INFO[self.source]["label"]
50+
def source_name(self) -> str:
51+
return EXTERNAL_SOURCE_INFO[self.source]["name"]
5252

5353

5454
class ExternalUrlRead(

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ def publication(db, publication_json_data, person_id):
10901090
def external_url_json_data():
10911091
return {
10921092
"source": "channelpedia",
1093-
"source_label": "Channelpedia",
1093+
"source_name": "Channelpedia",
10941094
"url": "https://channelpedia.epfl.ch/wikipages/188",
10951095
"name": "Potassium channel page on Channelpedia",
10961096
"description": "Contains description of potassium channels...",

0 commit comments

Comments
 (0)