Skip to content

Commit a585d8b

Browse files
authored
Merge pull request #382 from candleindark/update-dashboard-collection
feat: update available platforms in datalad-usage-dashboard
2 parents eb98c63 + d814dc0 commit a585d8b

File tree

2 files changed

+109
-6
lines changed

2 files changed

+109
-6
lines changed

datalad_registry/tasks/utils/usage_dashboard.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,36 @@ def clone_url(self) -> str:
8787
return str(self.url)
8888

8989

90+
class DataladHubRepo(GinRepo):
91+
"""
92+
Pydantic model for representing a git repo residing on https://hub.datalad.org/
93+
represented in the datalad-usage-dashboard
94+
"""
95+
96+
# Note: The relationship of this model to the `GinRepo` is inspired by the
97+
# `RepoRecord` class in
98+
# https://github.com/datalad/datalad-usage-dashboard/blob/master/src/find_datalad_repos/record.py
99+
100+
@property
101+
def clone_url(self) -> str:
102+
return str(self.url) + ".git"
103+
104+
105+
class AtrisRepo(GinRepo):
106+
"""
107+
Pydantic model for representing a git repo residing on https://atris.fz-juelich.de/
108+
represented in the datalad-usage-dashboard
109+
"""
110+
111+
# Note: The relationship of this model to the `GinRepo` is inspired by the
112+
# `RepoRecord` class in
113+
# https://github.com/datalad/datalad-usage-dashboard/blob/master/src/find_datalad_repos/record.py
114+
115+
@property
116+
def clone_url(self) -> str:
117+
return str(self.url) + ".git"
118+
119+
90120
class DashboardCollection(BaseModel):
91121
"""
92122
Pydantic model for representing the collection of git repos represented
@@ -96,3 +126,5 @@ class DashboardCollection(BaseModel):
96126
github: list[GHRepo]
97127
osf: list[OSFRepo]
98128
gin: list[GinRepo]
129+
hub_datalad_org: list[DataladHubRepo]
130+
atris: list[AtrisRepo]

datalad_registry/tests/test_tasks/test_usage_dashboard_sync.py

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,68 @@
7676
"stars": 0,
7777
"status": "active"
7878
}
79+
],
80+
"hub_datalad_org": [
81+
{
82+
"id": 4689,
83+
"name": "ABCD-J/www",
84+
"url": "https://hub.datalad.org/ABCD-J/www",
85+
"stars": 0,
86+
"status": "gone",
87+
"updated": "2025-02-28T09:34:00Z"
88+
},
89+
{
90+
"id": 4648,
91+
"name": "adina/datalad-blog",
92+
"url": "https://hub.datalad.org/adina/datalad-blog",
93+
"stars": 0,
94+
"status": "active",
95+
"updated": "2024-08-27T15:10:08Z"
96+
}
97+
],
98+
"atris": [
99+
{
100+
"id": 438,
101+
"name": "MeteoCloud/ERA5",
102+
"url": "https://atris.fz-juelich.de/MeteoCloud/ERA5",
103+
"stars": 0,
104+
"status": "active",
105+
"updated": "2025-02-24T04:33:54Z"
106+
},
107+
{
108+
"id": 455,
109+
"name": "CAIRT/SCIREC-grids",
110+
"url": "https://atris.fz-juelich.de/CAIRT/SCIREC-grids",
111+
"stars": 0,
112+
"status": "active",
113+
"updated": "2024-09-23T09:33:21Z"
114+
}
79115
]
80116
}
81-
""",
117+
""",
82118
{
83119
"https://github.com/1104HARI/s3cmd.git",
84120
"https://gin.g-node.org/AIDAqc_datasets/7_m_RT_Bo",
85121
"http://db/example.git",
122+
"https://atris.fz-juelich.de/CAIRT/SCIREC-grids.git",
86123
},
87124
{
88125
"https://github.com/1104HARI/fail2ban.git",
89126
"https://gin.g-node.org/AIDAqc_datasets/117_m_RT_Vr",
127+
"https://hub.datalad.org/adina/datalad-blog.git",
128+
"https://atris.fz-juelich.de/MeteoCloud/ERA5.git",
90129
},
91130
),
92131
(
93132
"""
94-
{
95-
"github": [],
96-
"osf": [],
97-
"gin": []
98-
}""",
133+
{
134+
"github": [],
135+
"osf": [],
136+
"gin": [],
137+
"hub_datalad_org": [],
138+
"atris": []
139+
}
140+
""",
99141
{
100142
"https://github.com/1104HARI/s3cmd.git",
101143
"https://gin.g-node.org/AIDAqc_datasets/7_m_RT_Bo",
@@ -167,6 +209,34 @@
167209
"stars": 0,
168210
"status": "active"
169211
}
212+
],
213+
"hub_datalad_org": [
214+
{
215+
"id": 4689,
216+
"name": "ABCD-J/www",
217+
"url": "https://hub.datalad.org/ABCD-J/www",
218+
"stars": 0,
219+
"status": "active",
220+
"updated": "2025-02-28T09:34:00Z"
221+
},
222+
{
223+
"id": 4648,
224+
"name": "adina/datalad-blog",
225+
"url": "https://hub.datalad.org/adina/datalad-blog",
226+
"stars": 0,
227+
"status": "gone",
228+
"updated": "2024-08-27T15:10:08Z"
229+
}
230+
],
231+
"atris": [
232+
{
233+
"id": 438,
234+
"name": "MeteoCloud/ERA5",
235+
"url": "https://atris.fz-juelich.de/MeteoCloud/ERA5",
236+
"stars": 0,
237+
"status": "gone",
238+
"updated": "2025-02-24T04:33:54Z"
239+
}
170240
]
171241
}
172242
""",
@@ -176,6 +246,7 @@
176246
"https://github.com/1104HARI/s3cmd.git",
177247
"https://gin.g-node.org/AIDAqc_datasets/117_m_RT_Vr",
178248
"https://gin.g-node.org/AIDAqc_datasets/7_m_RT_Bo",
249+
"https://hub.datalad.org/ABCD-J/www.git",
179250
},
180251
),
181252
],

0 commit comments

Comments
 (0)