Skip to content

docs(guide): expand onboarding materials#62

Open
Liam-Deacon wants to merge 1 commit intomasterfrom
docs/issue-34-leed-docs
Open

docs(guide): expand onboarding materials#62
Liam-Deacon wants to merge 1 commit intomasterfrom
docs/issue-34-leed-docs

Conversation

@Liam-Deacon
Copy link
Owner

@Liam-Deacon Liam-Deacon commented Dec 24, 2025

Problem

Issue #34 calls for improved onboarding docs, troubleshooting, and inline scientific references for LEED-IV users, plus a bibliography system in Sphinx.

Solution

  • Add a start-here guide and troubleshooting page aimed at first-time LEED-IV users.
  • Add a references page backed by sphinxcontrib-bibtex and two core citations.
  • Wire new docs into the Sphinx index and add bibtex to doc requirements.

Testing

  • Not run (documentation-only changes).

Follow-ups

  • Decide the scope for Doxygen markup across core modules.
  • Expand bibliography with additional references tied to specific algorithms.
  • Add a full end-to-end tutorial that uses experimental data inputs.

Summary by Sourcery

Expand and restructure the Sphinx documentation to improve onboarding for LEED-IV users and introduce a citation-backed references system.

New Features:

  • Add a start-here guide for first-time LEED-IV users.
  • Add a troubleshooting page focused on common LEED-IV setup and usage issues.
  • Introduce a references page backed by a BibTeX bibliography containing core LEED-related citations.

Enhancements:

  • Enable sphinxcontrib-bibtex in the Sphinx configuration and wire a shared bibliography file into the docs build.
  • Update the Sphinx index and documentation structure to include the new onboarding and reference pages.

Build:

  • Add sphinxcontrib-bibtex to the documentation build requirements.

Summary by CodeRabbit

  • Documentation
    • Added "Getting Started" guide featuring LEED-IV definitions, program workflow, and practical end-to-end example
    • Added Troubleshooting section addressing common issues with actionable solutions
    • Added References section with curated bibliography
    • Updated documentation navigation and structure

✏️ Tip: You can customize this high-level summary in your review settings.

Add a start-here guide, troubleshooting page, and references with bibtex support. Wire the new pages into the Sphinx index and requirements.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 24, 2025

Reviewer's Guide

Expands LEED-IV onboarding documentation and introduces centralized bibliography support via sphinxcontrib-bibtex, wiring new pages into the Sphinx docs and adding scientific references.

File-Level Changes

Change Details Files
Enable centralized bibliography support in Sphinx docs using sphinxcontrib-bibtex.
  • Register sphinxcontrib-bibtex in the Sphinx extensions list so citations can be rendered in the docs.
  • Configure bibtex_bibfiles to point at the shared references.bib file for bibliography management.
  • Add sphinxcontrib-bibtex to the doc/requirements.txt to ensure the extension is available during documentation builds.
doc/conf.py
doc/requirements.txt
Introduce a shared bibliography file with core LEED-IV scientific references.
  • Create references.bib containing core LEED-IV references (Pendry 1980 article and Van Hove & Tong 1984 book).
doc/references.bib
Add new onboarding and reference documentation pages for LEED-IV users and integrate them into the docs navigation.
  • Create a start_here.rst page aimed at first-time LEED-IV users to guide initial setup and usage.
  • Create a troubleshooting.rst page documenting common LEED-IV setup and usage issues and their resolutions.
  • Create a references.rst page that renders the bibliography and explains how references relate to LEED-IV usage.
  • Update index.rst to include the new onboarding and reference pages in the main table of contents.
doc/start_here.rst
doc/troubleshooting.rst
doc/references.rst
doc/index.rst

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Walkthrough

Adds bibliography support to Sphinx documentation and introduces three new documentation pages: a "start here" guide for LEED-IV users, a troubleshooting section for common issues, and a references page. Includes new BibTeX entries and updates navigation to link new pages.

Changes

Cohort / File(s) Summary
Sphinx Configuration
doc/conf.py, doc/requirements.txt
Added sphinxcontrib.bibtex extension and configured bibtex_bibfiles = ['references.bib']; added sphinxcontrib-bibtex>=2.5,<3 dependency
Bibliography
doc/references.bib, doc/references.rst
Created BibTeX file with two entries (Pendry 1980 article, Van Hove/Tong 1984 book) and corresponding references documentation page with bibliography directive
Documentation Pages
doc/start_here.rst, doc/troubleshooting.rst
Added beginner guide covering LEED-IV definition, program loop, input requirements, and Ni(111) example; added troubleshooting guide with sections for phase shift files, input prefix mismatch, R-factor issues, and parameter defaults
Navigation
doc/index.rst
Updated toctree to include start_here after introduction and troubleshooting/references after downloads

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Possibly related PRs

Suggested labels

documentation, enhancement

Poem

🐰 Hops through references with glee,
Bibliography now flows so free,
Start here, troubleshoot with care,
LEED-IV knowledge laid so fair!
Documentation dreams come true,
Sphinx confirms: all is through! ✨

🚥 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 'docs(guide): expand onboarding materials' directly and accurately summarizes the main changes: addition of new onboarding documentation including start_here.rst, troubleshooting.rst, references page, and supporting infrastructure.
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 docstrings

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.

@Liam-Deacon
Copy link
Owner Author

Clarifications for #34:

  • How deep should we go on Doxygen markup in this pass (specific modules or a minimal set of public headers)?
  • Do you want a dedicated tutorial that runs csearch end-to-end with sample data, or keep it to the fixed-geometry walk-through for now?
  • Any preferred citation style beyond the bibtex defaults?

@codacy-production
Copy link

Codacy's Analysis Summary

0 new issue (≤ 0 issue)
0 new security issue
0 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

@Liam-Deacon Liam-Deacon marked this pull request as ready for review January 10, 2026 07:42
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai coderabbitai bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 10, 2026
Copy link

@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

🤖 Fix all issues with AI agents
In @doc/conf.py:
- Line 37: The requirements entry for the bibtex extension is too low for Sphinx
>=7.2; update the dependency string 'sphinxcontrib-bibtex>=2.5,<3' to
'sphinxcontrib-bibtex>=2.6,<3' so the added extension 'sphinxcontrib.bibtex' is
supported by the required Sphinx versions.

In @doc/references.bib:
- Around line 1-18: Update the bibliographic metadata for the two BibTeX
entries: for entry key pendry1980 replace the incorrect doi value with
10.1088/0022-3719/13/5/024; for entry key vanhove1984 change year to 1979,
replace isbn with 978-3-642-67197-5, and add series = {Springer Series in
Chemical Physics} and volume = {2} (keep author, title, and publisher as-is);
ensure fields are valid BibTeX keys and values for keys pendry1980 and
vanhove1984.

In @doc/start_here.rst:
- Around line 3-5: The title decorators are too short for the title text "Start
here: LEED-IV in CLEED"; update the overline and underline to be at least as
long as the title (e.g., change the 27 asterisks to 29 asterisks) or shorten the
title so the decorator length matches, ensuring the reStructuredText title
markup uses matching-length decoration.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6d801c and a5facf8.

📒 Files selected for processing (7)
  • doc/conf.py
  • doc/index.rst
  • doc/references.bib
  • doc/references.rst
  • doc/requirements.txt
  • doc/start_here.rst
  • doc/troubleshooting.rst
🧰 Additional context used
📓 Path-based instructions (1)
doc/**/*.rst

📄 CodeRabbit inference engine (AGENTS.md)

doc/**/*.rst: Documentation sources under doc/ must use reStructuredText (*.rst), not Markdown; whitespace/indentation and blank lines are part of the syntax
Prefer .. toctree:: navigation over .. include:: in reStructuredText so pages are addressable and cross-references behave predictably
In reStructuredText documentation, avoid tabs; use spaces (tabs can create accidental block quotes / unexpected indentation)
Refer to repo-specific reStructuredText conventions and common pitfalls in skills/restructured-text/SKILL.md

Files:

  • doc/start_here.rst
  • doc/references.rst
  • doc/index.rst
  • doc/troubleshooting.rst
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: Liam-Deacon/CLEED PR: 0
File: doc/AGENTS.md:0-0
Timestamp: 2025-12-20T09:06:56.386Z
Learning: Applies to doc/CLEED_Manual.pdf : Keep `doc/CLEED_Manual.pdf` tracked in git as the canonical reference manual for the original CLEED program suite
📚 Learning: 2025-12-20T09:06:56.386Z
Learnt from: CR
Repo: Liam-Deacon/CLEED PR: 0
File: doc/AGENTS.md:0-0
Timestamp: 2025-12-20T09:06:56.386Z
Learning: Applies to doc/CLEED_Manual.pdf : Keep `doc/CLEED_Manual.pdf` tracked in git as the canonical reference manual for the original CLEED program suite

Applied to files:

  • doc/start_here.rst
  • doc/references.rst
  • doc/references.bib
  • doc/troubleshooting.rst
📚 Learning: 2026-01-07T13:38:38.082Z
Learnt from: CR
Repo: Liam-Deacon/CLEED PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-07T13:38:38.082Z
Learning: Applies to doc/**/*.rst : Prefer `.. toctree::` navigation over `.. include::` in reStructuredText so pages are addressable and cross-references behave predictably

Applied to files:

  • doc/index.rst
🪛 GitHub Actions: Docs (Sphinx)
doc/start_here.rst

[error] 3-3: Sphinx warning treated as error: Title overline too short.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (7)
doc/requirements.txt (1)

3-3: LGTM!

The sphinxcontrib-bibtex dependency is correctly versioned and necessary for bibliography support introduced in the new documentation files.

doc/troubleshooting.rst (1)

1-41: LGTM!

The troubleshooting guide follows proper reStructuredText conventions with correct header underline alignment, clear section labels, and actionable guidance. The practical problem-solution format is well-suited for first-time users.

doc/start_here.rst (1)

17-18: No issues found. The citation syntax :cite:p:vanhove1984 and `:cite:p:`pendry1980 is correct for sphinxcontrib-bibtex >=2.5 and follows the documented parenthetical citation role format.

doc/references.rst (1)

1-12: Bibliography structure is correct; consider expanding the collection.

The reStructuredText syntax is correct, and the bibliography directive properly references references.bib with the :all: option. However, the description states it "collects primary sources referenced throughout the CLEED manual and tutorials," yet only two entries are currently included. This aligns with the follow-up items mentioned in the PR objectives about expanding the bibliography with additional algorithm-specific references.

Verify that the two included citations are sufficient for the current documentation scope, or consider adding placeholder entries for commonly referenced works in LEED-IV analysis.

doc/index.rst (2)

19-19: LGTM! Logical placement of start_here guide.

The start_here entry is well-positioned after the introduction, providing a natural onboarding flow for new LEED-IV users.


26-27: LGTM! Troubleshooting and references sections complete the documentation structure.

The placement of troubleshooting and references after the main content sections (downloads) follows a logical documentation structure, making these resources easily accessible.

doc/conf.py (1)

99-100: LGTM! Bibliography configuration is correct.

The bibtex_bibfiles configuration correctly points to references.bib with a clear comment explaining the purpose. The relative path is appropriate since both files reside in the doc/ directory.

'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinxcontrib.bibtex',
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check sphinxcontrib-bibtex and Sphinx version requirements

echo "=== Content of doc/requirements.txt ==="
cat doc/requirements.txt

echo -e "\n=== Checking for version specifications ==="
grep -i "sphinx" doc/requirements.txt | head -20

Repository: Liam-Deacon/CLEED

Length of output: 283


🌐 Web query:

sphinxcontrib-bibtex 2.5 compatibility Sphinx 7.2

💡 Result:

Short answer: No — sphinxcontrib-bibtex 2.5 is not guaranteed compatible with Sphinx 7.2. Upgrade to a maintained release (2.6.x or later) that documents support for newer Sphinx versions.

Evidence:

  • Sphinx 7.2 release notes (Sphinx 7.x series) — release date and changes. [1]
  • sphinxcontrib-bibtex project documentation shows more recent 2.6.x releases (active maintenance) and changelog entries after 2.5; use a current release for compatibility with recent Sphinx. [2]

If you want, I can check the exact minimum/maximum Sphinx requirement declared in the sphinxcontrib-bibtex 2.5 package metadata (setup.cfg/pyproject) and list any breaking changes between 2.5 and the current sphinxcontrib-bibtex.


Update sphinxcontrib-bibtex minimum version requirement to 2.6+

The extension addition is correct, but doc/requirements.txt specifies sphinxcontrib-bibtex>=2.5,<3, which is incompatible with the required Sphinx version (>=7.2,<9). Version 2.5 does not provide documented support for Sphinx 7.2+. Update the requirement to sphinxcontrib-bibtex>=2.6,<3 to ensure compatibility.

🤖 Prompt for AI Agents
In @doc/conf.py at line 37, The requirements entry for the bibtex extension is
too low for Sphinx >=7.2; update the dependency string
'sphinxcontrib-bibtex>=2.5,<3' to 'sphinxcontrib-bibtex>=2.6,<3' so the added
extension 'sphinxcontrib.bibtex' is supported by the required Sphinx versions.

Comment on lines +1 to +18
@article{pendry1980,
author = {Pendry, J. B.},
title = {Reliability factors for LEED calculations},
journal = {Journal of Physics C: Solid State Physics},
volume = {13},
number = {5},
pages = {937-944},
year = {1980},
doi = {10.1088/0022-3719/13/5/012}
}

@book{vanhove1984,
author = {Van Hove, M. A. and Tong, S. Y.},
title = {Surface Crystallography by LEED},
publisher = {Springer},
year = {1984},
isbn = {978-3-540-13380-0}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the DOI and ISBN for the bibliography entries

echo "=== Verifying Pendry 1980 DOI ==="
curl -s -L "https://doi.org/10.1088/0022-3719/13/5/012" -I 2>&1 | head -n 5

echo -e "\n=== Checking ISBN format for Van Hove 1984 ==="
# ISBN-13 format check: 978-3-540-13380-0
isbn="978-3-540-13380-0"
echo "ISBN: $isbn"
# Remove hyphens and verify it's 13 digits
digits=$(echo "$isbn" | tr -d '-')
echo "Digits: $digits (length: ${#digits})"
if [ ${#digits} -eq 13 ]; then
  echo "✓ ISBN-13 format is valid"
else
  echo "✗ ISBN format is invalid"
fi

Repository: Liam-Deacon/CLEED

Length of output: 178


🌐 Web query:

Pendry 1980 "Reliability factors for LEED calculations" Journal of Physics C

💡 Result:

Here’s the reference and where to find it:

  • J. B. Pendry, "Reliability factors for LEED calculations," Journal of Physics C: Solid State Physics, vol. 13, no. 5, pp. 937–944, Feb. 1980. DOI: 10.1088/0022-3719/13/5/024. [1]

Online records / access:

  • IOP Stacks entry / PDF (journal page). [1]
  • bibliographic listing (summary entry). [2]

Sources:
[1] CiNii / IOP Stacks bibliographic record (DOI 10.1088/0022-3719/13/5/024).
[2] Low-energy electron diffraction — reference list (Pendry 1980).


🌐 Web query:

Van Hove Tong 1984 "Surface Crystallography by LEED" Springer

💡 Result:

Bibliographic details:

Van Hove, M. A.; Tong, S. Y. Surface Crystallography by LEED: Theory, Computation and Structural Results. Springer‑Verlag, Springer Series in Chemical Physics, Vol. 2. DOI: 10.1007/978-3-642-67195-1. (Original Springer publication: 1979; paperback reprint/ISBN 978-3-642-67197-5). [1][2]

Sources: Springer book page and product listings. [1] [2]


BibTeX structure is correct, but bibliographic metadata contains errors that must be fixed.

The entries follow proper BibTeX syntax, but verification revealed significant inaccuracies in the citation data:

  • Pendry 1980: DOI is incorrect. The entry lists 10.1088/0022-3719/13/5/012, but the correct DOI is 10.1088/0022-3719/13/5/024.
  • Van Hove & Tong: The year is wrong (listed as 1984, but the original publication was 1979). The ISBN 978-3-540-13380-0 does not match published editions. The correct ISBN for the paperback reprint is 978-3-642-67197-5, and the work is published as part of Springer Series in Chemical Physics, Vol. 2.

Both entries need correction before merging.

🤖 Prompt for AI Agents
In @doc/references.bib around lines 1 - 18, Update the bibliographic metadata
for the two BibTeX entries: for entry key pendry1980 replace the incorrect doi
value with 10.1088/0022-3719/13/5/024; for entry key vanhove1984 change year to
1979, replace isbn with 978-3-642-67197-5, and add series = {Springer Series in
Chemical Physics} and volume = {2} (keep author, title, and publisher as-is);
ensure fields are valid BibTeX keys and values for keys pendry1980 and
vanhove1984.

Comment on lines +3 to +5
**************************
Start here: LEED-IV in CLEED
**************************
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix title overline/underline length.

The Sphinx build is failing because the title decorators (27 asterisks) are shorter than the title text (29 characters). reStructuredText requires decorators to be at least as long as the title.

🐛 Proposed fix
-**************************
+*****************************
 Start here: LEED-IV in CLEED
-**************************
+*****************************
📝 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
**************************
Start here: LEED-IV in CLEED
**************************
*****************************
Start here: LEED-IV in CLEED
*****************************
🧰 Tools
🪛 GitHub Actions: Docs (Sphinx)

[error] 3-3: Sphinx warning treated as error: Title overline too short.

🤖 Prompt for AI Agents
In @doc/start_here.rst around lines 3 - 5, The title decorators are too short
for the title text "Start here: LEED-IV in CLEED"; update the overline and
underline to be at least as long as the title (e.g., change the 27 asterisks to
29 asterisks) or shorten the title so the decorator length matches, ensuring the
reStructuredText title markup uses matching-length decoration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant