Skip to content
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
8 changes: 4 additions & 4 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The span of time a Metric's value covers. Either **cumulative** (all-time, e.g.
_Avoid_: Period, timeframe, range

**Manifest**:
An optional file listing one or more Projects, their Identities, and any chosen or prioritised Cohort topics for repeatable or batch runs. Never required: a single Project can be given inline via CLI flags, and a bare paper (DOI/PMID) needs neither. The tool can generate a Manifest from a run, so it is a save-file, not a hand-authored prerequisite. Holds no secrets.
An optional file listing one or more Projects, their Identities, any chosen or prioritised Cohort topics, and optional Providers to enable for repeatable or batch runs. Never required: a single Project can be given inline via CLI flags, and a bare paper (DOI/PMID) needs neither. The tool can generate a Manifest from a run, so it is a save-file, not a hand-authored prerequisite. Holds no secrets.
_Avoid_: Config, spec, input file

**Snapshot**:
Expand All @@ -39,7 +39,7 @@ A Provider's licence or terms text, recorded on the Metric it accompanies and sh
_Avoid_: Disclaimer, licence blurb, footnote, attribution

**Provider Note**:
An operational explanation carried by a Provider×Identity Outcome — why a fetch yielded no value, failed, or returned only part of the requested data ("no API key configured", "rate limited after five of twenty Cohort ranks"). Not a Notice: it describes collection status rather than the terms behind a Metric, so it appears in its own Report section keyed by Provider and Outcome kind (ADR-0008).
An explanation carried by a Provider×Identity Outcome that doesn't belong on any single Metric: why a fetch yielded no value, failed, or returned only part of the requested data ("no API key configured", "rate limited after five of twenty Cohort ranks"), or — for a fully successful fetch — provenance detail about how several inputs were aggregated into the reported Metrics ("matched 23 Galaxy CoDex suites: ..."). Not a Notice: it describes collection status or provenance rather than the terms behind a Metric, so it appears in its own Report section keyed by Provider and Outcome kind (ADR-0008).
_Avoid_: Error message, warning, notice, detail

**Cohort**:
Expand All @@ -51,11 +51,11 @@ A derived Metric produced by combining compatible Metrics — e.g. a total downl
_Avoid_: Total, sum, aggregate

**Category**:
The family a Metric belongs to, used to group the Report. Four in v1: **Code** (stars, forks, contributors, release downloads, cohort rank…), **Downloads** (per-channel package/install counts + Rollup), **Citations** (counts + field-normalized FWCI/percentile/FCR/RCR), and **Attention** (open-access status, Wikipedia mentions, and indexed scholarly repository mentions keyless by default; full news/blog/policy/patent/social breakdown via Altmetric when a key is present).
The family a Metric belongs to, used to group the Report. Five: **Code** (stars, forks, contributors, release downloads, Cohort rank…), **Downloads** (per-channel package/install counts + Rollup), **Usage** (tool executions, server-scoped user accounts, and public-instance availability), **Citations** (counts + field-normalized FWCI/percentile/FCR/RCR), and **Attention** (open-access status, Wikipedia mentions, and indexed scholarly repository mentions keyless by default; full news/blog/policy/patent/social breakdown via Altmetric when a key is present).
_Avoid_: Kind, group, type, section

**Provider**:
A component for one source that, given an Identity, fetches zero or more Metrics from one external service (GitHub, Bioconda, OpenAlex, …). Providers are pluggable; the system ships a curated default set.
A component for one source that, given an Identity, fetches zero or more Metrics from one external service (GitHub, Bioconda, OpenAlex, …). Providers are pluggable; the system ships a curated default set and may offer others that a user explicitly enables.
_Avoid_: Source, backend, connector, adapter

**Identity**:
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0008-operational-notes-are-not-licence-notices.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Status

accepted — the prose carve-out in Considered options is refined by ADR-0009: what travels into prose is any `Metric.note` attached to a headline number, not only a licence notice. Extended during #83 so a successful `Values` Outcome may also carry Provider Notes when requested secondary Metrics were only partly collected; operational messages still stay out of prose.
accepted — the prose carve-out in Considered options is refined by ADR-0009: what travels into prose is any `Metric.note` attached to a headline number, not only a licence notice. Extended during #83 so a successful `Values` Outcome may also carry Provider Notes when requested secondary Metrics were only partly collected; operational messages still stay out of prose. Extended again during #79 (ADR-0011) so a fully successful `Values` Outcome may also carry a Provider Note recording audit/provenance detail — which CoDex suites a multi-suite aggregation matched — that belongs to the whole fetch rather than any single Metric; this is a third, distinct reason a Provider Note exists (why nothing was collected, why collection was partial, or what a successful aggregation actually drew from), not a widening of "operational."

## Context and decision

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Optional Providers, and Galaxy CoDex over live per-tool dashboards

## Status

accepted

## Context and decision

Issue #79 asked for Galaxy usage — tool executions, unique-user accounts, and public-instance availability. The v1 spec already anticipated this shape (`docs/spec/0001-boast-v1.md`: "further Providers are optional and enabled via Manifest/flags"), but no non-default registry existed yet: `providers/mod.rs`'s `render_providers` DEFAULT column read "yes" throughout "for want of a contrast" (ADR-0009), and ADR-0009 itself considered making Docker Hub opt-in and rejected it only "for now", explicitly flagging "revisit if an opt-in tier is built for other reasons." Galaxy is that reason: most Projects have no Galaxy wrapper at all, so fetching it by default would add a mostly-empty request to every run rather than a useful one, in a way Docker Hub and Quay (most bioinformatics tools *do* have a container) do not share.

Two decisions follow from that, both settled in the issue's own long triage thread before any code was written.

**1. Providers can now be optional, disabled by default.** `providers::optional_providers()` is a second registry, disjoint from `default_providers()`; a user opts a Provider in with `--enable-provider <name>` (repeatable, unknown name is a CLI usage error) or a Manifest's `enable_providers` list. `boast providers` renders both registries in one table, default rows marked "yes", optional rows "no" — the exact contrast ADR-0009 was waiting for. An explicit CLI `--enable-provider` overrides a Project's Manifest selection entirely (never merges), the same override rule `--topic` already applies to Cohort selection, so the two stay consistent for a reader who already knows one of them.

**2. Galaxy CoDex's `communities/all/resources/tools.json` is the source of truth — not the Galaxy Europe Grafana dashboard, and not ToolShed download counts.** Both alternatives were live options in the issue thread and both were ruled out on evidence, not preference:

- The **Galaxy Europe Grafana dashboard** (`stats.galaxyproject.eu`) reports numbers roughly an order of magnitude higher than CoDex for the same tool (267 vs. 104 runs for rasusa) — "something is different about how the two collect stats," never fully diagnosed. It also only covers one server (`usegalaxy.eu`), not the cross-server picture the issue asked for, and it's a live query interface rather than a bulk-fetchable dataset.
- **ToolShed downloads** count wrapper-bundle fetches — an installation/update event, not a tool execution. It measures how many Galaxy admins installed a wrapper, not how many researchers ran it, which is the opposite of what "Galaxy usage" was asked to mean.

CoDex republishes one JSON file cross-server, keyless, and reflects the recommended metric shape the issue settled on (execution counts and account counts, not installs). Its own known weakness — the published figures can lag the live servers by an unpublished amount — is disclosed on every Metric via a note long enough to reach the Notices footer (ADR-0005), rather than silently presented as current.

A second wrinkle CoDex forces: one upstream tool can have several Galaxy wrappers, one per subcommand ("suites" in CoDex's vocabulary — vcflib alone maps to 23). The issue's own resolution: sum `runs` across every matched suite, but take the *maximum* `user_accounts` across them rather than summing, since the same account can run more than one subcommand and summing would inflate a "how many people" figure into "how many (person, subcommand) pairs." `public_instances` unions availability across the matched suites, naming which of the four major public servers (UseGalaxy.org, .org.au, .eu, .fr) matched. Every matched suite ID is recorded in a Provider Note so the aggregation is auditable, and every repository CoDex's `Homepage` field doesn't exactly match is `NotApplicable`, never a real zero (ADR-0002) — `Homepage` is deliberately the only field compared; CoDex's `Suite source` names the wrapper repository (typically under `galaxyproject/tools-iuc`), not the upstream Project being measured, and using it would misattribute one repo's Galaxy usage to a completely different upstream.

## Considered options

- **Keep every Provider in one always-fetched registry, and make Galaxy request-cheap enough not to matter.** No new architecture. Rejected: the cost isn't request count, it's relevance — a `NotApplicable` on every run for the ~99% of Projects with no Galaxy wrapper is noise in every default Report, not a performance question a cheaper request would fix.
- **Query the Galaxy Europe Grafana dashboard instead of CoDex, since it's the most current data.** Rejected on the evidence above: an unexplained order-of-magnitude discrepancy against CoDex, single-server-only coverage, and no bulk endpoint — a live dashboard built for humans clicking through a UI, not a source `boast about` can fetch once and record provenance for.
- **Sum `user_accounts` across every matched suite, matching how `runs` aggregates.** Simpler, one code path for both figures. Rejected: the issue's own domain expert flagged this would double-count one account using several subcommands of the same underlying tool — the max is the honest "at least this many distinct accounts" figure; the note says so explicitly rather than letting the number imply more precision than it has.
- **Treat `Suite source` (the wrapper repo) as an acceptable secondary match when `Homepage` is absent.** Would raise the match rate. Rejected: it would attribute usage to whichever team happens to maintain the Galaxy wrapper (often `galaxyproject/tools-iuc`, a shared multi-tool repo) rather than the upstream Project actually being measured — a wrong answer is worse than `NotApplicable` here (ADR-0002).

## Consequences

- **`providers::optional_providers()` and `resolve_optional_providers()` are the durable extension point for every future non-default Provider**, not a Galaxy-specific mechanism — the next opt-in Provider (Altmetric already asks for a key, but stays default/keyless-degraded rather than opt-in; a genuinely optional source like a paid API tier would fit this registry instead) adds one entry to `optional_providers()` and is done.
- **`enable_providers` joins `topics`/`priority_topics` as a Manifest field with the same override shape**: CLI-given always replaces a Project's Manifest value, never merges with it. A reader who understands one already understands the other.
- **A Category gained a fifth member, Usage**, sitting between Downloads and Citations in every Report format and `boast providers`' grouping — `CATEGORY_ORDER` is the one place this ordering is declared, shared by `report.rs` and `diff.rs`. The Snapshot schema version advanced (2 → 3) for the new Category, though nothing about deserialising an older Snapshot changes: it simply never contained a `"usage"`-tagged row.
- **Galaxy's `runs` and `user_accounts` — the two cumulative counts CoDex's own snapshot can go stale on — each carry the lag caveat on the Metric itself, not just a one-time warning**, because Snapshots are re-rendered offline later (ADR-0001) with no re-fetch — the same reasoning ADR-0005 already established for Provider licence notices applies to a data-freshness caveat just as much as a legal one. `public_instances` doesn't carry it: installation is a current-state fact CoDex derives the same way regardless of refresh timing, not a count that accumulates staleness.
- **A future Provider facing the same "several wrappers, one upstream" shape has a worked precedent**: sum what genuinely aggregates (executions), take the maximum of what would double-count under naive summation (accounts), and say which rule applied to which number in the Metric's own note rather than leaving a reader to guess.
2 changes: 2 additions & 0 deletions docs/site/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [A tool with a repo and packages](./guides/repo-and-packages.md)
- [A researcher's whole publication record](./guides/orcid.md)
- [Automating snapshots in CI](./guides/ci-snapshots.md)
- [Galaxy tool-execution usage](./guides/galaxy-usage.md)
- [Providers reference](./reference/providers.md)
- [CLI reference](./reference/cli.md)
- [Design decisions](./design/index.md)
Expand All @@ -22,3 +23,4 @@
- [0008 — Operational Provider notes are not licence notices](./design/0008-operational-notes-are-not-licence-notices.md)
- [0009 — Container pulls roll up, with the caveat travelling](./design/0009-container-pulls-roll-up-with-a-travelling-caveat.md)
- [0010 — An unreadable channel is NotApplicable, not Failed](./design/0010-unreadable-is-not-unretrieved.md)
- [0011 — Optional Providers, and Galaxy CoDex over live dashboards](./design/0011-optional-providers-and-galaxy-codex-as-source-of-truth.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#include ../../../adr/0011-optional-providers-and-galaxy-codex-as-source-of-truth.md}}
114 changes: 114 additions & 0 deletions docs/site/src/guides/galaxy-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Galaxy tool-execution usage

[Galaxy](https://galaxyproject.org/) is a web platform for running bioinformatics tools
without writing code. Many command-line tools also ship as a Galaxy wrapper, and the
[Galaxy Tool CoDex](https://github.com/galaxyproject/galaxy_codex) project publishes
cross-server execution and user-account totals for every wrapper it knows about — real
evidence of use beyond stars and downloads, if your tool has one.

Galaxy is **optional and off by default**. Most Projects have no Galaxy wrapper at all,
so fetching it on every run would add a mostly-empty request rather than a useful one.
Check `boast providers` to see it listed under Usage with `DEFAULT` set to `no`.

## Enabling it

```
boast about --repo mbhall88/rasusa --enable-provider galaxy
```

`--enable-provider` is repeatable and generic — it isn't Galaxy-specific — so a future
optional Provider uses the same flag. An unknown name is a usage error:

```
$ boast about --repo owner/name --enable-provider not-a-real-provider
error: unknown optional provider 'not-a-real-provider' (available: galaxy)
```

Galaxy only understands repository Identities (`--repo`, a GitHub URL, or the bare
`owner/name` positional); it has no package- or paper-level presence to report on.

## What each Metric means

```
━━ github:mbhall88/rasusa ━━
── Usage ──
runs 104 all-time galaxy
user_accounts 24 all-time galaxy
public_instances 2 all-time galaxy available on UseGalaxy.eu, UseGalaxy.fr

── Notices ──
Galaxy CoDex republishes cumulative tool-execution counts on its own refresh schedule, so this figure may lag the underlying Galaxy servers
Runs: aggregated sum. Users: max unique per wrapper (to prevent over-counting) — not a count of distinct people, since CoDex's per-server totals can count one account once per server. Both are cumulative CoDex figures that may lag the underlying Galaxy servers.
```

`runs` and `user_accounts` each carry a caveat long enough to be shown once in the
Notices footer rather than repeated inline on every row — see
[Concepts](../concepts.md) for how boast decides between the two.

- **`runs`** — cumulative tool executions across every Galaxy wrapper CoDex has matched
to this repository, summed across CoDex's tracked servers.
- **`user_accounts`** — the *maximum* per-wrapper account count, not a sum (see below).
This is not a count of distinct people: CoDex's own figures can count one account
separately per server, so treat it as "at least this many accounts," never as a
headcount.
- **`public_instances`** — how many of the four major public Galaxy servers
(UseGalaxy.org, UseGalaxy.org.au, UseGalaxy.eu, UseGalaxy.fr) have the tool installed,
regardless of whether it's actually been run there. The Metric's note names which ones
matched.

A repository with no matching CoDex entry is `NotApplicable`, never a real zero — most
repositories simply have no Galaxy wrapper.

## Multi-suite aggregation

One upstream tool can have several Galaxy wrappers, one per subcommand — CoDex calls
each a "suite." `vcflib` alone maps to 23. When more than one suite matches a
repository:

- **`runs` is summed** across every matched suite — it's a genuine execution count, and
summing doesn't over-count anything.
- **`user_accounts` is *not* summed** — the maximum across the matched suites is used
instead, since the same account can run more than one subcommand of the same tool.
Summing would inflate "how many accounts used this tool" into "how many
(account, subcommand) pairs were used."
- **`public_instances` is a union** — available if *any* matched suite is installed
there.

Every matched suite ID is recorded in a Provider Note so the aggregation is auditable:

```
── Provider Notes ──
galaxy: Matched 23 Galaxy CoDex suites: vcf2tsv, vcfaddinfo, vcfallelicprimitives, ... — github:vcflib/vcflib
```

Matching is exact, on CoDex's `Homepage` field only (normalised the same way boast
normalises any GitHub URL) — never on CoDex's `Suite source`, which names the wrapper
repository (typically a shared multi-tool repo like `galaxyproject/tools-iuc`), not the
upstream Project actually being measured.

## Why the numbers may lag

CoDex republishes its dataset on its own refresh schedule, independent of the live
Galaxy servers — `runs` and `user_accounts` both carry a note saying so, since they're
cumulative counts CoDex derives from its own snapshot. Treat these figures as "at least
this much use, as of whenever CoDex last refreshed," not a live server query.
`public_instances` doesn't carry the same caveat: installation is a current-state fact,
not a count that accumulates staleness the same way. See
[ADR-0011](../design/0011-optional-providers-and-galaxy-codex-as-source-of-truth.md) for
why CoDex was chosen over the live Galaxy Europe dashboard and ToolShed's install counts.

## Persisting the choice in a Manifest

`--save`/`boast init` persist an explicit `--enable-provider` into the Manifest's
`enable_providers`, so a scheduled run doesn't need to repeat the flag:

```toml
[[project]]
identities = ["github:mbhall88/rasusa"]
enable_providers = ["galaxy"]
```

`boast about manifest.toml` then fetches Galaxy for that Project automatically. An
explicit `--enable-provider` on the command line overrides a Manifest's own selection
entirely for that run, the same override rule `--topic` already applies to Cohort
selection.
Loading