-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchallanges.qmd
More file actions
122 lines (76 loc) · 3.56 KB
/
Copy pathchallanges.qmd
File metadata and controls
122 lines (76 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
title: "4TU.ResearchData Hackathon"
subtitle: "Challenges"
format:
html:
theme: cosmo
self-contained: true
code-block-bg: true
code-block-border-left: "#31BAE9"
code-copy: true
toc: true
toc-depth: 2
other-links:
- text: Djehuty Documentation
href: https://djehuty.4tu.nl/
- text: Hackathon installation guides
href: https://hackathon.data.4tu.nl/
code-links:
- text: GitHub Repo
icon: github
href: https://github.com/4TUResearchData/djehuty/
---
## Challenge 1 - API Documentation
This one is our work in progress.
Contribute to the [`djehuty` documentation](https://djehuty.4tu.nl/) by adding info about the (v2) API.
In this challenge you will expand [Section 5](https://djehuty.4tu.nl/#x1-430005) of the documentation. This section already provides information about some of the endpoints, but it is still under construction.
:::{.callout-note title="Where to start?"}
In the `djehuty` folder, find file
```{default}
src/djehuty/web/wsgi.py
```
In the file, you can find a procedure `url_map` belonging to the class `ApiServer`. This procedure serves as a dictionary between URIs and procedures. Look for sections `V2 API`. Confront this section with the [documentation](https://djehuty.4tu.nl/#x1-430005) and add sections that are missing, following the documentation convention.
To change the documentation files, go to
```{r}
#| eval: false
doc/api.tex
```
:::
## Challenge 2 - Propose new stats visualisation
This one is for those who feel creative!
Propose visualizations for datasets statistics presented on the landing page.
You can also use other statistics than those displayed now.
And a bonus question:
*Which statistics would you like to have available via `djehuty` API call?*
:::{.callout-note title="Where to start?"}
Start by creating the dummy data. Upload some files and publish them.
Then explore how the present statistics is created in:
```{default}
src/djehuty/web/resources/html_templates/portal.html
```
Look how the data is retrieved using the procedure:
`repository_statistics` in the `djehuty/src/djehuty/web/database.py`.
Inspect the SPARQL templates used and adapt the queries to get the statistics you need.
Once you have the data, start visualising!
:::
## Challenge 3 - GitHub/Gitlab Release integration
This one might sound familiar!
The challenge is based on an [issue](https://github.com/4TUResearchData/djehuty/issues/20) raised after last meeting between the DCC and 4TU.ResearchData technical team.
Work on an automated workflow to connect code hosting platform (GitHub/GitLab/BitBucket/Savannah/Forgejo) releases with 4TU.ResearchData.
:::{.callout-note title="Where to start?"}
There is already some good discussion in the [issue](https://github.com/4TUResearchData/djehuty/issues/20),
so that can be a starting point.
Explore the GitHub documentation and find out how webhooks can be used to achieve our goal.
<!-- - What does Github communicate to 4TU with a webhook? -->
<!-- - Is that sufficient information for the integration? -->
:::
## Challenge 4 - (Advanced) Git big repo results in big memory consumption
This one was *bugging* us for a while.
When you git clone (relatively) big files from 4TU.ResearchData,
`djehuty` process memory usage exceeds 4GB which can cause a system crash.
You can help us solve this puzzle.
:::{.callout-note title="Where to start?"}
The process that is causing the issue is probably `subprocess.run` in
`__git_passthrough` procedure.
You will find it in `src/djehuty/web/wsgi.py`.
:::