8000 Docs: the nanopynix_bindings surface has no reference page · Issue #72 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Docs: the nanopynix_bindings surface has no reference page #72

Closed

Description

@Lillecarl

Twenty-two names in nanopynix.__all__ come from nanopynix_bindings, and
no page in docs/nanopynix/api/ targets that package.

Evidence

Measured by resolving the autodoc directives, then grouping the names that no
directive reaches:

module count names
nanopynix_bindings.util 8 build_info, current_system, enable_experimental_feature, get_verbosity, install_logger, list_settings, remove_logger, set_verbosity
nanopynix_bindings.expr 5 PrimopError, Value, eval_file, init_libexpr, register_primop
nanopynix_bindings.store 4 BuildMode, open_store, process_connection, register_store_implementation
nanopynix_bindings.flake 3 get_flake, lock_flake, parse_flake_ref
nanopynix_bindings.fetchers 2 input_from_attrs, input_from_url

These are the C++ bindings. nanopynix re-exports each one, so each is a
public promise of this project.

Why this is not #52

#52 is about the code in the documentation, and its acceptance criterion is
"The suite fails when a published snippet stops working". It corrects two
snippets that raise, and it makes each fenced block runnable.

This issue is about coverage of the surface: twenty-two names have no page at
all. There is no snippet to correct and no snippet to run.

Keeping them apart matters for two reasons:

  1. The criteria do not mix. A single issue would have to satisfy both
    "every published snippet runs" and "every public name has a page", and it
    could not close until both hold.
  2. v0.4.2 release YAML: nixExpr builds fail because nixbld has no member #23 is ready now, and this is not. Docs: documentation code is never executed, and two published examples do not run #52 waited on Settings: route each scope to the Nix door that accepts it #35, which is closed, so
    it is a harness plus two corrections. This is reference text for a binding
    surface. Joining them would hold the cheap work behind the slow work.

Why this is not #71 either

#71 adds the check and a ledger of the names with no home. This issue is the
largest entry in that ledger. #71 can land and go green with these names listed
as known gaps; this issue takes them off the list.

Scope

  • Add docs/nanopynix/api/bindings.md, with a directive for each of the five
    modules.
  • Write the text a reader needs for each name. Most of these take a Nix C++
    object or return one, so each entry states what it wraps and when a caller
    reaches for the higher-level API instead.
  • Say which of them a normal caller should not use directly. init_libexpr,
    process_connection and register_store_implementation are lifecycle and
    extension points, not day-to-day calls.
  • Take the twenty-two out of the Docs: 46 public names have no documented home, and nothing notices #71 ledger.

An open question to answer first

Some of these may not belong in nanopynix.__all__ at all. init_libexpr is a
process-lifecycle call that Session already makes. Documenting a name is a
promise to keep it, so decide per name whether to write the page or to take the
name out. #44 owns that rule.

Acceptance criteria

Blocked by

#44, for the names where the answer is removal rather than a page.

Activity

  1. Lillecarl commented on Aug 2, 2026

    @Lillecarl
    ContributorAuthor

    Done. docs/nanopynix/api/bindings.md, and three notes

    The count is 23, not 22

    The table in this issue omits EvalState, so nanopynix_bindings.expr holds
    6 names and not 5. The #71 ledger had all 23, and all 23 now have an entry.

    The open question: no name leaves __all__

    This issue says it is blocked by #44 "for the names where the answer is removal
    rather than a page". I wrote a page for every name and removed none, so the
    block did not bind.

    The reasoning: each of the 23 is already in nanopynix.__all__. That is
    the promise, and it was made before this page existed. Documenting a name that
    __all__ already lists adds no promise; it only writes down one that is
    already there. Removing a name is the change that needs a decision, and #44
    owns it. If #44 later takes one out, the entry goes with it.

    What the page does instead is say plainly which names a normal caller should
    not reach for. It splits the 23 into three groups -- process-wide state,
    lifecycle and extension points, and plain queries -- and init_libexpr,
    process_connection and register_store_implementation are named as the
    three that are not day-to-day calls.

    A trap worth writing down

    nanopynix.FlakeRef, nanopynix.LockedFlake and nanopynix.Input are not
    the classes these functions return. The three top-level names are the proto
    models from nanopynix_proto.nix.common, and parse_flake_ref, lock_flake
    and input_from_url return the C++ objects of the same names from
    nanopynix_bindings. Same spelling, different types. The page carries a
    warning for it.

    Two fixes that came out of the work

    A C++ docstring broke the docs build. install_logger documented its
    callback as (action: str, *args). The * opens inline emphasis in RST, and
    sphinx-build runs with -W, so rendering that docstring for the first time
    turned a latent warning into a failure. The text is now an RST literal, with a
    comment in nix_util.cpp saying why.

    The #71 scanner did not read autoexception. Its directive pattern listed
    automodule, autoclass, autofunction, autodata and autoattribute.
    bindings.md uses autoexception for PrimopError, which is the correct
    directive for an exception class, and the gate would have reported the class
    undocumented on a page that documents it. The pattern now includes it, with a
    unit test over all six directives and two non-directives.

    Verification

    • sphinx-build -b html docs -W: build succeeded, zero warnings.
    • The rendered page carries exactly 23 objects, and BuildMode renders its
      three members.
    • tests/meta/test_docs_coverage.py passes with the 23 entries deleted. That
      gate asserts both directions, so a name still missing would fail as an
      addition and a name wrongly deleted would fail as stale. The ledger is down
      from 32 entries to 9, and all 9 belong to API: the public surface disagrees with itself #44.
  2. added
    source: nanopynix
    on Oct 19, 2026
  3. added theissue type on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: nanopynix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0