Skip to content

Docs - #10

Merged
lucifer1004 merged 3 commits into
mainfrom
docs
Jun 6, 2026
Merged

Docs#10
lucifer1004 merged 3 commits into
mainfrom
docs

Conversation

@lucifer1004

@lucifer1004 lucifer1004 commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Major docs restructure: added Theory & conventions, Methods & references, Performance, Linearization, Usage, and Examples landing pages.
    • Expanded README with Installation, Quick start, Features, How to cite, and Methods & references.
    • Enriched API reference and organized examples (notebook walkthroughs, execution guidance).
    • Added solver guidance, performance tips, and citation/method details.
  • Chores

    • Updated package citation metadata to v0.5.0 (publication date updated).

Add a README "Methods & references" section as the single bibliography and
adopt "Author (Year), Eq. (N)" for all in-source citations.

Confirm and correct four references (via literature search):
- Hu (2018): NUDT PhD dissertation (Eq. 5.71 in the IITM recurrence)
- Bi et al. (2014) -> Bi & Yang (2014), JQSRT 138 (two authors)
- Sh-matrix: Farafonov et al. (2003) origin; Petrov et al. (2007) coined the name
- Xu & Davis (2011): correct title + Opt. Lett. 36(22):4464
Convert inline math in docstrings from single-backtick code spans to
Documenter inline LaTeX (double backticks) so formulas typeset in the
rendered docs. Conservative scope: only multi-symbol expressions/relations
are converted; parameter names, types, functions, and kwargs stay as code.
Display ```math blocks unchanged; docstrings gaining backslashes switched
to @doc raw.
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR performs a comprehensive documentation expansion and release update: versioning the package to v0.5.0 (June 2026), restructuring the README and documentation site with new theory/references pages, enriching usage guidance and API organization, and standardizing citation formatting and docstring presentation across source code with no logic changes.

Changes

Documentation expansion and restructuring

Layer / File(s) Summary
Release metadata and README restructuring
CITATION.bib, README.md
Version updated to v0.5.0 with June 2026 date. README adds Installation, Quick start, How to cite, and comprehensive Methods & references sections, replacing the prior single-line intro.
Documentation site structure and navigation
docs/make.jl, docs/src/index.md
Site navigation is reorganized into Theory & conventions, Usage, Examples (with Overview landing page), Performance, Linearization, API, and Methods & references. Index page adds CurrentModule metadata, restructured navigation sections (Where to go next, How to cite), and Floating-point genericity section.
Theory and references documentation
docs/src/theory.md, docs/src/references.md
Two new pages document T-matrix theory, particle orientation, far-field observables and solvers; and a detailed, framework-organized bibliography with DOIs.
Usage guidance and linearization documentation
docs/src/usage.md, docs/src/linearization.md
Usage guide expands with Prism shape (marked non-axisymmetric using IITM), extended solver selection, Sh-matrix parameter sweep section, and comprehensive orientation-averaging workflows. Linearization docs add backend support table and worked linearization example.
API reference, examples, and performance documentation
docs/src/api.md, docs/src/examples/index.md, docs/src/performance.md
API reference moves from simple @index/@autodocs to multi-section organized layout. New examples landing page describes Pluto notebooks and local execution. New performance documentation covers computational cost drivers, parameter-sweep reuse, and benchmark suite structure.

Source code docstring standardization

Layer / File(s) Summary
EBCM stabilization docstring standardization
src/EBCM/stabilization.jl, src/EBCM/axisymmetric.jl, src/EBCM/shmatrix.jl
Docstrings converted to @doc raw format with updated citation wording, TeX math formatting, and refined descriptions; stable parameter and error messages updated for consistency.
IITM, Mie, and common transition matrix docstring updates
src/IITM/arbitrary.jl, src/IITM/axisymmetric.jl, src/IITM/nfold.jl, src/Mie/MieTransitionMatrix.jl, src/Mie/bhcoat.jl, src/Mie/bhmie.jl, src/common/AbstractTransitionMatrix.jl, src/common/AxisymmetricTransitionMatrix.jl, src/common/RandomOrientationTransitionMatrix.jl
Inline comments and docstrings updated with consistent citation formatting (author/year, equation notation); new type-level docstring added for AxisymmetricTransitionMatrix.
Solver and special function docstring standardization
src/solvers.jl, src/special_functions/wignerd.jl
ConvergencePolicy documentation converted to @doc raw with LaTeX notation; Wigner function citations updated to reference Mishchenko et al. (2002); error messages reformatted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • JuliaRemoteSensing/TransitionMatrices.jl#8: Introduces the stable mode implementation in EBCM axisymmetric solvers, which this PR updates with revised documentation and citation formatting in the same code area.

Poem

🐇 The docs now bloom with theory true,
From Mie to EBCM, IITM too—
Citations polished, references bright,
A guide for users, clear and light.
Version bumped, docs tidied — hurrah!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Docs' is extremely vague and generic; it provides no meaningful information about what documentation changes were made or the scope of the changeset. Replace with a more descriptive title that specifies the main documentation update, such as 'Add comprehensive documentation and refactor docs structure' or 'Add theory, references, and performance docs with improved navigation'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/usage.md`:
- Around line 41-43: The doc text incorrectly calls N a "type parameter" while
the example uses it as a constructor argument; update the wording to say that N
is the number of base edges and is supplied as the first argument to the Prism
constructor (e.g., Prism(6, ...)), clarifying that it is a runtime/constructor
parameter rather than a type parameter and adjust the sentence that mentions
"type parameter" accordingly (reference: Prism and the symbol N).
- Line 95: The current markdown mixes link and code formatting for the
recommendation string causing rendering issues; update the table cell so the
entire recommendation is treated as code inside the link—for example wrap the
whole label in backticks and then link it like [`Iterative(EBCM; stable =
true)`](`@ref`) so the symbols Iterative and the qualifier (EBCM; stable = true)
render correctly as inline code while remaining a link (target the table cell
containing "Iterative" and "(EBCM; stable = true)").
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b319ec2-9315-4677-b9ce-365f06912c70

📥 Commits

Reviewing files that changed from the base of the PR and between ce84242 and 69084de.

📒 Files selected for processing (25)
  • CITATION.bib
  • README.md
  • docs/make.jl
  • docs/src/api.md
  • docs/src/examples/index.md
  • docs/src/index.md
  • docs/src/linearization.md
  • docs/src/performance.md
  • docs/src/references.md
  • docs/src/theory.md
  • docs/src/usage.md
  • src/EBCM/axisymmetric.jl
  • src/EBCM/shmatrix.jl
  • src/EBCM/stabilization.jl
  • src/IITM/arbitrary.jl
  • src/IITM/axisymmetric.jl
  • src/IITM/nfold.jl
  • src/Mie/MieTransitionMatrix.jl
  • src/Mie/bhcoat.jl
  • src/Mie/bhmie.jl
  • src/common/AbstractTransitionMatrix.jl
  • src/common/AxisymmetricTransitionMatrix.jl
  • src/common/RandomOrientationTransitionMatrix.jl
  • src/solvers.jl
  • src/special_functions/wignerd.jl

Comment thread docs/src/usage.md
Comment on lines +41 to +43
The following defines a hexagonal prism (`N = 6` base edges) with base edge
length `a = 1.0`, height `h = 2.0`, and refractive index `m = 1.5 + 0.01im`. The
number of base edges is a type parameter, supplied as the first argument:

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 | ⚡ Quick win

Clarify Prism parameter wording (type parameter vs argument).

This text says N is a type parameter, but the example passes it as a normal constructor argument (Prism(6, ...)). Please reword to avoid API confusion.

Proposed doc fix
-The number of base edges is a type parameter, supplied as the first argument:
+The number of base edges is supplied as the first constructor argument:
📝 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
The following defines a hexagonal prism (`N = 6` base edges) with base edge
length `a = 1.0`, height `h = 2.0`, and refractive index `m = 1.5 + 0.01im`. The
number of base edges is a type parameter, supplied as the first argument:
The following defines a hexagonal prism (`N = 6` base edges) with base edge
length `a = 1.0`, height `h = 2.0`, and refractive index `m = 1.5 + 0.01im`. The
number of base edges is supplied as the first constructor argument:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/usage.md` around lines 41 - 43, The doc text incorrectly calls N a
"type parameter" while the example uses it as a constructor argument; update the
wording to say that N is the number of base edges and is supplied as the first
argument to the Prism constructor (e.g., Prism(6, ...)), clarifying that it is a
runtime/constructor parameter rather than a type parameter and adjust the
sentence that mentions "type parameter" accordingly (reference: Prism and the
symbol N).

Comment thread docs/src/usage.md Outdated
@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.63%. Comparing base (ce84242) to head (1c8653c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #10   +/-   ##
=======================================
  Coverage   95.63%   95.63%           
=======================================
  Files          32       32           
  Lines        4403     4403           
=======================================
  Hits         4211     4211           
  Misses        192      192           
Flag Coverage Δ
julia-1-macos-latest 96.92% <ø> (ø)
julia-1-ubuntu-latest 96.92% <ø> (ø)
julia-1-windows-latest 96.92% <ø> (ø)
julia-1.10-ubuntu-latest 95.56% <ø> (ø)
julia-nightly-ubuntu-latest 96.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Home gains installation/quick-start/navigation/how-to-cite; new Theory &
conventions, Examples overview, Performance, and References pages; API
reorganized into categorized sections; Usage adds Prism, a solver-selection
guide, and runnable post-processing/orientation-averaging examples;
Linearization gains a support table and EBCM example. Document the
AxisymmetricTransitionMatrix type and bump CITATION.bib to v0.5.0.

All runnable examples verified to execute; site builds clean.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/src/theory.md (1)

77-84: ⚡ Quick win

Consider clarifying the orientation distribution convention.

The orientation_average function documentation explicitly notes that "the sin(β) part is already included" in the integration measure, meaning users should provide pₒ(α, β, γ) without the sin(β) factor. Adding this convention to the theory page would help users correctly write custom orientation distributions.

📝 Suggested clarification

Consider adding after line 81:

 integrates numerically against a user-supplied orientation distribution and
-converges to the analytic result. The orientation-averaged **scattering matrix**
+converges to the analytic result. (Note: when passing a custom distribution `pₒ`
+to `orientation_average`, the `sin(β)` Jacobian factor is already included in
+the integration measure.) The orientation-averaged **scattering matrix**
 is expanded in generalised spherical functions with coefficients computed by
 [`expansion_coefficients`](`@ref`).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/theory.md` around lines 77 - 84, Add a short clarification to the
theory text explaining the orientation-distribution convention used by
orientation_average: state that orientation_average expects the user-supplied
distribution pₒ(α, β, γ) WITHOUT the sin(β) factor because the integration
measure already includes sin(β), and mention that this contrasts with the
analytic RandomOrientationTransitionMatrix result (and that
expansion_coefficients uses the same convention), so users should omit sin(β)
when writing custom distributions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/src/theory.md`:
- Around line 77-84: Add a short clarification to the theory text explaining the
orientation-distribution convention used by orientation_average: state that
orientation_average expects the user-supplied distribution pₒ(α, β, γ) WITHOUT
the sin(β) factor because the integration measure already includes sin(β), and
mention that this contrasts with the analytic RandomOrientationTransitionMatrix
result (and that expansion_coefficients uses the same convention), so users
should omit sin(β) when writing custom distributions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fa085dfd-b1c7-4526-8021-5a8916679e38

📥 Commits

Reviewing files that changed from the base of the PR and between 69084de and 1c8653c.

📒 Files selected for processing (12)
  • CITATION.bib
  • README.md
  • docs/make.jl
  • docs/src/api.md
  • docs/src/examples/index.md
  • docs/src/index.md
  • docs/src/linearization.md
  • docs/src/performance.md
  • docs/src/references.md
  • docs/src/theory.md
  • docs/src/usage.md
  • src/common/AxisymmetricTransitionMatrix.jl
✅ Files skipped from review due to trivial changes (9)
  • docs/src/examples/index.md
  • CITATION.bib
  • docs/src/references.md
  • docs/src/api.md
  • README.md
  • src/common/AxisymmetricTransitionMatrix.jl
  • docs/src/linearization.md
  • docs/src/performance.md
  • docs/src/index.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/make.jl
  • docs/src/usage.md

@lucifer1004
lucifer1004 merged commit 2dd434c into main Jun 6, 2026
12 checks passed
@lucifer1004
lucifer1004 deleted the docs branch June 6, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant