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

Refactor for easier updating #285

Merged
merged 59 commits into from
Jan 16, 2025
Merged

Refactor for easier updating #285

merged 59 commits into from
Jan 16, 2025

Conversation

shyamd
Copy link
Owner

@shyamd shyamd commented Jan 11, 2025

This is a major breaking refactor that accomplishes a few things:

  • Encapsulates Citation and CitationBlock to make the process of extracting various types of citations from markdown easier to test and validate
  • Encapsulates Registry into an abstract class with a clearer interface
  • Implements a SimpleRegistry that uses Pybtex for basic citations conversion
  • Implements a PandocRegistry that uses Pandoc and can handle CSL styles
  • Automates detecting inline vs footnote styles in PandocRegistry
  • Cleans up plugin tests into clear integration tests
  • Implements an example that can be used to locally test features with full integration into mkdocs

As part of this there are some breaking changes:

  • Removes cite_inline as this is automatically detected from the CSL file now
  • Removes compatibility with old versions of pandoc<=2.11

shyamd and others added 2 commits January 11, 2025 11:12
Co-authored-by: Jules Bouton <47297745+JPapir@users.noreply.github.com>
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 93.44262% with 16 lines in your changes missing coverage. Please review.

Project coverage is 92.11%. Comparing base (dd0695f) to head (efcb83a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/mkdocs_bibtex/registry.py 90.97% 12 Missing ⚠️
src/mkdocs_bibtex/citation.py 95.83% 2 Missing ⚠️
src/mkdocs_bibtex/plugin.py 96.22% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
- Coverage   94.30%   92.11%   -2.20%     
==========================================
  Files           3        6       +3     
  Lines         246      317      +71     
==========================================
+ Hits          232      292      +60     
- Misses         14       25      +11     

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

@shyamd shyamd changed the title Refactor Refactor for easier updating Jan 16, 2025
@shyamd shyamd merged commit fddf1c2 into main Jan 16, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant