Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelsemion committed Aug 4, 2021
1 parent c723c22 commit ddd9199
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ venv/
.ipynb_checkpoints

d3-country-bubble-chart-master
oss-github-benchmark.json
oss-github-benchmark.csv

dist
node_modules
Expand Down
107 changes: 107 additions & 0 deletions assets/oss-github-benchmark.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/oss-github-benchmark.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions data-gathering/OSS_github_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def badStuff(dic):
# Von allen Branchen die Institutionen (Firmen, Behörden, Communities...) rausholen
while j < len(sector["institutions"]):
institution = sector["institutions"][j]
j += 1
print(j)
institution_data = {
"uuid": institution["uuid"],
"shortname": institution["shortname"],
Expand Down Expand Up @@ -169,6 +167,8 @@ def badStuff(dic):
"name": "",
"uuid": str(uuid.uuid4()),
"url": "",
"institution": institution_data["shortname"],
"organization": organization_data["name"],
"fork": False,
"archived": False,
"num_forks": 0,
Expand Down Expand Up @@ -374,7 +374,7 @@ def badStuff(dic):
organization_data["total_num_forks_in_repos"] += 1
organization_data["total_num_commits"] += repo_data["has_own_commits"]
except RuntimeError as error:
print("Fehler beim Laden der Daten von '" + repo.name + "' : " + error)
print("Fehler beim Laden der Daten von '" + repo.name + "' : " + str(error))
try:
badStuff(repo)
except:
Expand Down Expand Up @@ -405,9 +405,9 @@ def badStuff(dic):
badStuff(repo)
except:
try:
badStuff({"error": f"error in repo {repo.name} of org {org_name}"})
except:
badStuff({"error": f"error in org {org_name}"})
except () as e:
badStuff({"error": f"{str(e)}"})
traceback.print_exc()
print("Anzahl GitHub Repos von " + institution["name_de"] + ": " + str(institution_data["num_repos"]))
institutions_data.append(institution_data)
Expand All @@ -428,6 +428,7 @@ def badStuff(dic):
collectionInstitutions.replace_one({ "uuid" : institution_data["uuid"] }, institution_data, upsert=True)
if len(institution_data["repos"]) != 0:
collectionRepositoriesNew.insert_many(institution_data["repos"])
j += 1
saveProgress()
i += 1
j = 0
Expand Down
3 changes: 1 addition & 2 deletions data-gathering/github_repos.json
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@
"name_de": "Swisscom",
"orgs": [
"swisscom",
"ScsApiTribe",
"SwisscomTrustServices",
"swisscom-developer",
"sinso",
Expand All @@ -587,7 +586,7 @@
"uuid": "137478fc-ee92-43a4-94f7-c3df17c42a4c",
"shortname": "alv",
"name_de": "Arbeitslosenversicherung",
"orgs": ["alv-ch", "alv-ch-ansible-roles"]
"orgs": ["alv-ch"]
},
{
"uuid": "53795f08-ac6e-4aa4-a780-9283b20f958f",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ <h2>Repos:</h2>
{{ repo.name }}
</td>
</ng-container>
<ng-container matColumnDef="organization">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Organization</th>
<td mat-cell *matCellDef="let repo" (click)="navigateTo(repo.url)">
{{ repo.organization }}
</td>
</ng-container>

<ng-container matColumnDef="num_commits">
<th mat-header-cell *matHeaderCellDef mat-sort-header class="number">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class ExploreItemComponent implements OnInit, AfterViewInit {
item: IInstitution;
displayedColumns: string[] = [
'name',
'organization',
'num_commits',
'num_contributors',
'num_watchers',
Expand Down

0 comments on commit ddd9199

Please sign in to comment.