Skip to content

Add references with sphinxcontrib-bibtex #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add references with sphinxcontrib-bibtex #394

wants to merge 3 commits into from

Conversation

pwhofman
Copy link
Collaborator

@pwhofman pwhofman commented Jun 2, 2025

Added references based on one central BibTeX file.
I added a reference in a docstring, made an example page to show what citations would look like in the docs and added an alternative bibliography page based on BibTeX.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for centralized BibTeX references via sphinxcontrib-bibtex, updates docstrings and docs to use citation roles, and provides both an example page and an alternative bibliography page.

  • Introduce sphinxcontrib-bibtex dependency and configure it in Sphinx
  • Replace manual footnote reference in si_graph_plot docstring with a :footcite: role
  • Add example page, BibTeX file, and alternative bibliography RST page; update TOC

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shapiq/plot/si_graph.py Switched manual reference markup to :footcite: and added footbibliography
pyproject.toml Added sphinxcontrib-bibtex to documentation dependencies
docs/source/references_alternative.rst Created a standalone alternative bibliography page
docs/source/references.bib Added central BibTeX file with conference entry
docs/source/index.rst Included example and references_alternative in Table of Contents
docs/source/example.md Provided a Markdown example using a citation role
docs/source/conf.py Configured sphinxcontrib.bibtex and default BibTeX settings
Comments suppressed due to low confidence (1)

shapiq/plot/si_graph.py:64

  • The citation role has an extra 't' in :footcite:t:. It should be :footcite:muschalikShapleyInteractions2024`` to match the sphinxcontrib-bibtex syntax.
:footcite:t:`muschalikShapleyInteractions2024`.

@@ -0,0 +1,3 @@
# Example
`shapiq` is a Library for computing Shapley Interactions and Shapley Values
for Machine Learning {cite:p}`muschalikShapleyInteractions2024`.
Copy link
Preview

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

[nitpick] CommonMark does not parse Sphinx roles out of the box, so this citation won’t render. Consider switching this example to reStructuredText or adding the myst-parser extension to enable role support in Markdown.

Copilot uses AI. Check for mistakes.

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.

2 participants