---
title: "Repositories"
execute:
echo: false
warning: false
---
[](https://github.com/fs-ise/handbook/actions/workflows/update_reports_daily.yaml){target=_blank}
::: {.self-service collapse=true}
To request access, click on the <img src="https://img.shields.io/badge/Request-Access-blue" alt="Request Access"> button next to the relevant repository below.
For a new repository:
[](https://github.com/fs-ise/handbook/issues/new?assignees=geritwagner&labels=repo+creation&template=request-repository-creation.md&title=%5BRepository+Request%5D+Request+for+new+repository){target=_blank}
(Admin: [create repository](https://github.com/organizations/fs-ise/repositories/new){target=_blank}).
Resources:
- [new research repository](/research/repo_setup.html)
- [new teaching repository](/teaching/materials.html)
:::
::: {.callout-note title="Legend"}
๐ข active ยท ๐ inactive ยท ๐๏ธ archived (archive). Public repositories show a <img src="https://img.shields.io/badge/Public-green" alt="Public"> badge.
Labot checks (currently implemented for *active paper* repositories only): ๐จ Labot checks failing ยท โ Labot checks not found.
:::
```{python}
import json
from pathlib import Path
data_path = Path("../assets/repos.json")
repos = json.loads(data_path.read_text(encoding="utf-8"))
repos = [r for r in repos if r.get("name") != ".github"]
def visibility_badge(repo):
if repo.get("visibility") == "Public":
return '<img src="https://img.shields.io/badge/Public-green" alt="Public">'
return ""
def status_cell(repo, show_labot=False):
if repo.get("archived"):
status = '<span style="color: red;">๐๏ธ</span>'
elif repo.get("updated_recently", False):
status = '<span style="color: green;">๐ข</span>'
else:
status = '<span style="color: orange;">๐ </span>'
if show_labot:
labot = repo.get("labot_workflow_status", "not-applicable")
if labot == "not-found":
status += " โ"
elif labot not in ("success", "not-applicable"):
status += f' <a href="{repo["html_url"]}/actions/workflows/labot.yml" target="_blank">๐จ</a>'
badge = visibility_badge(repo)
if badge:
status += f" {badge}"
return status
def collaborators_cell(repo):
collabs = repo.get("collaborators") or []
if not collabs:
return ""
return ", ".join(
f'<a href="https://github.com/{c}" target="_blank">{c}</a>'
for c in collabs
)
def repo_link(repo, with_colrev_icon=False):
title = repo.get("title") or repo.get("name")
icon = ""
if with_colrev_icon and "colrev" in (repo.get("project_type") or []):
icon = " ๐"
return f'<a href="{repo["html_url"]}" target="_blank">{title}</a>{icon}'
def access_cell():
return (
'<a href="https://github.com/fs-ise/handbook/issues/new'
'?assignees=geritwagner&labels=access+request'
'&template=request-repo-access.md'
'&title=%5BAccess+Request%5D+Request+for+access+to+repository" target="_blank">'
'<img src="https://img.shields.io/badge/Request-Access-blue" alt="Request Access">'
'</a>'
)
def repo_sort_key(repo):
return (repo.get("title") or repo.get("name") or "").casefold()
def render_rows(filtered_repos,
show_labot=False,
require_active=None,
archived_only=None,
with_colrev_icon=False):
candidates = []
for repo in filtered_repos:
if archived_only is True and not repo.get("archived"):
continue
if archived_only is False and repo.get("archived"):
continue
if require_active is True and not repo.get("updated_recently", False):
continue
if require_active is False and repo.get("updated_recently", False):
continue
candidates.append(repo)
candidates.sort(key=repo_sort_key)
rows = []
for repo in candidates:
rows.append(f"""<tr>
<td>{repo_link(repo, with_colrev_icon=with_colrev_icon)}</td>
<td>{status_cell(repo, show_labot=show_labot)}</td>
<td>{collaborators_cell(repo)}</td>
<td>{access_cell()}</td>
</tr>""")
return "\n".join(rows)
template_repos = [r for r in repos if r.get("area") == "template"]
general_repos = [r for r in repos if r.get("area") not in ("research", "teaching", "template")]
teaching_repos = [r for r in repos if r.get("area") == "teaching"]
research_repos = [r for r in repos if r.get("area") == "research"]
```
## General Repositories
```{python}
#| output: asis
html = f'''
<table>
<thead>
<tr>
<th style="width: 50%;">Repository</th>
<th style="width: 10%;">Status</th>
<th style="width: 20%;">Collaborators</th>
<th style="width: 10%;">Access</th>
</tr>
</thead>
<tbody>
{render_rows(general_repos)}
</tbody>
</table>
'''
print(html)
```
## Templates
```{python}
#| output: asis
html = f'''
<table>
<thead>
<tr>
<th style="width: 50%;">Repository</th>
<th style="width: 10%;">Status</th>
<th style="width: 20%;">Collaborators</th>
<th style="width: 10%;">Access</th>
</tr>
</thead>
<tbody>
{render_rows(template_repos)}
</tbody>
</table>
'''
print(html)
```
## Teaching Repositories
```{python}
#| output: asis
html = f'''
<table>
<thead>
<tr>
<th style="width: 50%;">Repository</th>
<th style="width: 10%;">Status</th>
<th style="width: 20%;">Collaborators</th>
<th style="width: 10%;">Access</th>
</tr>
</thead>
<tbody>
{render_rows(teaching_repos, show_labot=True)}
</tbody>
</table>
'''
print(html)
```
## Research Repositories
```{python}
#| output: asis
active_recent = render_rows(
research_repos,
show_labot=True,
archived_only=False,
require_active=True,
with_colrev_icon=True,
)
inactive = render_rows(
research_repos,
show_labot=False,
archived_only=False,
require_active=False,
with_colrev_icon=False,
)
archived = render_rows(
research_repos,
show_labot=False,
archived_only=True,
require_active=None,
with_colrev_icon=False,
)
html = f'''
<table>
<thead>
<tr>
<th style="width: 50%;">Repository</th>
<th style="width: 10%;">Status</th>
<th style="width: 20%;">Collaborators</th>
<th style="width: 10%;">Access</th>
</tr>
</thead>
<tbody>
{active_recent}
{inactive}
{archived}
</tbody>
</table>
'''
print(html)
```