Skip to content

Added support for glossaries / glossaries-extra #12

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 8 commits into
base: main
Choose a base branch
from

Conversation

axtimhaus
Copy link

@axtimhaus axtimhaus commented Nov 19, 2021

Changes

Recently I stumbled about pytask and pytask-latex and found it very useful. Unfortunately I missed support for glossaries in dependency scanning, since I use the package extensively.
I changed the regex and the scan method to recognize \glsxtrresourcefile and \GlsXtrLoadResources and search for .glstex and .bib files with the specified names (.bib is for use with bib2gls).

Todo

  • Reference issues which can be closed due to this PR with "Closes #x".
  • Review whether the documentation needs to be updated.
  • Document PR in docs/changes.rst.

@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #12 (0b12ffb) into main (8090bc2) will increase coverage by 0.26%.
The diff coverage is 100.00%.

❗ Current head 0b12ffb differs from pull request most recent head b6f5aed. Consider uploading reports for the commit b6f5aed to get more accurate results

@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   96.86%   97.13%   +0.26%     
==========================================
  Files           6        6              
  Lines         255      279      +24     
==========================================
+ Hits          247      271      +24     
  Misses          8        8              
Flag Coverage Δ
end_to_end 95.69% <100.00%> (+0.40%) ⬆️
unit 35.12% <25.00%> (-0.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/test_regex.py 100.00% <ø> (ø)
src/latex_dependency_scanner/scanner.py 93.75% <100.00%> (+0.20%) ⬆️
tests/test_scan.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8090bc2...b6f5aed. Read the comment docs.

@tobiasraabe
Copy link
Member

Hi @axtimhaus, this is a wonderful PR! Thanks for the effort you put in writing the code and especially the test cases. I really appreciate it.

Is this PR already complete? I am not experienced with the two Latex packages that is why I am asking. If it is, I would just add some final touches, we would merge it and release a new version, so you can use it asap.

@axtimhaus
Copy link
Author

Unfortunately in pytask-latex you are using latexmk, which seems to not support bib2gls. So currently I have problems within the compilation chain, but I'm working on it.
For now, I don't know if it is more senseful to add the .glstex or the .bib as dependency or both, and which if both are present.

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