Skip to content

Commit ab8882b

Browse files
committed
Add Contributing.md
Motivation Currently, PaNET does not fulfill the community standards for GitHub repositories, e.g. missing license, code of conduct, contributing, security policy, pull request template. Modification A CONTRIBUTING.md file has been added. Update: Installation details for ROBOT (incl. panet-build), instructions for new terms and technique updates, link from README.md. Result Improving the overall quality of the repository. Contributes to #324
1 parent 27fb38c commit ab8882b

File tree

2 files changed

+329
-24
lines changed

2 files changed

+329
-24
lines changed

CONTRIBUTING.md

Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
# Table of Contents
2+
3+
1. [Code of Conduct](#codeOfConduct)
4+
2. [License](#license)
5+
3. [Contributing as a Researcher](#researcherContribution)
6+
1. [New Term Request](#newTermRequest)
7+
2. [Technique Enhancements](#techniqueEnhancement)
8+
3. [Other Contributions](#otherContributions)
9+
4. [Contributing as a Developer](#developerContribution)
10+
1. [Development Setup](#developmentSetup)
11+
2. [Submit a Pull Request](#pullRequest)
12+
3. [Branching & Naming Conventions](#branchesAndNames)
13+
4. [Commit Message Guidelines](#commits)
14+
5. [Style & Linting](#styleAndLinting)
15+
6. [Testing](#testing)
16+
7. [Documentation](#documentation)
17+
5. [Contributing as a Maintainer](#maintainerContribution)
18+
1. [Release Process](#release)
19+
20+
21+
# 1. Code of Conduct <a name="codeOfConduct"></a>
22+
23+
We adopt the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
24+
By participating in this project you agree to abide by its terms. Please read it before interacting
25+
with the community.
26+
27+
28+
# 2. License <a name="license"></a>
29+
30+
By contributing, you agree that your contributions will be licensed under the same license as the project
31+
(see [License](LICENSE)). If you need to discuss licensing, please open an issue or contact a maintainer
32+
directly.
33+
34+
35+
# 3. Contributing as a Researcher <a name="researcherContribution"></a>
36+
37+
38+
## 3.1 New Term Request <a name="newTermRequest"></a>
39+
40+
1. Always search first: Check the existing issues to avoid duplicates.
41+
2. If the topic is already active, please contribute to the discussion there.
42+
2. If no issue on this topic exists, open a new issue using the provided template.
43+
3. Provide a clear title, e.g. "New Term: `name_of_term`".
44+
4. Add a concise description following the predefined headlines.
45+
5. Participate in the upcoming discussion
46+
5. More details will follow soon.
47+
48+
49+
## 3.2 Technique Enhancements And Concerns <a name="techniqueEnhancement"></a>
50+
51+
1. Always search first: Check the existing issues to avoid duplicates.
52+
2. If the topic is already active, please contribute to the discussion there.
53+
2. If no issue on this topic exists, open a new blank issue.
54+
3. Provide a clear title.
55+
4. Add a concise description of
56+
- the current status and what is wrong/inaccurate about it.
57+
- the kind of information you want to add: updating relationships, adding a description,
58+
adding links, ...
59+
- the acutal information.
60+
- some kind of justification, e.g. links to journal articles, wikipedia and other sources, ...
61+
5. Participate in the upcoming discussion
62+
63+
64+
## 3.3 Other Contributions <a name="otherContributions"></a>
65+
66+
If you have additional ideas for using or enhancing, which do not fall into the categories
67+
mentioned above, feel free to contact us! You can
68+
- Submit a blank issue, or
69+
- Reach out directly via [email](panet-maintenance@desy.de).
70+
71+
72+
# 4. Contributing as a Developer <a name="developerContribution"></a>
73+
74+
75+
## 4.1 Development Setup <a name="developmentSetup"></a>
76+
77+
### 4.1.1. Clone the repo (necessary only once)
78+
79+
```
80+
git clone https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology
81+
cd your-repo
82+
```
83+
84+
### 4.1.2. Add remote repository (necessary only once)
85+
86+
```
87+
git remote add upstream git@github.com:ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology.git
88+
```
89+
90+
### 4.1.3. Prepare to use ROBOT (necessary only once)
91+
92+
#### 4.1.3.1 Clone tha panet-build project
93+
94+
See the documentation of [`panet-build`](https://gitlab.desy.de/paul.millar/panet-build).
95+
96+
#### 4.1.3.2 Install ROBOT
97+
98+
The PaNET.owl is generated from an Excel/CSV file using
99+
[ROBOT](https://central.sonatype.com/artifact/org.obolibrary.robot/robot?smo=true) software.
100+
Here are some instructions to generate the OWL file:
101+
102+
##### Check whether java is installed
103+
104+
```
105+
java-version
106+
```
107+
108+
##### Clone source code of 1.8.1 version (recommended in README)
109+
110+
```
111+
git clone https://github.com/ontodev/robot.git robot-1.8.1
112+
```
113+
114+
##### Enter the cloned directory
115+
116+
```
117+
cd robot-1.8.1
118+
```
119+
120+
##### Check if maven is installed
121+
122+
```
123+
mvn -help
124+
```
125+
126+
If not yet installed
127+
128+
```
129+
sudo apt update; sudo apt install -y maven
130+
```
131+
132+
##### Build with maven
133+
134+
```
135+
mvn install
136+
```
137+
138+
##### Check installation
139+
140+
```
141+
java -jar bin/robot.jar --help
142+
```
143+
144+
##### Add following lines in .bashrc
145+
146+
```
147+
## add robot to path
148+
export PATH=$PATH:$CLONE_DIR/robot-1.8.1/bin
149+
```
150+
151+
##### Check if robot works
152+
153+
```
154+
robot --help
155+
```
156+
157+
158+
## 4.2 Submit a Pull Request (PR) <a name="pullRequest"></a>
159+
160+
A Pull Request is supposed to solve an issue that has been discussed with the community. Please create an
161+
issue first and give the community time to think and discuss before creating a Pull Requests.
162+
163+
### 4.2.1. Set up the Development Environment
164+
165+
See the section [Development Setup](#developmentSetup) for details.
166+
167+
### 4.2.2. Fetch from original repository
168+
169+
```
170+
git fetch upstream
171+
```
172+
173+
### 4.2.3. Merge all changes from fork and you local repo
174+
175+
```
176+
git merge upstream/master
177+
```
178+
179+
### 4.2.4. Create a branch
180+
181+
See the section [Branching & Naming Conventions](branchesAndNames) for details.
182+
183+
Create and go to the dedicated branch (based on master state) for the issue that you want to solve:
184+
185+
```
186+
git checkout -b ISS123-meaningful-name master
187+
```
188+
189+
### 4.2.5. Make your changes; keep them focused on a single purpose.
190+
191+
### 4.2.6. Make sure your changes only affect the intended files and lines
192+
193+
```
194+
git diff
195+
```
196+
197+
### 4.2.7. Test you changes on PaNET.csv with ROBOT and Protégé
198+
199+
See the section [Testing](#testing) for details.
200+
201+
### 4.2.8. Update documentation
202+
203+
See the section [Documentation](#documentation) for details.
204+
205+
### 4.2.9. Commit and push
206+
207+
Please use the [Commit Message Guidelines](#commits) below and push your branch to your fork.
208+
209+
```
210+
git add <relevant files, space separated>
211+
git commit
212+
git push origin HEAD
213+
```
214+
215+
### 4.2.10. Open a PR against the master branch.
216+
217+
Open the project repo in the browser. A green button is available to create the pull request.
218+
219+
### 4.2.11. Fill in the PR template, linking any related issue (e.g., Fixes #123, Contributes to #420).
220+
221+
> Tip: If you’re unsure whether a change is welcome, open a draft PR or comment on the related issue first.
222+
223+
224+
## 4.3 Branching & Naming Conventions <a name="branchesAndNames"></a>
225+
226+
Ideally, each PR is based on an individual branch, dedicated to a specific issue. The number of this issue
227+
forms the prefix of the branch name, e.g. `ISS123-`. This prefix is followed by a short description of the
228+
actual task that is worked on. If an issue is very complex, several branches can be created with the same
229+
prefix but different suffixes.
230+
231+
All branches should be based on the latest `master`.
232+
233+
234+
## 4.4 Commit Message Guidelines <a name="commits"></a>
235+
236+
We follow the conventional commits specification:
237+
238+
```
239+
<title>
240+
241+
<motivation>
242+
243+
<modification>
244+
245+
<result>
246+
247+
<related issues> # optional (e.g., "Closes #123", "BREAKING CHANGE: ...")
248+
```
249+
250+
251+
## 4.5 Style & Linting <a name="styleAndLinting"></a>
252+
253+
Currently no recommendations.
254+
255+
256+
## 4.6 Testing <a name="testing"></a>
257+
258+
### 4.6.1 Changes to the ontology
259+
260+
Check that you only made changes that you intended, e.g. that the linebreak symbol did not change,
261+
by using `git diff`.
262+
263+
Inspect your changes to `PaNET.csv` using ROBOT, or graphically with [protégé](https://protege.stanford.edu/)
264+
to make sure that everything is correct.
265+
266+
#### 4.6.1.1 Use ROBOT
267+
268+
See the documentation of [`panet-build`](https://gitlab.desy.de/paul.millar/panet-build) or the
269+
[OBO ROBOT](https://robot.obolibrary.org/) general documentation.
270+
271+
When using `panet-build`, create an owl file from your recent changes with
272+
273+
```
274+
podman run -v ~/git/PaNET/:/work --rm -it panet-build
275+
```
276+
277+
The use of the option `-d` creates a diff to the previous version.
278+
279+
> Attention! The difference file is sensitive to changes in sequence. If two block change their order,
280+
this is flagged as a difference, although it does not impact the information content.
281+
282+
#### 4.6.1.2 Use Protégé
283+
284+
Inspect PaNET graphically and evaluate changes.
285+
286+
1. Install [Protégé](https://protege.stanford.edu/software.php) in Linux.
287+
2. Open your owl file.
288+
3. Run the reasoner: Press `Menu: Reasoner -> Start` reasoner (while `Menu: Reasoner -> HermiT xxxxx`
289+
is selected).
290+
4. Open OWL Viz with by selecting Tab `OWL Viz`.
291+
5. Select your desired terms. Left box "Class hierarchy", owl:Thing -> photon and neutron technique
292+
-> ... (click on triangle to see children)
293+
6. Select the information you want to see:
294+
1. full circle: only selected class
295+
2. three circles in A shape: class and its direct children
296+
3. three circles in V shape: class and its direct parents
297+
4. four circles in square: all classes
298+
5. empty circle: hide class
299+
300+
### 4.6.2 Changes to other documents
301+
302+
Check that you only made changes that you intended, e.g. that the linebreak symbol did not change,
303+
by using `git diff`.
304+
305+
306+
## 4.7 Documentation <a name="documentation"></a>
307+
308+
Please check whether your changes require an update to the documentation. If it is the case, please
309+
update the md files in the repository and documentation webpage accordingly.
310+
311+
1. Keep the Markdown files and the `docs/` folder up‑to‑date.
312+
2. Use Markdown or html for all docs, respectively.
313+
314+
If your PR changes user‑visible behavior, include a short "Usage" snippet in the relevant doc page.
315+
316+
317+
# 5 Contributing as a Maintainer <a name="maintainerContribution"></a>
318+
319+
320+
## 5.1 Release Process <a name="release"></a>
321+
322+
The details of the release process are described in detail in the [documentation](https://expands-eu.github.io/ExPaNDS-experimental-techniques-ontology/release.html).
323+
324+
325+
# Thank you!
326+
327+
Your effort makes this project better for everyone. Happy coding!

README.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,10 @@ This repository is structured as follows:
2323
- the **releases** folder contains the different releases of the PaNET ontology,
2424
- the **gh-pages** branch contains the ontology documentation (produced automatically by a GitHub action).
2525

26-
### Notes on Workflow
2726

28-
This workflow will be automated using CI in a next release.
27+
## How to Contribute
2928

30-
The PaNET.owl is generated from an Excel/CSV file using [ROBOT](https://search.maven.org/artifact/org.obolibrary.robot/robot) software.
31-
Here are some instructions to generate the OWL file:
32-
- if robot-1.8.1/bin/robot.jar does not exist: go to teh directory robot-1.8.1 and do mvn install.
33-
- check robot-1.8.1/bin/robot.jar exists Then execute:
34-
robot template --template PaNET.csv --prefix "PaNET:http://purl.org/pan-science/PaNET/" --ontology-iri "http://purl.org/pan-science/PaNET" --output PaNET.owl
35-
36-
After the PaNET.owl file has been generated, please follow the following steps:
37-
38-
- Open PaNET_metadata.owl in Protégé
39-
- Update metadata (version, created etc) and save
40-
- Open PaNET techniques ontology created by ROBOT in current window
41-
- Refactor/merge ontologies; select both ontologies; create new ontology; save file (ontology IRI http://www.purl.org/pan-science/PaNET/PaNET.owl )
42-
- Start reasoner (e.g. HermiT)
43-
- Export inferred axioms as ontology; tick all boxes and save to the final owl file; Ontology IRI:http://www.purl.org/pan-science/PaNET/PaNET.owl
44-
- Select file name; save as RDF/XML.
45-
- Update the Widoco documentation - this step is done automatically relying on a GitHub Action.
46-
47-
48-
### Review process and release
49-
50-
51-
At the moment, only one reviewer can approve and merge the changes to the master branch. Before any merge to the master branch, it is recommended to upload the new version of the OWL file to BioPortal to ensure that the file is correctly configured and displayed in BioPortal before any release. In each upload, BioPortal will check the validity of the file, convert it to other formats such as RDF and XML. After the merge to master, the PaNET ontology will automatically be updated on BioPortal over the night.
29+
Please read the [Contributing page](CONTRIBUTING.md).
5230

5331

5432
## Restructuring of the ontology

0 commit comments

Comments
 (0)