Skip to content

docs: restructure for better sidebar#290

Merged
jdecarolis merged 11 commits intounstablefrom
docs_restructure
Apr 2, 2026
Merged

docs: restructure for better sidebar#290
jdecarolis merged 11 commits intounstablefrom
docs_restructure

Conversation

@ParticularlyPythonicBS
Copy link
Copy Markdown
Member

@ParticularlyPythonicBS ParticularlyPythonicBS commented Mar 29, 2026

Summary by CodeRabbit

  • Documentation
    • Reorganized landing TOC into Getting Started, Core Concepts, Advanced Topics, and Appendix.
    • Added Database and Commodity Network pages with schema guidance, ER diagram, SQL examples, data-quality checks, and source-tracing diagnostics.
    • New Quick Start with Windows activation/install steps; removed embedded database construction content.
    • Consolidated References into one page and updated many links to HTTPS; standardized headings and footnote formatting.
    • Removed dynamic copyright and switched PDF build to xelatex (build messages updated).

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Walkthrough

Documentation-only updates: added Database and Commodity Network pages, reorganized index and Quick Start toctrees, normalized top-level headings and footnote reference syntax across multiple pages, removed an unused time import and dynamic copyright in Sphinx config, and switched LaTeX engine to xelatex in docs tooling.

Changes

Cohort / File(s) Summary
TOC & Landing
docs/source/index.rst, docs/source/quick_start.rst
Reworked root toctree into categorized sections; moved Database/data-quality content out of Quick Start; added Windows Command Prompt and PowerShell venv/uv activation/install commands; removed trailing Database content from Quick Start.
New Docs
docs/source/database.rst, docs/source/commodity_network.rst
Added Database and Commodity Network pages documenting schema, ER diagram reference, SQL examples, data-quality checks, source-tracing, and suppression rules.
References & Aggregation
docs/source/references.rst
Consolidated previously included sections into a single References page; de-prefixed footnote identifiers and updated multiple external targets/URLs to HTTPS or new destinations.
Header & Reference Normalization
docs/source/computational_implementation.rst, docs/source/mathematical_formulation.rst, docs/source/preface.rst, docs/source/visualization.rst
Inserted/adjusted top-level reST headings and normalized footnote/cross-reference markup; updated preface links and removed mailing-list contact.
Sphinx Config
docs/source/conf.py
Removed import time and dynamic copyright assignment; added latex_engine = 'xelatex'.
Build Tooling
docs/Makefile
Switched latexpdf target messages and manual fallback command from pdflatex to xelatex (behavior unchanged).

Sequence Diagram(s)

(omitted — changes are documentation-only and do not introduce new multi-component control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jdecarolis
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the pull request, which is a documentation restructuring to improve sidebar navigation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs_restructure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/source/database.rst`:
- Around line 109-111: Replace the deprecated reference
"data_files/example_dbs/utopia.sql" with the current maintained starter
workflow/path; update the sentence to point users to
"data_files/temoa_schema_v4.sql" (or the project’s maintained example
DB/workflow) so new users are directed to the supported schema; update any
adjacent text that suggests using the old example to instead reference the
maintained schema file and workflow.

In `@docs/source/preface.rst`:
- Around line 65-67: Move the "Preface" top-level heading to the very top of the
file so it becomes the document title, then convert "What is Temoa?" into a
subsection under Preface (e.g., use a suitable subsection underline style
shorter than the top-level or add a small underline like "----" to make it a
subsection), ensuring heading underline lengths match the heading text and the
structure places "What is Temoa?" beneath "Preface".

In `@docs/source/references.rst`:
- Around line 42-71: Update all external reference targets in
docs/source/references.rst to use HTTPS where the remote site supports it:
replace "http://" with "https://" for entries such as _WinGLPK, _Temoa model,
_temoaproject.org, _example data sets, _HTML, _available (Stanford cvxbook),
_quick start guide, _sqlite, _Graphviz, etc.; for each underscore-label (e.g.,
"WinGLPK", "Temoa model", "temoaproject.org") verify the HTTPS endpoint works
and leave the original HTTP only if HTTPS is unavailable, then commit the
changed reference URLs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e12fd2d5-ca61-4b8a-abff-55e8afa242e0

📥 Commits

Reviewing files that changed from the base of the PR and between cd69763 and 022995c.

⛔ Files ignored due to path filters (4)
  • docs/source/assets/logo.pdf is excluded by !**/*.pdf
  • docs/source/assets/logo.svg is excluded by !**/*.svg
  • docs/source/assets/logo_bottom_text.pdf is excluded by !**/*.pdf
  • docs/source/assets/logo_bottom_text.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • docs/source/computational_implementation.rst
  • docs/source/conf.py
  • docs/source/database.rst
  • docs/source/index.rst
  • docs/source/mathematical_formulation.rst
  • docs/source/preface.rst
  • docs/source/quick_start.rst
  • docs/source/references.rst
  • docs/source/visualization.rst
💤 Files with no reviewable changes (1)
  • docs/source/conf.py

@jdecarolis
Copy link
Copy Markdown
Collaborator

@ParticularlyPythonicBS -- This looks really good. A few minor requests:

  • Maybe I missed it, but I'd like to include this MD file on the commodity network. Perhaps we can add a "Network Flow" section between "Database Construction" and "Visualization"?
  • Change "Monte Carlo Uncertainty Quantification" to "Monte Carlo Simulation" in both the menu and doc header
  • List the advanced topics in the menu alphabetically

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/source/commodity_network.rst`:
- Line 40: Fix spelling and wording typos in the user-facing sentence "provided
to the model freely without a preceding processing chain if there is not one
avaialbe." by correcting "avaialbe" to "available" and improving phrasing for
readability (e.g., "provided to the model without a preceding processing chain
if none is available."). Also review and correct the similar typos and wording
issues at the other mentioned occurrences (lines referenced in the review) to
ensure consistency and searchability throughout the commodity_network.rst
document.

In `@docs/source/database.rst`:
- Line 48: In the narrative sentence "modeler doesn't accidently type the wrong
label in this table." (and the duplicate at the other occurrence), correct the
spelling by changing "accidently" to "accidentally" and ensure the sentence
reads "modeler doesn't accidentally type the wrong label in this table."; update
both occurrences so the user-facing copy is correct.
- Around line 123-127: Update the documentation that currently claims the ``<``
redirection operator works in PowerShell: state that PowerShell does not support
Unix-style ``<`` stdin redirection and replace the misleading cross-shell claim,
then provide cross-platform alternatives such as using SQLite's interactive
".read" command (with ``sqlite3``) and a PowerShell-safe pipeline alternative
(e.g., reading the file and piping into ``sqlite3``); reference the existing
mention of the ``<`` operator and the ``sqlite3`` client so reviewers can find
and update the paragraph.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 41e9a146-0f95-4907-9149-69ea60f99e53

📥 Commits

Reviewing files that changed from the base of the PR and between c57e79d and 5eaf52d.

📒 Files selected for processing (5)
  • docs/source/commodity_network.rst
  • docs/source/database.rst
  • docs/source/index.rst
  • docs/source/monte_carlo.rst
  • docs/source/quick_start.rst

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
docs/source/database.rst (2)

48-48: ⚠️ Potential issue | 🟡 Minor

User-facing spelling errors remain in narrative text.

Please correct accidentlyaccidentally and programaticallyprogrammatically.

Also applies to: 58-58

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/database.rst` at line 48, Fix the user-facing spelling mistakes
in docs/source/database.rst by replacing "accidently" with "accidentally" and
"programatically" with "programmatically"; search the file for the exact
misspellings (notably the occurrences around the current diff, e.g., the
"accidently" instance shown and the other occurrence at the file's line ~58) and
update them so the narrative text uses the correct spellings.

123-125: ⚠️ Potential issue | 🟠 Major

Incorrect PowerShell compatibility claim for < redirection.

This still states PowerShell supports Unix-style stdin redirection with <, which is incorrect and will fail for users following the docs.

Does Windows PowerShell (5.1 and 7+) support Unix-style stdin redirection with `<` for native commands like `sqlite3 my_database.sqlite < my_database.sql`? What is the recommended cross-version alternative?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/database.rst` around lines 123 - 125, The docs incorrectly claim
PowerShell supports the Unix-style ``<`` stdin redirection; update the sentence
referencing the ``<`` operator (and the example `sqlite3 my_database.sqlite <
my_database.sql`) to say that ``<`` is supported in most Linux/macOS shells and
in Windows Command Prompt, but not in Windows PowerShell; provide the
cross-version PowerShell-safe alternative using piping such as `Get-Content
my_database.sql | sqlite3 my_database.sqlite` (or the `type my_database.sql |
sqlite3 my_database.sqlite`/`gc` alias) and keep the note about using correct
Windows path separators.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/source/database.rst`:
- Line 48: Fix the user-facing spelling mistakes in docs/source/database.rst by
replacing "accidently" with "accidentally" and "programatically" with
"programmatically"; search the file for the exact misspellings (notably the
occurrences around the current diff, e.g., the "accidently" instance shown and
the other occurrence at the file's line ~58) and update them so the narrative
text uses the correct spellings.
- Around line 123-125: The docs incorrectly claim PowerShell supports the
Unix-style ``<`` stdin redirection; update the sentence referencing the ``<``
operator (and the example `sqlite3 my_database.sqlite < my_database.sql`) to say
that ``<`` is supported in most Linux/macOS shells and in Windows Command
Prompt, but not in Windows PowerShell; provide the cross-version PowerShell-safe
alternative using piping such as `Get-Content my_database.sql | sqlite3
my_database.sqlite` (or the `type my_database.sql | sqlite3
my_database.sqlite`/`gc` alias) and keep the note about using correct Windows
path separators.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 71330d51-2b17-42ad-97e1-ee4ea0de442e

📥 Commits

Reviewing files that changed from the base of the PR and between 5eaf52d and 1b949de.

📒 Files selected for processing (2)
  • docs/source/database.rst
  • docs/source/quick_start.rst

@ParticularlyPythonicBS
Copy link
Copy Markdown
Member Author

@ParticularlyPythonicBS -- This looks really good. A few minor requests:

* Maybe I missed it, but I'd like to include this MD file on the commodity network. Perhaps we can add a "Network Flow" section between "Database Construction" and "Visualization"?

* Change "Monte Carlo Uncertainty Quantification" to "Monte Carlo Simulation" in both the menu and doc header

* List the advanced topics in the menu alphabetically

Done! Also added windows compatible instructions wherever needed

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (2)
docs/source/commodity_network.rst (1)

139-141: ⚠️ Potential issue | 🟡 Minor

Correct typo: “were” → “where”.

Line 140 currently says “myopic actions were a technology…”, which should be “where”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/commodity_network.rst` around lines 139 - 141, Fix the typo in
the documentation text where the phrase "myopic actions were a technology in a
chain is not selected for build" uses "were"; replace "were" with "where" so it
reads "myopic actions where a technology in a chain is not selected for build".
Ensure the corrected word appears in the sentence that contains "non-utilized
outputs may be the result..." so the sentence reads grammatically correct.
docs/source/database.rst (1)

58-58: ⚠️ Potential issue | 🟡 Minor

Fix spelling: “programatically” → “programmatically”.

This is user-facing copy and appears misspelled on Line 58.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/database.rst` at line 58, Replace the misspelled word
"programatically" with the correct spelling "programmatically" in the sentence
that reads "perform thousands of runs, programatically store all the results,
and execute" so the copy becomes "perform thousands of runs, programmatically
store all the results, and execute"; update the source text where that exact
phrase appears to fix the user-facing typo.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/Makefile`:
- Around line 106-125: The Makefile's help text still references "pdflatex" even
though the latexpdf target now uses xelatex; update the help/usage text that
mentions pdflatex to say xelatex (and adjust any variable descriptions that
mention PDFLATEX invoking pdflatex) so the displayed help matches the latexpdf
target behavior; locate references near the latexpdf target and any lines that
document PDFLATEX or latex engine in the help output and replace "pdflatex" with
"xelatex" (and update related wording for PDFLATEX variable if needed).

In `@docs/source/commodity_network.rst`:
- Around line 30-31: Fix the grammar in the sentence that currently reads "In
order enforce conservation of flow constraints" in
docs/source/commodity_network.rst by adding the missing "to" (e.g., "In order to
enforce conservation of flow constraints") or rephrasing to "To enforce
conservation of flow constraints" so the line reads smoothly when describing how
the model identifies output flows (commodities) and demand.

In `@docs/source/index.rst`:
- Around line 8-12: The sidebar currently uses the target page title for the
entry 'commodity_network'; change the toctree entry to use an explicit label so
the sidebar shows "Network Flow" (e.g., replace the bare 'commodity_network'
list item with a labeled entry like "Network Flow <commodity_network>" in
docs/source/index.rst) so the sidebar text matches the requested wording.

In `@docs/source/references.rst`:
- Around line 55-56: Replace the date-stamped PDF link for the PDF reference in
docs/source/references.rst (the ".. _PDF:" anchor) with a stable "latest" or
canonical PDF endpoint/alias (e.g., a /latest or /current PDF URL) so the PDF
reference does not become stale; update the URL while keeping the ".. _PDF:"
anchor name unchanged.

---

Duplicate comments:
In `@docs/source/commodity_network.rst`:
- Around line 139-141: Fix the typo in the documentation text where the phrase
"myopic actions were a technology in a chain is not selected for build" uses
"were"; replace "were" with "where" so it reads "myopic actions where a
technology in a chain is not selected for build". Ensure the corrected word
appears in the sentence that contains "non-utilized outputs may be the
result..." so the sentence reads grammatically correct.

In `@docs/source/database.rst`:
- Line 58: Replace the misspelled word "programatically" with the correct
spelling "programmatically" in the sentence that reads "perform thousands of
runs, programatically store all the results, and execute" so the copy becomes
"perform thousands of runs, programmatically store all the results, and
execute"; update the source text where that exact phrase appears to fix the
user-facing typo.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: df81f68e-78cb-4e21-8e48-feb51972874d

📥 Commits

Reviewing files that changed from the base of the PR and between 5eaf52d and 8cef6e2.

📒 Files selected for processing (7)
  • docs/Makefile
  • docs/source/commodity_network.rst
  • docs/source/conf.py
  • docs/source/database.rst
  • docs/source/index.rst
  • docs/source/quick_start.rst
  • docs/source/references.rst

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/source/preface.rst`:
- Around line 120-121: Replace the escaped-space before the period after the
inline link: locate the text "Issue tracker`_\ ." and remove the backslash and
space so it reads "Issue tracker`_." ensuring the reStructuredText link markup
uses `Issue tracker`_. exactly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8c17dfec-62c3-4b76-b374-170ab27e0d9b

📥 Commits

Reviewing files that changed from the base of the PR and between 8cef6e2 and 429a2bb.

📒 Files selected for processing (5)
  • docs/Makefile
  • docs/source/commodity_network.rst
  • docs/source/database.rst
  • docs/source/preface.rst
  • docs/source/references.rst

Comment on lines 120 to +121
If you are a software developer-type, feel free to open an issue on our `GitHub
Issue tracker`_\ . If you would rather not create a GitHub account, feel free
to let us know the issue on our `mailing list`_\ .
Issue tracker`_\ .
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove the escaped-space before punctuation after the link.

Line 121 currently uses Issue tracker`_\ .`, which may render awkward spacing before the period. Use Issue tracker`_.`` instead.

✏️ Proposed fix
-If you are a software developer-type, feel free to open an issue on our `GitHub
-Issue tracker`_\ .
+If you are a software developer-type, feel free to open an issue on our `GitHub
+Issue tracker`_.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If you are a software developer-type, feel free to open an issue on our `GitHub
Issue tracker`_\ . If you would rather not create a GitHub account, feel free
to let us know the issue on our `mailing list`_\ .
Issue tracker`_\ .
If you are a software developer-type, feel free to open an issue on our `GitHub
Issue tracker`_.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/source/preface.rst` around lines 120 - 121, Replace the escaped-space
before the period after the inline link: locate the text "Issue tracker`_\ ."
and remove the backslash and space so it reads "Issue tracker`_." ensuring the
reStructuredText link markup uses `Issue tracker`_. exactly.

@jdecarolis jdecarolis merged commit 3e29e07 into unstable Apr 2, 2026
12 checks passed
@jdecarolis jdecarolis deleted the docs_restructure branch April 2, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants