Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
85 changes: 85 additions & 0 deletions _ext/rfc_authors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import yaml
from docutils import nodes
from docutils.parsers.rst import Directive

ORCID_ICON = "https://orcid.org/assets/vectors/orcid.logo.icon.svg"
GITHUB_ICON = "https://github.githubassets.com/favicons/favicon.svg"


def _icon_link(uri, src, alt):
"""A hyperlink wrapping a small inline image."""
ref = nodes.reference("", "", refuri=uri)
img = nodes.image(
uri=src,
alt=alt,
classes=["rfc-author-icon"],
)
ref += img
return ref


class RFCAuthors(Directive):
def run(self):
env = self.state.document.settings.env
src = env.doc2path(env.docname)
with open(src, encoding="utf-8") as f:
text = f.read()

parts = text.split("---", 2)
if len(parts) < 3:
raise self.error("rfc-authors: no YAML front matter found")
meta = yaml.safe_load(parts[1]) or {}

authors = meta.get("authors", [])
if not authors:
raise self.error("rfc-authors: no 'authors' in front matter")

# Number unique affiliations in first-seen order
affils, order = {}, []
for a in authors:
aff = a.get("affiliation")
if aff and aff not in affils:
order.append(aff)
affils[aff] = len(order)

para = nodes.paragraph(classes=["rfc-authors"])
for i, a in enumerate(authors):
if i:
para += nodes.Text(" and " if i == len(authors) - 1 else ", ")

para += nodes.Text(a["name"])

aff = a.get("affiliation")
if aff:
para += nodes.superscript(text=str(affils[aff]))

orcid = a.get("orcid")
if orcid:
uri = (
orcid
if str(orcid).startswith("http")
else f"https://orcid.org/{orcid}"
)
para += nodes.Text(" ")
para += _icon_link(uri, ORCID_ICON, "ORCID")

gh = a.get("github")
if gh:
uri = gh if str(gh).startswith("http") else f"https://github.com/{gh}"
para += nodes.Text(" ")
para += _icon_link(uri, GITHUB_ICON, "GitHub")

result = [para]

for aff in order:
p = nodes.paragraph(classes=["rfc-affiliation"])
p += nodes.superscript(text=str(affils[aff]))
p += nodes.Text(" " + aff)
result.append(p)

return result


def setup(app):
app.add_directive("rfc-authors", RFCAuthors)
return {"parallel_read_safe": True, "parallel_write_safe": True}
17 changes: 17 additions & 0 deletions _static/rfc_authors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.rfc-author-icon {
height: 1em;
width: 1em;
vertical-align: -0.15em;
margin: 0 0.05em;
display: inline;
}

.rfc-authors {
font-size: 1.05em;
}

.rfc-affiliation {
font-size: 0.85em;
color: var(--pst-color-text-muted, #666);
margin: 0.1em 0;
}
14 changes: 12 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os

project = "NGFF"
copyright = "2020-2025, NGFF Community"
author = "NGFF Community"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration


# Needed for custom rfc_authors extension to be found in _ext
import os
import sys

sys.path.insert(0, os.path.abspath("_ext"))

extensions = [
"myst_parser",
"sphinx_reredirects",
"sphinx_design",
"sphinxcontrib.bibtex",
"rfc_authors",
]
bibtex_bibfiles = ["references.bib"]
source_suffix = [".rst", ".md"]
myst_heading_anchors = 5
myst_enable_extensions = ["deflist", "strikethrough", "colon_fence"]

myst_enable_extensions = ["deflist", "strikethrough", "colon_fence", "substitution"]
templates_path = ["_templates"]
exclude_patterns = [
"_build",
Expand Down Expand Up @@ -79,6 +88,7 @@

html_css_files = [
"https://cdn.datatables.net/v/dt/dt-1.11.5/datatables.min.css",
"rfc_authors.css",
]

html_js_files = [
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ testresources
sphinx-reredirects
sphinxcontrib-bibtex
sphinx-design
pyyaml
26 changes: 20 additions & 6 deletions rfc/9/comments/5/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
---
authors:
- name: Anna Kreshuk
orcid: https://orcid.org/0000-0003-1334-6388
affiliation: ilastik
Comment thread
lubianat marked this conversation as resolved.
- name: Dominik Kutra
github: k-dominik
orcid: https://orcid.org/0000-0003-4202-3908
Comment thread
lubianat marked this conversation as resolved.
Outdated
affiliation: ilastik
- name: Benedikt Best
github: btbest
orcid: https://orcid.org/0000-0001-6965-1117
affiliation: ilastik
date: 2026-02-05
---

# RFC-9: Comment 5

(rfcs:rfc9:comment5)=

## Comment authors

This comment was written by the ilastik team:
```{rfc-authors}

* Anna Kreshuk, https://orcid.org/0000-0003-1334-6388
* Dominik Kutra, https://orcid.org/0000-0003-4202-3908
* Benedikt Best, https://orcid.org/0000-0001-6965-1117
```

## Conflicts of interest (optional)

Expand Down Expand Up @@ -75,8 +89,8 @@ Alternatively, one could make this clear by adding an observation like the follo

## Minor comments and questions

* The proposed new section of the specification uses the term "SHALL", which is so far not used elsewhere in the specification. Since according to IETF RFC 2119, SHALL is synonymous to MUST, and MUST is the term used in the rest of the specification, this should be replaced.
* Duplication of "the" in "The ZIP file MUST contain the the OME-Zarr’s root-level zarr.json."
- The proposed new section of the specification uses the term "SHALL", which is so far not used elsewhere in the specification. Since according to IETF RFC 2119, SHALL is synonymous to MUST, and MUST is the term used in the rest of the specification, this should be replaced.
- Duplication of "the" in "The ZIP file MUST contain the the OME-Zarr’s root-level zarr.json."

## Recommendation

Expand Down
Loading