Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update documentation on new way to contribute #362

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 13 additions & 31 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
# How to Contribute to the OSS-Benchmark project

Contributing to this very project is very easy. If you want to add or change an new institution you will need to edit the [github_repos.json](/github_repos.json) file.

The institution blocks look like this:

```json
{
"uuid": "<generated v4 uuid>",
"sector": "<sector where this institution belongs to>",
"ts": null,
"shortname": "<the short name of the institution>",
"name_de": "<the german name of the instution>",
"orgs": [
{ "name": "<name of the github orga of this instituion>", "ts": null },
{
"name": "<name of the other github orga(s) of this instituion>",
"ts": null
}
]
}
```

**Generate V4 UUID:** https://www.uuidgenerator.net/version4

**Important:** oid as seen in [github_repos.json](/github_repos.json) will be created automaticly when updating the Database, so it doesn't need to be added by you.
Contributing to this very project is very easy. If you want to add or change an new institution you will need to edit the [github_repos.md](/github_repos.md) file.

| **Name** | **organisations** | **Sector** |
|--------------------------------------------------------------------------------------------|-----------------------------------|----------------------|
| Bedag | bedag | IT |
| 56K Cloud | 56kcloud | IT |

Check if you can find the Institution Name of the organisation you would like to add in the List. If not, add it to the List.
If the Institution is already there but your is not organisation not, add only the organisation.

**Important:** The organisation name has to be the same as the name in the url. For example: "https://github.com/bedag" -> organisation Name is "bedag".

**Important:**
sector needs to be one of these:
The sector needs to be one of these:
- FoodBeverage
- Gov_Companies
- Gov_Federal
Expand All @@ -43,14 +30,9 @@ sector needs to be one of these:
- Pharma
- PolitcalParties

Just edit or append a new block to the file and make a pull request.
Just edit or append the file and make a pull request.

If everything is correct it will be added and updated on the website.

### What are ts and why are they set to null

ts are timestamps that are used to check when that organization/institution were crawled.

"null" is the intial value so that the new organization/institution will be crawled with the next crawl run.

After that it will be overwritte in the database.
24 changes: 13 additions & 11 deletions Dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,24 @@ These are the env variables that need to be set-up:
Use the Login Details from KeePass to access the add-Institution-View (Internal use only so far). It allows you to add new Institutions to the TodoInstitution Collection and thus put them into the cue of Institutions which are Crawled. Please read the Instructions in the Userinterface also.


# Update Institutions using the github_repos.json
### What are ts and why are they set to null

Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database.
ts are timestamps that are used to check when that organization/institution were crawled.

This can be done in 4 easy steps:
"null" is the intial value so that the new organization/institution will be crawled with the next crawl run.

1. Pull Repository
2. Enter the connection string, which can be found in Keepass, into the URI field of MongoCompass.
3. Check if the new repository details are valid: the organisation shortname has to match the name in the url of the GitHub page.
After that it will be overwritte in the database.

![MongoCompass Connection string](/assets/images/MongoConnection.png)

4. Choose the **production** DB and then todoInstitution collection.
# Update Institutions using the github_repos.md

![Mongo choose DB](/assets/images/MongoDB.png)
Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database.

This can be done in 4 easy steps:

5. Press **Add Data -> Import file** and choose github_repos.json. Keep in mind that *Stop on errors* needs to be unchecked. Then just click *Import*. Note that Institutions with an ID already present in the DB are not imported/updated in the DB.
1. Open the productive Website (or local, Choose the **production** DB and then todoInstitution collection.)
2. Login. The Credentials can be found in Keepass.
3. Click **Add/Edit an Institution**.
4. Check if the new repository details in "github_repos.md" are valid: the organisation shortname has to match the name in the url of the GitHub page.
5. Add the new Organisation or Edit if nessecary (You can reset the timestamp to cue the institution for crawling).

![Add new Data to DB](/assets/images/AddData.png)
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,7 @@ The crawler will just update the data, starting with the oldest timestamp.

![System Diagram](/assets/images/DBStructure.png)

## Update Institutions
## Update Institutions (read also Contributing.md)

Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database.
Once someone has updated the github_repos.md file and the pull request was merged, the new or updated insitution must be added to the database using the Input Mask for new Institutions. This Input Mask is protected.

This can be done in 4 easy steps:

1. Pull Repository
2. Connect to DB with MongoDB Compass. The Credentials can be found in Keepass
3. Choose the **production** DB and then todoInstitution collection.
4. Press **Add Data -> Import file** and choose github_repos.json. Keep in mind that *Stop on errors* needs to be unchecked. Then just click *Import*.
Loading
Loading