Skip to content

Commit 2da7a64

Browse files
committed
Finish how-to-contribute incl screenshots
1 parent 209283d commit 2da7a64

10 files changed

+138
-60
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Thank you for your interest in contributing to the Voc4Cat vocabulary! This SKOS
44

55
## Quick Start
66

7-
1. **Download** the current vocabulary Excel file: [voc4cat.xlsx](https://nfdi4cat.github.io/voc4cat/dev/voc4cat.xlsx)
8-
2. **Edit** the Excel file to add/modify concepts
9-
3. **Request a range of IDs** (for new concepts): [Create an issue](https://github.com/nfdi4cat/voc4cat/issues/new/choose)
7+
1. **Request a range of IDs** (for new concepts): [Create an issue](https://github.com/nfdi4cat/voc4cat/issues/new/choose)
8+
2. **Download** the current vocabulary Excel file: [voc4cat.xlsx](https://nfdi4cat.github.io/voc4cat/dev/voc4cat.xlsx)
9+
3. **Edit** the Excel file to add/modify concepts
1010
4. **Submit** your Excel file in a pull request:
1111
- Create a new branch for the changes in your fork and switch to it
1212
- Place file in `inbox-excel-vocabs/` folder

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ you can use this link to the [SKOS testing tool](http://skos-play.sparna.fr/skos
6969

7070
The latest release of voc4cat is available via
7171

72-
* [Skosmos](https://semanticlookup.zbmed.de/skosmos/voc4cat/en/) operated by [ZBmed](https://www.zbmed.de/en/). The Skosmos API is used for the integration of Voc4Cat into the NFDI4Cat data repository **[repo4cat](https://repository.nfdi4cat.org/)**.
72+
* [Skosmos](https://semanticlookup.zbmed.de/skosmos/voc4cat/en/) operated by [ZB MED](https://www.zbmed.de/en/). The Skosmos API is used for the integration of Voc4Cat into the NFDI4Cat data repository **[repo4cat](https://repository.nfdi4cat.org/)**.
7373
* [TIB Terminology Service](https://terminology.tib.eu/ts/ontologies/voc4cat) which is based on a customized OLS version.
7474

7575
Both services offer API access to voc4cat. Skosmos has more SKOS-specific features than OLS and is therefore recommended.
@@ -156,6 +156,6 @@ This work was funded by the German Research Foundation (DFG) through the project
156156
Special thanks to:
157157

158158
- [Roman Baum](https://github.com/rombaum) and his team who helped us to make voc4cat accessible via Skosmos in a [TS4NFDI incubator project](https://terminology.services.base4nfdi.de/incubators), see also [doi:10.5281/zenodo.16736361](https://doi.org/10.5281/zenodo.16736361).
159-
- [ZBmed](https://www.zbmed.de/en/) for operating the Skosmos instance that provides a modern [user interface](https://semanticlookup.zbmed.de/skosmos/voc4cat/en/) for browsing Voc4Cat plus REST API access.
159+
- [ZB MED](https://www.zbmed.de/en/) for operating the Skosmos instance that provides a modern [user interface](https://semanticlookup.zbmed.de/skosmos/voc4cat/en/) for browsing Voc4Cat plus REST API access.
160160
- [TIB - Leibniz Information Centre for Science and Technology](https://www.tib.eu/en/) for providing API access to Voc4Cat.
161161
- [W3ID Consortium](https://w3id.org) for making its permanent URL service available to the community.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@
9494
# HTML to be show in a announcement banner at the top of the page
9595
"announcement":
9696
'<em>News: Voc4Cat is available via <a class="reference external" href="https://semanticlookup.zbmed.de/skosmos/voc4cat/en/">Skosmos</a>'
97-
' at ZBmed thanks to a <a class="reference external" href="https://terminology.services.base4nfdi.de/incubators">TS4NFDI incubator</a> project.'
97+
' at ZB MED thanks to a <a class="reference external" href="https://terminology.services.base4nfdi.de/incubators">TS4NFDI incubator</a> project.'
9898
' (2025-11-09) </em>',
9999
}

docs/docs_usage/how-to-contribute.md

Lines changed: 132 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# How to contribute to Voc4Cat?
22

3+
The contribution process is almost the same as in source code repositories.
4+
Below we describe the steps in detail so that beginners without git or GitHub experience can follow.
5+
The essentials of the contribution process are:
6+
7+
1. **Request a range of IDs** (for new concepts): [Create an issue](https://github.com/nfdi4cat/voc4cat/issues/new/choose)
8+
2. **Download** the current vocabulary Excel file: [voc4cat.xlsx](https://nfdi4cat.github.io/voc4cat/dev/voc4cat.xlsx)
9+
3. **Edit** the Excel file to add/modify concepts
10+
4. **Submit** your Excel file in a pull request placing your changed `voc4cat.xlsx` in the `inbox-excel-vocabs/` folder (keep the filename)
11+
12+
```{figure} media/workflow.png
13+
:alt: GitHub contribution workflow and continuous integration pipeline
14+
15+
**Vocabulary contribution workflow & Continuous Integration (CI) Pipeline.**
16+
```
17+
318
## Step-by-step contribution guide
419

520
The main steps that a community member needs to follow to contribute to
@@ -20,11 +35,7 @@ flowchart LR
2035
B5[Step 5<br>Get latest Excel template] --> B6[Step 6<br>Edit concepts in Excel] --> B7[Step 7<br>Open PR and iterate]
2136
```
2237

23-
```{admonition} Contribution overview
24-
:class: tip
25-
26-
Below is a compact overview of the contribution flow. Select the tabs that match your preferred way of working, either Git commands or GitHub Web UI.
27-
```
38+
What happens during the contribution steps is visualized in the next figure.
2839

2940
### Initial steps (one-time)
3041

@@ -114,8 +125,8 @@ Go to the [voc4cat-homepage](https://nfdi4cat.github.io/voc4cat/), and download
114125
Second you have to **update your voc4cat-fork**.
115126
While not essential it is strongly recommended that the vocabulary stored in the repository as RDF/turtle files matches the concepts stored in the downloaded xlsx file.
116127

117-
::::{tab-set}
118-
:::{tab-item} Git commands
128+
:::::{tab-set}
129+
::::{tab-item} Git commands
119130
:sync: Git commands
120131
From the root directory of your cloned repo:
121132

@@ -132,15 +143,27 @@ From the root directory of your cloned repo:
132143
```
133144

134145
3. Place the freshly download voc4cat xlsx-file in `inbox-excel-vocabs/voc4cat.xlsx`. Do not change the filename.
135-
:::
146+
::::
136147

137-
:::{tab-item} GitHub Web UI
148+
::::{tab-item} GitHub Web UI
138149
:sync: GitHub Web UI
139-
Open your fork of voc4cat <https://github.com/your_username/voc4cat> in the browser.
150+
1. Open your fork of voc4cat <https://github.com/your_username/voc4cat> in the browser.
151+
152+
2. Sync your fork with upstream nfdi4cat/voc4cat. Press the green "Sync fork" button which makes your fork/clone an exact copy of upstream `main` again (nfdi4cat/voc4cat). If this fails, see [](#troubleshooting).
153+
154+
:::{dropdown} **Be careful when you "*Sync fork*" in GitHub UI.**
155+
:icon: copilot-warning
156+
**It should look like this screenshot.** Your main branch should only be behind the forked repository (not ahead of it).
140157

141-
Press the green "Sync fork" button. If this fails, see [](#troubleshooting).
158+
![](media/fork_behind_forked_repo.png)
159+
160+
**If your main-branch is ahead of main in the forked repo, do not press "*Sync fork*"** but go to [](#troubleshooting).
161+
162+
![](media/fork_ahead_forked_repo_conflict_case.png)
142163
:::
164+
143165
::::
166+
:::::
144167

145168
#### Step 6 – Add / edit concepts in Excel
146169

@@ -312,78 +335,124 @@ These guidelines for suggesting, adding, and editing content to Voc4Cat guarante
312335
**Vocabulary xlsx file rules**
313336

314337
- Provide clear definition text (concise, domain-relevant).
315-
- Do not change the Excel template structure (sheet names, header rows, column order).
316338
- Keep changes focussed. Solve one issue or add/edit a set of strongly related concepts.
317339
- Not more than 20 new concepts per PR. This keeps the review process manageable for you and the curators. Less is better!
340+
- Do not change the Excel template structure (sheet names, header rows, column order).
318341

319-
#### Step 7 – Open & iterate on the Pull Request
342+
#### Step 7 – Create & iterate on the Pull Request
320343

321-
```{warning}
322-
Do not create PRs from your fork's main branch. Always work on a feature branch (created in Step 5).
323-
```
344+
After you finished the additions and edits in the Voc4Cat xlsx file,
345+
the update file can be submitted. This happens in a “*Pull request*”.
324346

325-
```{tip}
326-
Before starting work, sync your fork/clone with upstream `main` to avoid conflicts.
327-
```
347+
Make sure that you are in your fork .
328348

329349
::::{tab-set}
330350
:::{tab-item} Git commands
331351
:sync: Git commands
332-
Push branch (first time):
352+
Add and commit the xlsx file to your local feature branch.
353+
If you changed other files as part of your contribution, `git add` them as well (before commit).
354+
355+
```bash
356+
git add inbox-excel-vocabs/voc4cat.xlsx
357+
git commit -m "A meaningful commit message"
358+
```
359+
360+
Push the branch to GitHub (first time):
361+
362+
```bash
363+
git push -set-upstream origin <your-feature-branch-name>
364+
```
333365

334-
- `git push -u origin feat/<short-topic>`
366+
and for later updates:
335367

336-
Open PR in browser (compare: your branch; base: nfdi4cat/voc4cat `main`). Use
337-
template & checklist.
338-
For updates: edit Excel, commit, push again:
368+
```bash
369+
git push
370+
```
339371

340-
- `git add inbox-excel-vocabs/voc4cat.xlsx`
341-
- `git commit -m "update: refine definitions (IDs ####–####)"`
342-
- `git push`
343372
:::
373+
344374
:::{tab-item} GitHub Web UI
345375
:sync: GitHub Web UI
346-
Click “Compare & pull request” after pushing branch or use “New pull request”.
347-
Fill description: summary, ID range, confirmation of broader chains, no TTL
348-
edits. Mark checklist. Use Draft PR for early feedback. To update: re-upload
349-
improved Excel to same path; commit automatically appears in PR.
350-
After approval a maintainer merges; CI generates TTL & HTML preview.
376+
377+
- Open the GitHub page of your fork `https://github.com/<your_username>/voc4cat` and - if you already created a branch for your contribution - switch to the branch.
378+
- Open the “inbox-excel-vocabs” folder
379+
- Click click on the "*Add file*" then "*Upload files*" to open a file a file submission page.
380+
- Upload the voc4cat.xlsx file (the file name must be exactly this).
381+
- Commit the uploaded file making sure that you **commit to your feature-branch** (not `main`). If you have to create a new branch, you may change the default name to a more reasonable name describing your contribution in the form `issue###_<short_title>`.
382+
351383
:::
352384
::::
353385

354-
**PR checklist**
386+
**Create the pull request**
387+
388+
The easiest way is go to the original [nfdi4cat/voc4cat](https://github.com/nfdi4cat/voc4cat) repository.
389+
A notification will show up (1st screenshot) and if you click "Compare & pull request" the defaults will be correct (2nd screenshot).
390+
391+
```{figure} media/create-pr-msg.png
392+
:alt: Screenshot of GitHub UI suggesting to create a PR from your fork
393+
394+
Vocabulary contribution workflow & Continuous Integration (CI) Pipeline
395+
```
396+
397+
```{figure} media/selecting-source-and-target-branch-for-pr.png
398+
:alt: Screenshot of GitHub UI with the correct selection of source and target branch for your PR
399+
400+
Check that the source is your feature branach and the target is `nfdi4cat/voc4cat`
401+
```
402+
403+
Here are some points to check before you finally submit the PR:
355404

356-
- [ ] File is `inbox-excel-vocabs/voc4cat.xlsx` (name and path unchanged)
357-
- [ ] IDs are within my allocated range
358-
- [ ] Each concept has prefLabel, definition, and a broader chain to a top concept
359-
- [ ] Contribution is focused/small enough for review (split if needed)
360-
- [ ] No `.ttl` files edited
361-
- [ ] PR title and description summarize the motivation and scope
405+
- PR title and description summarize motivation and scope.
406+
- Vocabulary file is `inbox-excel-vocabs/voc4cat.xlsx` (name and path unchanged).
407+
- IDs of added concepts are within my allocated range.
408+
- Each concept has prefLabel, definition, and a broader chain to a top concept.
409+
- Contribution is focused/small enough for review (split if needed).
410+
- No `.ttl` files edited.
362411

363412
```{tip}
364-
Open your PR as "Draft" if you want early feedback. Mention any specific questions. Curators are informed automatically about every new PR.
413+
Open your PR as "Draft" if you want early feedback. Mention any specific questions. Curators are informed automatically about every new PR, also drafts.
365414
```
366415

367-
The xlsx file is ephemeral and never stored in the repository. It is generated from the RDF/turtle files.
416+
**What happens next?**
368417

369-
**Review priorities**
418+
When the PR is submitted, an automated Continuous Integration (CI) pipeline is triggered.
419+
The pipeline first checks the submitted Excel file for various errors.
370420

371-
1. Classification completeness
372-
2. ID correctness
373-
3. Scope / definition clarity
374-
4. Optional enhancements (examples, altLabels)
421+
If errors are detected, github reports the failed job with a red cross, see example
422+
423+
![GitHub Screenshot of action failure](media/PR-action-failure.png)
424+
425+
To find out more about the reasons for the failure, click on the red cross ❌.
426+
This brings you to a page with a run log that typically gives enough information to understand the reason for the failure.
427+
In addition to the run log, we also create a so called job artifact which can be accessed by going to the job "*Summary*" from the run log page.
428+
The artifact is a zip-file with several files that help to diagnose the source of the failure. It contains:
429+
430+
- log-file of the run
431+
- xlsx vocabulary file enriched with error information in the failing row (for some errors).
432+
- HTML vocabulary documentation (useful to check the broader/narrower hierarchy)
433+
434+
If the run succeeded you see a similar job message but with a green checkmark:
435+
![GitHub Screenshot of action success](media/succesful-job-with-ttl-commit.png)
436+
437+
The second line with the GitHub icon is a commit created by the pipeline in which
438+
439+
- the xlsx vocabulary file gets removed and
440+
- the RDF/turtle (ttl-files) with the SKOS representation are added.
441+
442+
If you work on a local checkout on you computer, you need to pull this commit made on GitHub to your local clone with `git pull`.
443+
444+
**Later updates on your PR**
445+
446+
For updates: Switch to the previously created feature branch, fix the xlsx file (or other files) Excel, commit and push it again.
375447

376448
#### After merge
377449

378-
CI builds and publishes updated development version. Verify your concepts
379-
using:
450+
CI builds and publishes the updated development version.
380451

381-
- HTML preview: https://nfdi4cat.github.io/voc4cat/dev/voc4cat/index.html
452+
- Go to the [homepage](https://nfdi4cat.github.io/voc4cat/) which is now updated with your contribution.
382453
- Download new Excel if planning further contributions.
383454

384-
```{tip}
385-
Open follow-up issue for any post-merge adjustments; do not edit generated Turtle directly.
386-
```
455+
Note that this development version is not published to Skosmos at ZB Med or the TIB Technology service. Only releases are published to these services.
387456

388457
## Contributing to the homepage
389458

@@ -397,9 +466,18 @@ To help you checking your changes before making a pull request, we provide instr
397466

398467
## Troubleshooting
399468

400-
- Step 5: failing sync.
469+
- **Fork out-of-sync** If you ever committed to the main branch in your repository directly, your history is no longer the same as in the upstream voc4cat.
470+
This is a problem because it creates a merge conflict.
471+
The fix is to reset your main match the upstream one exctly.
472+
You can do this via the following git command:
473+
474+
```bash
475+
git fetch upstream
476+
git reset --hard upstream/main
477+
git push --force
478+
```
401479

402-
## Qquestions or issues?
480+
## Questions or issues?
403481

404482
- Vocabulary discussions: <https://github.com/nfdi4cat/voc4cat/issues>
405483
- Tooling improvements (voc4cat-tool): <https://github.com/nfdi4cat/voc4cat-tool/issues>
7.51 KB
Loading
49.7 KB
Loading
48.4 KB
Loading
34.1 KB
Loading
28.1 KB
Loading
15.8 KB
Loading

0 commit comments

Comments
 (0)