Skip to content

Commit 29350ce

Browse files
authored
Merge pull request #970 from dhellmann/docs/reorganize-documentation
docs: reorganize documentation following Diátaxis framework
2 parents 5d8d986 + 7ce6858 commit 29350ce

15 files changed

Lines changed: 271 additions & 25 deletions

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ repos:
99
- id: check-merge-conflict # Prevents merge conflict markers
1010
- id: check-toml # Validates TOML syntax
1111

12+
- repo: https://github.com/igorshubovych/markdownlint-cli
13+
rev: v0.39.0
14+
hooks:
15+
- id: markdownlint
16+
args: [--config, .markdownlint-config.yaml]
17+
1218
- repo: local
1319
hooks:
1420
- id: hatch-lint

docs/concepts/index.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
Concepts
22
========
33

4+
Understanding how fromager works under the hood.
5+
6+
Key Topics
7+
----------
8+
9+
These guides explain the fundamental concepts and design principles behind fromager:
10+
11+
* **Bootstrap vs Build Modes** - Understand the difference between recursive discovery (bootstrap) and single-package builds (build)
12+
* **Dependency Types** - Learn about build-system, build-backend, build-sdist, and install dependencies
13+
414
.. toctree::
515
:maxdepth: 1
616

717
bootstrap-vs-build
818
dependencies
19+
20+
Related Practical Guides
21+
-------------------------
22+
23+
Apply these concepts with task-oriented guides:
24+
25+
* :doc:`/using` - Bootstrap and build mode usage
26+
* :doc:`/how-tos/repeatable-builds` - Use build graphs for consistent builds
27+
* :doc:`/how-tos/graph-commands/index` - Analyze dependency graphs
28+
* :doc:`/customization` - Customize the build process
29+
30+
Reference Material
31+
------------------
32+
33+
* :doc:`/reference/glossary` - Definitions of key terms
34+
* :doc:`/reference/files` - Build order and graph file formats

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# sphinxcontrib.spelling settings
5959
# File references a function object. Spell checker complaints about typo in
6060
# random object id.
61-
spelling_exclude_patterns = ["config-reference.rst"]
61+
spelling_exclude_patterns = ["reference/config-reference.rst"]
6262

6363
# -- Options for HTML output -------------------------------------------------
6464
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

docs/customization.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ requires = ["setuptools>=68.0.0", "torch", "triton"]
323323

324324
## Override plugins
325325

326-
Override plugins are documented in [the reference guide](hooks.rst).
326+
Override plugins are documented in [the reference guide](reference/hooks.rst).
327327

328328
## Canonical distribution names
329329

@@ -474,3 +474,22 @@ def mycommand(
474474
) -> None:
475475
...
476476
```
477+
478+
## See Also
479+
480+
**Reference Documentation:**
481+
482+
- [Configuration Reference](reference/config-reference.rst) - Complete settings schema
483+
- [Hooks Reference](reference/hooks.rst) - Override plugin documentation
484+
- [CLI Reference](reference/cli.rst) - Command-line options
485+
486+
**How-To Guides:**
487+
488+
- [Override pyproject.toml](how-tos/pyproject-overrides.rst) - Modify build configuration
489+
- [Build from Git](how-tos/build-from-git-repo.rst) - Use custom source repositories
490+
- [Multiple Versions](how-tos/multiple-versions.rst) - Handle version conflicts
491+
492+
**Concepts:**
493+
494+
- [Bootstrap vs Build](concepts/bootstrap-vs-build.rst) - Understand build modes
495+
- [Dependencies](concepts/dependencies.rst) - Dependency types and resolution

docs/getting-started.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,24 @@ The output below is redacted for brevity. Missing sections are replaced with ``.
118118
As each dependency is built, fromager will show output from the build process
119119
and progress information. At the end of the build, fromager shows the list of
120120
packages that were built and how long each step took.
121+
122+
Next Steps
123+
----------
124+
125+
Now that you understand the basic workflow and debugging process:
126+
127+
**Improve Your Workflow:**
128+
129+
* :doc:`how-tos/containers` - Run builds in containers for better isolation
130+
* :doc:`how-tos/bootstrap-constraints` - Pin versions for reproducible builds
131+
* :doc:`how-tos/repeatable-builds` - Use previous build graphs for consistency
132+
133+
**Customize Builds:**
134+
135+
* :doc:`customization` - Add patches, override settings, configure variants
136+
* :doc:`how-tos/pyproject-overrides` - Override pyproject.toml settings
137+
138+
**Learn How It Works:**
139+
140+
* :doc:`concepts/index` - Understand bootstrap mode, build isolation, and more
141+
* :doc:`reference/glossary` - Definitions of key terms

docs/how-tos/index.rst

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,67 @@
11
How-tos
22
=======
33

4+
Task-oriented guides for common workflows and customization scenarios.
5+
6+
Popular Guides
7+
--------------
8+
9+
Quick links to frequently used guides:
10+
11+
* :doc:`containers` - Running fromager in containers (recommended approach)
12+
* :doc:`bootstrap-constraints` - Pin versions for reproducible builds
13+
* :doc:`graph-commands/using-graph-why` - Debug unexpected dependencies
14+
* :doc:`repeatable-builds` - Ensure build reproducibility
15+
16+
Getting Started
17+
---------------
18+
19+
Essential guides for initial setup and first builds.
20+
21+
.. toctree::
22+
:maxdepth: 1
23+
24+
containers
25+
bootstrap-constraints
26+
27+
Building Packages
28+
-----------------
29+
30+
Guides for building packages from various sources and configurations.
31+
32+
.. toctree::
33+
:maxdepth: 1
34+
35+
build-from-git-repo
36+
repeatable-builds
37+
parallel
38+
build-web-server
39+
40+
Build Configuration
41+
-------------------
42+
43+
Customize builds with overrides, variants, and version handling.
44+
445
.. toctree::
546
:maxdepth: 1
6-
:glob:
747

8-
*
9-
*/index
48+
pyproject-overrides
49+
multiple-versions
50+
pre-release-versions
51+
52+
Analyzing Builds
53+
----------------
54+
55+
Understand and debug dependency graphs and build issues.
56+
57+
.. toctree::
58+
:maxdepth: 1
59+
60+
graph-commands/index
61+
62+
See Also
63+
--------
64+
65+
* :doc:`/customization` - Comprehensive guide to customization options
66+
* :doc:`/reference/config-reference` - Configuration reference
67+
* :doc:`/reference/hooks` - Override plugins and hooks

docs/index.rst

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,58 @@ behavior that works for most PEP-517 compatible packages, but support
2323
overriding all of the actions for special cases, without encoding
2424
those special cases directly into fromager.
2525

26+
Getting Started
27+
---------------
28+
29+
Quick introduction and detailed walkthrough for new users.
30+
2631
.. toctree::
2732
:maxdepth: 2
2833

2934
quickstart.rst
30-
using.md
3135
getting-started.rst
36+
37+
Guides
38+
------
39+
40+
Task-oriented guides for common workflows and customization.
41+
42+
.. toctree::
43+
:maxdepth: 2
44+
45+
how-tos/index.rst
3246
customization.md
47+
using.md
48+
49+
Concepts & Explanation
50+
----------------------
51+
52+
Understanding how fromager works and technical deep-dives.
53+
54+
.. toctree::
55+
:maxdepth: 2
56+
3357
concepts/index.rst
34-
how-tos/index.rst
35-
hooks.rst
36-
files.md
3758
http-retry.md
38-
config-reference.rst
39-
cli.rst
40-
glossary.rst
59+
60+
Reference
61+
---------
62+
63+
Technical reference for CLI, configuration, files, and terminology.
64+
65+
.. toctree::
66+
:maxdepth: 2
67+
68+
reference/index.rst
69+
70+
Development
71+
-----------
72+
73+
Contributing to fromager.
74+
75+
.. toctree::
76+
:maxdepth: 2
77+
4178
develop.md
4279

4380
What's with the name?

docs/quickstart.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ figured out the build and runtime dependencies, built each package in the
5959
correct order, and created wheels in ``wheels-repo/downloads/``.
6060

6161
For a detailed explanation of the output files and directories, see
62-
:doc:`files`.
62+
:doc:`reference/files`.
6363

6464
Pinning Versions with Constraints
6565
---------------------------------
@@ -76,8 +76,21 @@ The ``-c`` option ensures fromager uses exactly the versions you specify.
7676
Next Steps
7777
----------
7878

79-
Now that you've seen fromager work with a simple package, you might want to:
79+
Now that you've seen fromager work with a simple package, explore:
8080

81-
* Learn to debug build failures with a more complex example in :doc:`getting-started`
82-
* Customize builds with settings, patches, and variants in :doc:`customization`
83-
* Check specific guides in :doc:`how-tos/index`
81+
**Learn More:**
82+
83+
* :doc:`getting-started` - Detailed walkthrough with debugging examples
84+
* :doc:`concepts/index` - Understand how fromager works
85+
86+
**Common Tasks:**
87+
88+
* :doc:`how-tos/containers` - Run fromager in containers (recommended)
89+
* :doc:`how-tos/bootstrap-constraints` - Pin versions for reproducible builds
90+
* :doc:`how-tos/repeatable-builds` - Ensure consistent builds across environments
91+
92+
**Customize Builds:**
93+
94+
* :doc:`customization` - Comprehensive customization guide
95+
* :doc:`reference/config-reference` - Configuration reference
96+
* :doc:`how-tos/index` - Task-oriented guides
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)