- {{ if .Params.packages }} + {{ $registryBase := "https://scverse.org/ecosystem-packages/" }} + {{ $data := resources.GetRemote (printf "%spackages.json" $registryBase) }} + {{ $pkgs := transform.Unmarshal $data.Content }} + + {{/* ponytail: registry has no order key, so core packages are alphabetical; re-curate once one exists. */}} + {{ $core := slice }} + {{ range where $pkgs "category" "in" (slice "core-datastructure" "core-framework") }} + {{ $core = $core | append (merge . (dict "sortkey" (lower .name))) }} + {{ end }} + {{ $core = sort $core "sortkey" }} + + {{ with $core }}

Packages maintained by core team

{{ $sections.core_packages | markdownify }} - {{ if .Params.datastructures }} + {{ with where . "category" "core-datastructure" }}

Data structures

{{ $sections.datastructures | markdownify }}
- {{ $datastructures := .Params.datastructures }} - {{ range $i, $e := $datastructures }} -
-
- Logo for {{ .name }} -
-
-
-
- {{ .name }} - {{ .details | markdownify }} -
-
- -
-
+ {{ range . }} + {{ partial "package-section.html" (dict "pkg" . "base" $registryBase) }} {{ end }}
{{ end }}

Analysis task-specific extensions

{{ $sections.datastructures_post | markdownify }}

-

Frameworks

- {{ $sections.frameworks | markdownify }} -
- {{ $packages := .Params.packages }} - {{ range $i, $e := $packages }} -
-
- Logo for {{ .name }} -
-
-
-
- {{ .name }} - {{ .details | markdownify }} -
-
- -
-
- {{ end }} -
+ {{ with where . "category" "core-framework" }} +

Frameworks

+ {{ $sections.frameworks | markdownify }} +
+ {{ range . }} + {{ partial "package-section.html" (dict "pkg" . "base" $registryBase) }} + {{ end }} +
+ {{ end }} {{ end }}

Ecosystem packages maintained by scverse community

{{ $sections.ecosystem | markdownify }} - {{ $registryBase := "https://scverse.org/ecosystem-packages/" }} - {{ $data := resources.GetRemote (printf "%spackages.json" $registryBase) }} - {{ $pkgs := transform.Unmarshal $data.Content }} {{ if $pkgs }} {{/* Categories and tags are a controlled vocabulary in the registry schema, so there is nothing to normalise here: https://github.com/scverse/ecosystem-packages/blob/main/scripts/src/ecosystem_scripts/schema.json */}} diff --git a/layouts/partials/main/packages.html b/layouts/partials/main/packages.html index 58e1373..af633c9 100644 --- a/layouts/partials/main/packages.html +++ b/layouts/partials/main/packages.html @@ -1,40 +1,43 @@
Core packages
- {{ if .Params.packages }} -
- {{ $packages := .Params.packages }} - {{ range $i, $e := $packages }} -
-
-
- {{ $exists := fileExists (printf "static/img/icons/%s.svg" .name) }} - {{ if .no_icon }} - {{/* Nothing to render; the container still reserves the space. */}} - {{ else if $exists }} - Logo for {{ .name }} - {{ else }} - {{ errorf "No icon or .no_icon for package %q" .name }} - {{ end }} -
-
- -
- {{ .name }} -
-

- {{ .description }} -

+ {{ $registryBase := "https://scverse.org/ecosystem-packages/" }} + {{ $data := resources.GetRemote (printf "%spackages.json" $registryBase) }} + {{ with $data }} + {{/* ponytail: registry has no order key, so core packages are alphabetical; re-curate once one exists. */}} + {{ $core := slice }} + {{ range where (transform.Unmarshal .Content) "category" "in" (slice "core-datastructure" "core-framework") }} + {{ $core = $core | append (merge . (dict "sortkey" (lower .name))) }} + {{ end }} + {{ with sort $core "sortkey" }} +
+ {{ range $p := . }} +
+
+
+ {{ with .logo }} + Logo for {{ $p.name }} + {{ end }} +
+
+ +
+ {{ .name }} +
+

+ {{ .description }} +

+
-
- {{ end }} -
+ {{ end }} +
+ {{ end }} {{ end }}
View all scverse packages
diff --git a/layouts/partials/package-section.html b/layouts/partials/package-section.html new file mode 100644 index 0000000..5b82d36 --- /dev/null +++ b/layouts/partials/package-section.html @@ -0,0 +1,42 @@ +{{/* One core package row on /packages, from an ecosystem-registry entry. Params: pkg, base */}} +{{ $base := .base }} +{{ $p := .pkg }} +
+
+ {{ with $p.logo }} + Logo for {{ $p.name }} + {{ end }} +
+
+
+
+ {{ $p.name }} + {{ $p.description | markdownify }} +
+
+
+
+