Skip to content

Say what a rejected pseudo_library label means - #109

Merged
elinsc-bot merged 5 commits into
mainfrom
pseudo-family-message
Aug 10, 2026
Merged

Say what a rejected pseudo_library label means#109
elinsc-bot merged 5 commits into
mainfrom
pseudo-family-message

Conversation

@elinsc-bot

@elinsc-bot elinsc-bot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Problem

Setting pseudo_library to a label koopmans does not recognize — say my-gaas-fr, a full-relativistic family a user built by hand — failed with

Unrecognized pseudo family format: 'my-gaas-fr'. Expected 'PseudoDojo/version/functional/relativistic/protocol/format', 'SSSP/version/functional/protocol', or 'SG15/version/functional/relativistic'.

That sends the reader to fix their label's format, and implies only three families are possible. Neither is true. Any family already installed is used as it stands, under whatever label it carries; the label is only parsed when nothing is installed under it. So the real situation is that no installed family had that label and koopmans could not download one — a mistyped label, or a family not installed yet.

Hand-built families are the supported route for pseudopotentials koopmans cannot fetch, such as the full-relativistic LDA sets that spin-orbit work needs. This message is what those users hit first.

Changes

  • The error now states what was actually checked — no installed family carries the label, and koopmans cannot download one — and gives both ways forward: install the pseudopotentials yourself, or name one of the three formats koopmans can fetch. The formats stay, framed as what koopmans downloads rather than as the set of valid labels.

  • The self-install route is a plain family, and the cutoffs come from the input file. Since Take the cutoffs from the input when the pseudo family has none #127 and Install SG15 as a family that recommends no cutoffs #136, aiida-pseudo install family <directory> <label> with no flag is enough, and calculator_parameters.ecutwfc alone is a complete statement — ecutrho follows at four times it. This is scoped to families that publish no recommended cutoffs; a PseudoDojo or SSSP family still supplies its own, and an input naming none still builds on them.

  • pseudo_library's help text pointed at koopmans pseudos list, which is not a command; it now describes both routes and renders into the input-file reference.

  • The installation page gains a Pseudopotentials section. The docs previously never mentioned pseudopotentials — neither that koopmans downloads them for you, nor that a family you install yourself works.

  • Two fixture docstrings left stale by Install SG15 as a family that recommends no cutoffs #136 are corrected: one described a cutoffs family as "the shape _install_sg15_family produces", which it no longer is, and one claimed the protocol machinery accepts only SSSP, PseudoDojo or a cutoffs family, which the patched aiida-quantumespresso no longer restricts.

The new message:

No installed pseudopotential family has the label 'my-gaas-fr', and koopmans cannot download one under that label.
Install the pseudopotentials yourself, from a directory holding one file per element:
    aiida-pseudo install family <directory> my-gaas-fr
A family installed this way publishes no recommended cutoffs, so set `calculator_parameters.ecutwfc` in your input file; `ecutrho` follows at four times it.
Alternatively, name a family koopmans can download for you, as 'PseudoDojo/version/functional/relativistic/protocol/format', 'SSSP/version/functional/protocol', or 'SG15/version/functional/relativistic'.

It now matches require_cutoffs_for_family's wording, so a user who meets both messages reads the same instruction twice.

Testing

  • Reinstating the old advice fails the suite: one test pins the install command with a trailing newline, so a trailing -F ... breaks it, and another asserts -F, pseudo.family.cutoffs and cutoffs set are all absent. Run as a negative control, both failed on exactly those assertions.

  • The suite is measured against the patched aiida-quantumespresso the repo now clones. The same pseudo modules give 3 failures against upstream main and 15 passes against patched, which is what establishes the tests are exercising the intended dependency rather than the local checkout.

  • Docs build under sphinx -W, and the rendered output was checked rather than assumed: the Pseudopotentials section shows the single plain-family command, and the extended pseudo_library description reaches the input-file reference.

@read-the-docs-community

read-the-docs-community Bot commented Aug 6, 2026

Copy link
Copy Markdown

A label naming no installed family was reported as a format error, though a
family installed by hand is accepted under any label at all.

- The message now says that no installed family carries the label and that
  koopmans cannot download one, then gives both ways forward: install the
  pseudopotentials yourself under that label, or name one of the three
  formats koopmans can fetch.
- The `pseudo_library` help text pointed readers at `koopmans pseudos list`,
  which is not a command; it now describes both routes.
- The installation page gains a Pseudopotentials section, which previously
  said nothing about them at all.
- Tests pin that a family installed under an arbitrary label is used as it
  stands, and that an unusable label reports both routes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@elinsc-bot
elinsc-bot force-pushed the pseudo-family-message branch from d48cbd8 to 3499c8d Compare August 6, 2026 13:05
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.87%. Comparing base (b635ce2) to head (c2d1ba9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #109      +/-   ##
==========================================
+ Coverage   81.81%   81.87%   +0.05%     
==========================================
  Files          44       44              
  Lines        3464     3464              
  Branches      543      543              
==========================================
+ Hits         2834     2836       +2     
+ Misses        494      493       -1     
+ Partials      136      135       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elinsc-bot

Copy link
Copy Markdown
Collaborator Author

Holding: the pseudo_library field description this PR rewrites is about to be rewritten again by #125, which adds the koopmans pseudos command the description should point at. Merging now means changing the same lines twice.

Marked draft to record the hold; nothing here is wrong, it just wants to land alongside #125 and #126.

@elinsc-bot
elinsc-bot marked this pull request as draft August 6, 2026 16:48
elinsc-bot and others added 4 commits August 7, 2026 10:12
The message and the installation docs told a user to build a cutoffs
family and load a cutoffs file into it, which is a family koopmans now
refuses to run against.

- Offer `aiida-pseudo install family <directory> <label>` with no
  family-type flag, and name `calculator_parameters.ecutwfc` as where
  the cutoffs come from.
- Say the same in the installation docs and in the `pseudo_library`
  field description.
- Assert the message offers no `-F pseudo.family.cutoffs` and no
  `aiida-pseudo family cutoffs set`, so reinstating either fails.
- Reuse the shared plain-family fixture rather than a second one, and
  correct two fixture docstrings that name SG15 as the source of a
  cutoffs family.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@elinsc-bot
elinsc-bot marked this pull request as ready for review August 10, 2026 11:45
@elinsc-bot
elinsc-bot requested a review from elinscott August 10, 2026 11:45
@elinsc-bot
elinsc-bot merged commit 815c65d into main Aug 10, 2026
14 checks passed
@elinsc-bot
elinsc-bot deleted the pseudo-family-message branch August 10, 2026 11:48
elinsc-bot added a commit that referenced this pull request Aug 10, 2026
#109 rewrote the unrecognized-label message, the `pseudo_library` help
text and the fixture docstrings this branch also touches.

- Keep #109's message: what was checked first, then the self-install
  route and the download route. Its closing list of label grammars named
  SSSP, which this branch refuses, and ended in `/format`, which this
  branch accepts only as `upf`; both are replaced by a pointer to
  `koopmans pseudos`.
- Same substitution in the `pseudo_library` help text.
- Take #109's `_install_fake_family` docstring wholesale, and its
  wording for the uncut-family fixture over this branch's label for it.
- Update the two tests asserting the label grammar.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants