Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
ci(.github/workflows): lint for formatting issues in references.bib (#…
Browse files Browse the repository at this point in the history
…16614)




Co-authored-by: Bryan Gin-ge Chen <[email protected]>
  • Loading branch information
Ruben-VandeVelde and bryangingechen committed Feb 17, 2023
1 parent 1df9a17 commit 973ed77
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 40 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install bibtool
if: ${{ 'bors' == 'ubuntu-latest' }}
run: sudo apt install -y bibtool

- name: install Python
if: ${{ 'bors' == 'ubuntu-latest' }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: lint
- name: lint style
run: |
./scripts/lint-style.sh
- name: lint references.bib
run: |
./scripts/lint-bib.sh
build:
if: github.repository == 'leanprover-community/mathlib'
name: Build mathlib
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install bibtool
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }}
run: sudo apt install -y bibtool

- name: install Python
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: lint
- name: lint style
run: |
./scripts/lint-style.sh
- name: lint references.bib
run: |
./scripts/lint-bib.sh
build:
if: github.repository == 'leanprover-community/mathlib'
name: Build mathlib
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install bibtool
if: ${{ 'STYLE_LINT_RUNNER' == 'ubuntu-latest' }}
run: sudo apt install -y bibtool

- name: install Python
if: ${{ 'STYLE_LINT_RUNNER' == 'ubuntu-latest' }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: lint
- name: lint style
run: |
./scripts/lint-style.sh

- name: lint references.bib
run: |
./scripts/lint-bib.sh

build:
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib'
name: Build mathlibJOB_NAME
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,24 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install bibtool
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }}
run: sudo apt install -y bibtool

- name: install Python
if: ${{ 'ubuntu-latest' == 'ubuntu-latest' }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: lint
- name: lint style
run: |
./scripts/lint-style.sh
- name: lint references.bib
run: |
./scripts/lint-bib.sh
build:
if: github.repository != 'leanprover-community/mathlib'
name: Build mathlib (fork)
Expand Down
76 changes: 40 additions & 36 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ @Article{ birkhoff1942

@Book{ bollobas1986,
author = {Bollob\'{a}s, B\'{e}la},
title = {Combinatorics: Set Systems, Hypergraphs, Families of Vectors, and Combinatorial
Probability},
title = {Combinatorics: Set Systems, Hypergraphs, Families of
Vectors, and Combinatorial Probability},
year = {1986},
isbn = {0521330599},
publisher = {Cambridge University Press}
Expand Down Expand Up @@ -477,6 +477,23 @@ @InProceedings{ carneiro2019
bibsource = {dblp computer science bibliography, https://dblp.org}
}

@Article{ cassels1950,
author = {Cassels, J. W. S.},
title = {Some metrical theorems in {D}iophantine approximation.
{I}},
journal = {Proc. Cambridge Philos. Soc.},
fjournal = {Proceedings of the Cambridge Philosophical Society},
volume = {46},
year = {1950},
pages = {209--218},
issn = {0008-1981},
mrclass = {10.0X},
mrnumber = {36787},
mrreviewer = {P. Erd\H{o}s},
doi = {10.1017/s0305004100025676},
url = {https://doi.org/10.1017/s0305004100025676}
}

@Book{ cassels1967algebraic,
title = {Algebraic number theory},
author = {Cassels, John William Scott and Fr{\"o}hlich, Albrecht},
Expand All @@ -492,22 +509,6 @@ @Book{ cassels1967algebraic
mrclass = {00.04 (10.00)}
}

@Article{ cassels1950,
author = {Cassels, J. W. S.},
title = {Some metrical theorems in {D}iophantine approximation. {I}},
journal = {Proc. Cambridge Philos. Soc.},
fjournal = {Proceedings of the Cambridge Philosophical Society},
volume = {46},
year = {1950},
pages = {209--218},
issn = {0008-1981},
mrclass = {10.0X},
mrnumber = {36787},
mrreviewer = {P. Erd\H{o}s},
doi = {10.1017/s0305004100025676},
url = {https://doi.org/10.1017/s0305004100025676},
}

@InProceedings{ Chou1994,
author = {Chou, Ching-Tsun},
booktitle = {Higher Order Logic Theorem Proving and Its Applications},
Expand Down Expand Up @@ -921,7 +922,7 @@ @Article{ Gallagher1961
mrnumber = {133297},
mrreviewer = {J. W. S. Cassels},
doi = {10.2969/jmsj/01340342},
url = {https://doi.org/10.2969/jmsj/01340342},
url = {https://doi.org/10.2969/jmsj/01340342}
}

@InProceedings{ Gallier2011Notes,
Expand Down Expand Up @@ -1388,7 +1389,7 @@ @Article{ kleitman1966
zbl = {0141.00801}
}

@Article{ KoukoulopoulosMaynard2020,
@Article{ KoukoulopoulosMaynard2020,
author = {Koukoulopoulos, Dimitris and Maynard, James},
title = {On the {D}uffin-{S}chaeffer conjecture},
journal = {Ann. of Math. (2)},
Expand All @@ -1402,23 +1403,26 @@ @Article{ KoukoulopoulosMaynard2020
mrnumber = {4125453},
mrreviewer = {Sam Chow},
doi = {10.4007/annals.2020.192.1.5},
url = {https://doi.org/10.4007/annals.2020.192.1.5},
url = {https://doi.org/10.4007/annals.2020.192.1.5}
}

@Article{ kozen1994,
title = {A Completeness Theorem for Kleene Algebras and the Algebra of Regular Events},
journal = {Information and Computation},
volume = {110},
number = {2},
pages = {366-390},
year = {1994},
issn = {0890-5401},
doi = {https://doi.org/10.1006/inco.1994.1037},
url = {https://www.sciencedirect.com/science/article/pii/S0890540184710376},
author = {D. Kozen},
abstract = {We give a finitary axiomatization of the algebra of regular events involving only
equations and equational implications. Unlike Salomaa′s axiomatizations, the
axiomatization given here is sound for all interpretations over Kleene algebras.}
@Article{ kozen1994,
title = {A Completeness Theorem for Kleene Algebras and the Algebra
of Regular Events},
journal = {Information and Computation},
volume = {110},
number = {2},
pages = {366-390},
year = {1994},
issn = {0890-5401},
doi = {https://doi.org/10.1006/inco.1994.1037},
url = {https://www.sciencedirect.com/science/article/pii/S0890540184710376},
author = {D. Kozen},
abstract = {We give a finitary axiomatization of the algebra of
regular events involving only equations and equational
implications. Unlike Salomaa′s axiomatizations, the
axiomatization given here is sound for all interpretations
over Kleene algebras.}
}

@Article{ lazarus1973,
Expand Down Expand Up @@ -1884,7 +1888,7 @@ @Article{ salwinski2018
issn = {0746-8342},
mrclass = {26A06 (00A05)},
mrnumber = {3766700},
doi = {10.1080/07468342.2018.1419703},
doi = {10.1080/07468342.2018.1419703}
}

@Book{ samuel1967,
Expand Down
8 changes: 8 additions & 0 deletions scripts/lint-bib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -exo pipefail
# https://leanprover-community.github.io/contribute/doc.html#citing-other-works
cp docs/references.bib docs/references.bib.old
bibtool --preserve.key.case=on --preserve.keys=on --pass.comments=on --print.use.tab=off -s \
-i docs/references.bib -o docs/references.bib
diff -U8 docs/references.bib.old docs/references.bib

0 comments on commit 973ed77

Please sign in to comment.