Skip to content

docs: go natural-language first — natural_language becomes the main overview, The Basics becomes The Python API #1587

Closed

Description

@Jammy2211

Overview

The PyAutoFit docs currently lead with the Python API: docs/index.md opens with "The basic PyAutoFit API allows a user to…", carries a ~90-line Gaussian walkthrough under ## API Overview, and the Overview toctree starts with the_basics. A new overview page, docs/overview/natural_language.md, argues the opposite order — describe the model in natural language, let an assistant run it, drop to Python when you want to see the mechanism.

This task makes the docs match that argument. natural_language becomes the main overview page, "The Basics" is renamed "The Python API" and moves to fourth (after Scientific Workflow and Statistical Methods), and the landing page is reframed natural-language first.

Plan

  • Add overview/natural_language to the Overview toctree as the first entry (it is currently an orphan page, absent from every toctree).
  • Rename docs/overview/the_basics.md → docs/overview/python_api.md, retitled "The Python API", and place it fourth in the Overview toctree.
  • Reframe the docs/index.md landing text to lead with the natural-language/assistant route, cutting the long Python "API Overview" walkthrough down to pointers at the two overview pages.
  • Update every in-repo link that pointed at overview/the_basics.html.
  • Light typo-only copy-edit of natural_language.md.
Detailed implementation plan

Affected Repositories

  • PyAutoFit (primary, docs-only)

Branch Survey

Repository Current Branch Dirty?
./PyAutoFit main staged: new docs/overview/natural_language.md, deleted docs/overview/backup.md

worktree_check_conflict natural-language-first-docs PyAutoFit → exit 0 (no conflict; only autolens_profiling is claimed, by retire-gpu1-mig-exclusion).

Suggested branch: feature/natural-language-first-docs
Worktree: ~/Code/PyAutoLabs-wt/natural-language-first-docs/PyAutoFit

Starting state

The human had uncommitted work in the canonical PyAutoFit checkout on main: the new docs/overview/natural_language.md (staged, then further edited) and a staged deletion of docs/overview/backup.md (an old "Extending Models" draft superseded by the new page). This is carried onto the task branch as the first commit; the canonical checkout is then reset clean.

Implementation Steps

  1. Carry the uncommitted work onto feature/natural-language-first-docs (git diff HEAD --binary → apply in the worktree → commit), then reset the canonical checkout to origin/main.
  2. git mv docs/overview/the_basics.md docs/overview/python_api.md. Inside it: anchor (the-basics)= → (python-api)=, heading # The Basics → # The Python API; retune the opening two sentences so the page reads as the under-the-hood companion to the natural-language page and links back to it. Body (models → instances → analysis → searches → fit → results) unchanged.
  3. docs/index.md Overview toctree (lines 135–143) becomes, in order: overview/natural_language, overview/scientific_workflow, overview/statistical_methods, overview/python_api.
  4. docs/index.md landing text: opening paragraphs (lines 3–13) lead with the natural-language/assistant framing mirroring natural_language.md; ## Getting Started gains the assistant as its first bullet; ## API Overview (lines 41–133) is cut to a short section keeping the toy_model_fit.png image and pointing at Inference with Natural Language first, The Python API second. ## Support, ## HowToFit and every other toctree unchanged.
  5. Update links to the renamed page: docs/api/model.rst:13, docs/api/priors.rst:11, docs/api/analysis.rst:11, and the two the_basics.html links inside docs/overview/natural_language.md (lines 37, 243) which already call the page "The Python API".
  6. Typo-only copy-edit of natural_language.md: instlal, advanced[Statistical, taksk, scienist, customizeable, what allow is to do.

Key Files

  • docs/index.md — landing text + Overview toctree order
  • docs/overview/the_basics.md → docs/overview/python_api.md — the rename
  • docs/overview/natural_language.md — new main overview page (human-authored)
  • docs/api/{model,priors,analysis}.rst — cross-links to the renamed page

Out of scope

  • autofit_workspace notebook renames (overview_1_the_basics.ipynb) and the Colab badge URLs in docs/index.md, docs/api/*.rst and README.md — those links point at the workspace repo, not this page.
  • The [Find 1D example of a random model to the data, maybe from HowToFit]? placeholder left in natural_language.md — flagged, not invented.

Decisions confirmed with the human

  • Reorder the toctree and reframe the index.md landing text (not toctree-only).
  • Rename the file, not just the title: the readthedocs URL overview/the_basics.html becomes overview/python_api.html and the old URL will 404. Accepted.

Verification

  • grep -rn "the_basics" docs/ returns only autofit_workspace notebook links.
  • cd docs && make html builds with no new warnings versus docs/sphinx_warning_baseline.txt (31 lines), and no "document isn't included in any toctree" warning for natural_language.
  • Rendered nav reads: Inference with Natural Language → Scientific Workflow → Statistical Methods → The Python API.

Original Prompt

Click to expand starting prompt

I ave made some updatesto the PyAutoFit docs I want to work into main via a PR, I want the main overview page to be the "natural_language.md", I want "the basics" to be renamed "the Python API" and be fourth down understand scientific workflows and statistical methods. We are going NAtural language first.

Prompt file: PyAutoMind/draft/docs/autofit/natural_language_first_overview.md

Activity

  1. Jammy2211 commented on Sep 9, 2026

    @Jammy2211
    CollaboratorAuthor

    Both PRs are open, ready for review:

    Docs-only reorder: natural_language.md is now the main overview page, the_basics.md is renamed python_api.md ("The Python API") and moves fourth — the readthedocs URL changes from overview/the_basics.html to overview/python_api.html. autofit_assistant README carries the matching walkthrough under "Using PyAutoFit Assistant". Merge is pending the human.

  2. Jammy2211 commented on Sep 9, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped

    The docs now lead natural-language first. Overview order: Inference with Natural Language → Scientific Workflow → Statistical Methods → The Python API.

    User-visible URL change: overview/the_basics.html → overview/python_api.html. The old readthedocs URL will 404; every in-repo link was updated. The autofit_workspace notebook links (overview_1_the_basics.ipynb) are untouched — renaming that notebook is separate work in a separate repo.

    Also landed: teacher mode under HowToFit, a Scientific Context section on the literature wiki, and the Sphinx warning baseline ratcheted 31 → 30 (deleting the orphaned backup.md removed its "not included in any toctree" warning; main was verified to build at exactly 31 first).

    Follow-up not done here: the assistant README's "Choosing Your AI Tool" section links to four docs/setup/*.md pages that do not exist in autofit_assistant (they live in autolens_assistant/docs/setup/), and its #free-ai-tools / #conversation-assistants anchors point at sections no longer in the README. Porting those pages needs PyAutoFit-specific rewriting, so it was flagged rather than guessed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions