Skip to content

Add algorithm-level citations for spherical geometry implementations - #1635

Merged
erogluorhan merged 37 commits into
UXARRAY:mainfrom
hongyuchen1030:issue-1631-algorithm-citations
Aug 12, 2026
Merged

Add algorithm-level citations for spherical geometry implementations#1635
erogluorhan merged 37 commits into
UXARRAY:mainfrom
hongyuchen1030:issue-1631-algorithm-citations

Conversation

@hongyuchen1030

@hongyuchen1030 hongyuchen1030 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Closes #1631

Overview

  • Add docs/references.bib with full BibTeX entries for the two Chen et al. UXarray papers (GMD 2026, SIAM J. Sci. Comput. 2026) plus the supporting numerical-methods references (Shewchuk 1997, Knuth 1997, Dekker 1971, Higham 2002, Jeannerod et al. 2013, Rump 2023)
  • Extend docs/citation.rst with an "Algorithm-Level Citations" section: the general node/edge/face statement, human-readable citations for both papers, and the full algorithm-to-publication mapping table from the issue, alongside the existing package-level Zenodo citation
  • Add References sections to the docstrings of the specific APIs listed in the issue's mapping table:
    • Grid.bounds, Grid.face_bounds_lon, Grid.face_bounds_lat
    • UxDataArray.zonal_mean (with zonal_average/zonal_anomaly cross-referencing it)
    • grid.intersections.gca_gca_intersection, gca_const_lat_intersection, get_number_of_intersections
    • grid.arcs.extreme_gca_latitude, orient3d_on_sphere, on_minor_arc
    • utils.computing.two_sum, two_prod, diff_of_products, accucross, accucross_pair, acc_sqrt_re
  • grid.arcs.in_between and point_within_gca intentionally left uncited per the issue (pending removal in a future release)

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking
N/A — documentation/docstring-only change, no functional or performance impact. Full test suite (815 passed, 1 pre-existing skip) and pre-commit hooks pass locally.

Documentation

  • Docstrings have been added to all new functions (N/A — no new functions; existing docstrings extended)
  • Docstrings have been updated with any function changes
  • User (public) functions have been added to docs/api.rst (N/A — no new public API surface)
  • Internal (private) function names start with an underscore (_)

Examples
N/A — no notebook examples affected.

hongyuchen1030 and others added 26 commits October 25, 2023 16:32
This reverts commit 1ba6880.
Adds a docs/references.bib with full BibTeX entries for the two Chen et
al. UXarray papers plus the supporting numerical-methods references
(Shewchuk, Knuth, Dekker, Higham, Jeannerod et al., Rump), extends
citation.rst with an algorithm-to-publication mapping table alongside
the existing Zenodo citation, and adds References sections to the
docstrings of the specific APIs called out in the mapping: Grid.bounds
and face_bounds_lon/lat, zonal_mean, the intersection APIs, the arcs
predicates, and the compensated-arithmetic primitives in utils/computing.py.

Resolves UXARRAY#1631

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Demote "Algorithm-Level Citations" from a page-title-weight heading to
  a proper second-level section, and wrap the call-to-action intro in a
  note admonition instead of plain body text.
- Replace short in-text citations ("Chen et al. (2026), GMD") in the
  mapping table with the full citation (title, journal, DOI) so readers
  don't have to cross-reference elsewhere to know what they're citing.
- Drop the single hand-maintained docs/references.bib (and its now-dead
  link to a file that doesn't exist on main yet) in favor of one small
  .bib file per publication under docs/_static/citations/, downloadable
  directly from next to each citation via Sphinx's :download: role.
- Fix "Documentation section" links: every row pointed at api.html#remapping
  regardless of section; now each points at its real anchor (descriptors,
  zonal-average, intersections, arcs, compensated-arithmetic), verified
  against the built HTML.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the generic "please also cite the corresponding publication(s)"
note with more precise guidance on when citation is expected: results
reported in an academic work that depend on one of these algorithms
(e.g. computed face areas or regridding weights used as analysis
input), as opposed to incidental use in tutorials/internal tools/other
software that merely depends on UXarray.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace em dash punctuation with parentheses (no em dashes unless
explicitly requested), swap the citation-trigger examples for concrete
UXarray operations (latlon bounds, zonal-mean, conservative remapping,
computed face area), and correct "intersection and remapping
algorithms" to "intersection and geometry operators" in the SIAM
paper's intro sentence.
Merge table rows that share the same documentation section and required
citation (Descriptors bounds/face_bounds_lon/face_bounds_lat; Arcs
orient3d_on_sphere/on_minor_arc; Arcs in_between/point_within_gca;
Compensated Arithmetic accucross/accucross_pair) into single rows
listing each API on its own line, instead of repeating the citation
per row. Also reorder the Arcs rows to match the order APIs actually
appear in api.rst (in_between, point_within_gca, extreme_gca_latitude,
orient3d_on_sphere, on_minor_arc); the other sections already matched.
Independent citation audit against the DOI landing page found the
published title uses the multiplication sign (2 × 2), not the letter
x, in citation.rst, the jeannerod2013.bib entry, and the
diff_of_products docstring. The .bib uses the LaTeX $\times$ form for
portability across BibTeX toolchains; the RST/docstring prose uses the
Unicode × character directly.
@hongyuchen1030
hongyuchen1030 marked this pull request as ready for review August 2, 2026 19:40

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this looks great; please address only one comment below:

Comment thread docs/citation.rst Outdated
Per review feedback, move everything from the Algorithm-Level Citations
heading onward out of citation.rst into a new docs/citations-for-algorithms.rst
page, added to the "For users" toctree in index.rst. citation.rst now
ends with a brief note pointing readers to the new page, keeping the
main "How to Cite UXarray" page focused on the Zenodo software citation.

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost there, the newer links, pages, display clean! Just a final iteration hopefully. See comments below

Comment thread docs/index.rst Outdated
Comment thread docs/citation.rst Outdated
hongyuchen1030 and others added 5 commits August 3, 2026 15:15
- Remove the toctree entry for citations-for-algorithms from index.rst;
  a hidden toctree in citation.rst still surfaced it as a nested sidebar
  item under "Cite UXarray" (sphinx_book_theme includes hidden toctrees
  in the nav structure, it only suppresses the inline body listing).
  Mark citations-for-algorithms.rst :orphan: instead so it's reachable
  only via the :doc: link, with no separate nav entry at all.
- Switch the pointer in citation.rst from a plain .. note:: to
  .. admonition:: Algorithm-Level Citations so the block shows that
  title instead of the generic "Note".
…g it

Per team discussion on the PR, settle on:

  - Cite UXarray
     - Algorithm-Level Citations

Remove :orphan: from citations-for-algorithms.rst and add it to a
hidden toctree inside citation.rst instead. This makes it a real part
of the doc tree (proper Previous/Next navigation, no orphan-suppression
needed, participates in the sitemap like any other page) while keeping
exactly one top-level "Cite..." entry in the sidebar, sphinx_book_theme
renders the hidden child toctree as a collapsed sub-item under
"Cite UXarray" rather than a second sibling entry.
@Sevans711

Copy link
Copy Markdown
Collaborator

Flagging to consider #1631 (comment) before this merges, even if the decision ends up being to look into it later / with a different issue or PR.

@hongyuchen1030

Copy link
Copy Markdown
Contributor Author

Flagging to consider #1631 (comment) before this merges, even if the decision ends up being to look into it later / with a different issue or PR.

Thanks for the info, please see my reply in #1631, and the summary is the discussion should be put int a future PR and the current form in this PR is what we intend to do at current point.

@Sevans711 Sevans711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for working to add these citations into UXarray and make it easier to give proper credit to the corresponding papers! I took a close look at this PR, I think it is almost ready to merge to main. I left a few inline comments with suggested changes. The biggest one is just some minor phrasing changes to better reflect when it is required to use these citations, as per the discussion in #1631.

I checked to confirm the following logistical details all look correct:

  • All links on the new Algorithm-Level Citations work properly. I clicked them all, and double-checked that the pages they opened seemed correct.
  • All new .bib files are actually used (nothing extra was added by accident).
  • Citations which were added to docstrings in the code all correspond to the correct citation(s), i.e. the same one(s) as in the table.

Comment thread docs/citations-for-algorithms.rst Outdated
Comment thread docs/citations-for-algorithms.rst Outdated
Comment thread docs/citations-for-algorithms.rst Outdated
…cope

- Zonal Average row now links to zonal_mean instead of zonal_average,
  since the latter is just a thin alias ("prefer zonal_mean for
  primary API").
- Remove the .. note:: wrapper around the intro paragraph; it's the
  first thing on the page already, so the box added nothing.
- Reword the scope of when citation is expected. Per discussion in the
  original issue thread, this isn't "if your work uses one of these
  algorithms" (any output like a computed face area counts as "using"
  it) but specifically "if your work depends on the algorithm's
  details" (describing it, comparing it to alternatives, etc.). Drop
  the old API-usage examples (latlon bounds, zonal-mean, ...) since
  they no longer fit the corrected framing.
@hongyuchen1030

Copy link
Copy Markdown
Contributor Author

Thank you for working to add these citations into UXarray and make it easier to give proper credit to the corresponding papers! I took a close look at this PR, I think it is almost ready to merge to main. I left a few inline comments with suggested changes. The biggest one is just some minor phrasing changes to better reflect when it is required to use these citations, as per the discussion in #1631.

I checked to confirm the following logistical details all look correct:

  • All links on the new Algorithm-Level Citations work properly. I clicked them all, and double-checked that the pages they opened seemed correct.
  • All new .bib files are actually used (nothing extra was added by accident).
  • Citations which were added to docstrings in the code all correspond to the correct citation(s), i.e. the same one(s) as in the table.

@Sevans711

Thanks for your information and I have addressed your comments in the latest commits.

@Sevans711 Sevans711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you @hongyuchen1030 for those changes, it all looks good to me now and I think it is ready to merge to main!

@hongyuchen1030

Copy link
Copy Markdown
Contributor Author

@erogluorhan Can you please give this PR a review when you're available so we can merge it this week? Thanks

@Sevans711 Sevans711 added documentation Improvements or additions to documentation new feature New feature or request labels Aug 11, 2026

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great; thanks for all the iterations!

@erogluorhan
erogluorhan merged commit e252dd2 into UXARRAY:main Aug 12, 2026
22 of 23 checks passed
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 new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add algorithm-level citations for spherical geometry implementations

4 participants