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

feat: add scripts to test if there are keys in references.bib with non-ASCII characters #22757

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

acmepjz
Copy link
Collaborator

@acmepjz acmepjz commented Mar 10, 2025

Currently doc-gen4 does not support non-ASCII characters as reference keys in reference.bib. What's worse, it will stops processing that file silently. This leads to various mathlib4 docs reference page errors.

This PR adds scripts to test if there are keys in references.bib with non-ASCII characters. A demonstration is at https://github.com/leanprover-community/mathlib4/actions/runs/13759366997/job/38472088509.


Open in Gitpod

@acmepjz acmepjz added the t-linter Linter label Mar 10, 2025
Copy link

github-actions bot commented Mar 10, 2025

PR summary bed8be186b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@acmepjz acmepjz added the WIP Work in progress label Mar 10, 2025
@acmepjz acmepjz changed the title add scripts to test if there are keys in references.bib with non-ASCII characters feat: add scripts to test if there are keys in references.bib with non-ASCII characters Mar 10, 2025
@acmepjz acmepjz removed the WIP Work in progress label Mar 10, 2025
Copy link
Collaborator

@grunweg grunweg left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd like somebody else to double-check.

@acmepjz
Copy link
Collaborator Author

acmepjz commented Mar 10, 2025

LGTM, but I'd like somebody else to double-check.

It's best if the script can output a diff with non-ASCII characters in key replaced by corresponding ASCII characters. But I haven't figured out how to do it using bibtool. From bibtool documentation seems that there is a macro iso2tex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-linter Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants