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

Add sphinxbibtex and function to get references from methods #651

Merged
merged 5 commits into from
Feb 24, 2025

Conversation

rohanbabbar04
Copy link
Collaborator

Closes #640

  • Add sphinxcontrib.bibtex to handle references.
  • Add function to generate citations.

Description

Checklist

  • Code style is correct (follows ruff and black guidelines)
  • Includes new or updated tests to cover the new feature
  • New features are properly documented (with an example if appropriate)

Add function to generate citations.
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2025

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes missing coverage. Please review.

Project coverage is 74.32%. Comparing base (f25da81) to head (9688003).
Report is 108 commits behind head on main.

Files with missing lines Patch % Lines
preliz/internal/citations.py 88.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
- Coverage   82.23%   74.32%   -7.92%     
==========================================
  Files         101      107       +6     
  Lines        8020     8805     +785     
==========================================
- Hits         6595     6544      -51     
- Misses       1425     2261     +836     

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

@rohanbabbar04
Copy link
Collaborator Author

This DOI in mle looks broken.

@aloctavodia
Copy link
Contributor

This is the correct one https://doi.org/10.1177/0049124104268644

pass


def citations(methods=None, show_as="bibtex"):
Copy link
Contributor

Choose a reason for hiding this comment

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

This should also work outside a notebook environment

Copy link
Collaborator Author

@rohanbabbar04 rohanbabbar04 Feb 24, 2025

Choose a reason for hiding this comment

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

In that case, will it return a string of the references?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, we should also have an option to write to a file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added an option to write to a file, if no file path is provided we can just return the string

@aloctavodia aloctavodia merged commit 1e15418 into arviz-devs:main Feb 24, 2025
4 checks passed
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.

How to cite function and page
3 participants