Skip to content
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

Propagate code citations into user manual #1575

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

sethrj
Copy link
Member

@sethrj sethrj commented Jan 13, 2025

This (re)defines doxygen commands \cite, \citet, and \citep for adding citations as a combination of Zotero keys and DOI URLs (or just other URLs). The procedure to add references is:

  1. Add the reference to the appropriate subdirectory of the Zotero Celeritas References subgroup. (Contact @tmdelellis if you are not a member of the group.) If you have a DOI there's a handy magic wand icon "Add items by identifier".
  2. In the Extra field, add a special line Citation key: author-keyword-year to set up a stable BibTeX citation key. (see https://github.com/retorquere/zotero-better-bibtex for how this works).
  3. For now ask Seth to update the zotero .bib file that lives at https://github.com/celeritas-project/celeritas/tree/doc/gh-pages-base . TODO: this is necessary before the pull request passes! I should add a github action to update the bibliography file.
  4. Subsequent Github action builds should pull in the new bib file for generating documentation. For your local build you may have to remove the source/doc/_static/zotero.bib so that CMake will re-download it.

@sethrj sethrj added the documentation Documentation, examples, tests, and CI label Jan 13, 2025
Copy link

Test summary

 1 924 files   3 039 suites   1m 9s ⏱️
 1 343 tests  1 308 ✅ 35 💤 0 ❌
10 261 runs  10 233 ✅ 28 💤 0 ❌

Results for commit f6e2e0a.

@sethrj sethrj marked this pull request as draft January 14, 2025 12:34
@@ -28,7 +28,14 @@ semi-automatically into this user manual via the Breathe tool integrated
into the Celeritas build system (see :ref:`dependencies`). High-level classes
should describe the functionality of the class in a way understandable to both
power users and developers, and such classes should be included in the
:ref:`api` section.
:ref:`api` section. Citations to the Celeritas Zotero database can be
referenced inline code using the special ``\citep{whatever-2025,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include the instructions on how to add references to the zotero group and update the bib file?

Suggested change
referenced inline code using the special ``\citep{whatever-2025,
referenced inline code using the special ``\citep{author-keyword-year,

Copy link
Member Author

Choose a reason for hiding this comment

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

Absolutely; and it turns out I neglected to push that commit 🙃

Comment on lines +53 to +54
* Rutherford cross sections was developed in \citet{lijian-mott-1995,
* https://doi.org/10.1016/0969-806X(94)00063-8}. Using the same procedure as
Copy link
Contributor

Choose a reason for hiding this comment

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

Are most of these not in the bib file yet? I get some warnings about bibtex keys not found.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this is blocked on some changes in the main docs that I put into #1562 from which this PR was split out.

@@ -14,6 +14,5 @@ References

.. _sphinxbib: https://pypi.org/project/sphinxcontrib-bibtex/

.. bibliography:: ../_static/references.bib
:all:
Copy link
Contributor

Choose a reason for hiding this comment

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

Now I'm only seeing a single entry in the references (the PRM), I guess because it's the only one that's currently both in the bib file and being cited? Will we need to go through and update the other citations in the docs if we want them to appear here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, or we could manually use the :cite:empty: directive to force inclusion of some.

What I'd like to do is export a bibliography set if and only if the zotero entries have a "citation key": i.e., we want to cite it in a work. And then to automate that export process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation, examples, tests, and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants