Skip to content

Commit 8660446

Browse files
committed
Add check to CI to make sure that changes to auto-generated files are committed
Also remove the unconventional image caching behaviour from team.ini because the URL is only accessed once.
1 parent 1677d08 commit 8660446

File tree

3 files changed

+28
-30
lines changed

3 files changed

+28
-30
lines changed

.github/workflows/core.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,22 @@ jobs:
392392
if: success() || steps.upload_docs.conclusion == 'success'
393393
run: echo "conclusion=success" >> "$GITHUB_OUTPUT"
394394

395+
# Some files are automatically generated when we install or build the
396+
# docs (e.g. CITATION.rst). These files are committed to the repository
397+
# so uncommitted changes at this point reflect changes in the automatically
398+
# generated files that ought to be committed.
399+
- name: Check no untracked files
400+
run: |
401+
cd firedrake-repo
402+
if [ -z "$( git status --porcelain )" ]; then
403+
exit 0
404+
else
405+
echo Error: there are untracked files in the repository
406+
echo The output from 'git status' is:
407+
git status
408+
exit 1
409+
fi
410+
395411
- name: Post-run cleanup
396412
if: always()
397413
run: find . -delete

docs/source/team.ini

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,28 @@ Applied Physics Laboratory: https://www.apl.washington.edu/
3232

3333
[active-team]
3434
# Use format
35-
# name : personal-webpage, image-link
35+
# name : personal-webpage
36+
# Note that if you add your name here you should also add a picture of yourself
37+
# in /docs/source/images.
3638
David A. Ham: https://www.imperial.ac.uk/people/david.ham
3739
Paul H. J. Kelly: https://www.imperial.ac.uk/people/p.kelly
38-
Lawrence Mitchell: https://www.wence.uk/
3940
Colin J. Cotter: https://www.imperial.ac.uk/people/colin.cotter
4041
Robert C. Kirby: https://www.baylor.edu/math/index.php?id=90540
4142
Koki Sagiyama: https://www.imperial.ac.uk/people/k.sagiyama
42-
Nacime Bouziani: https://www.imperial.ac.uk/people/n.bouziani18
43-
Thomas J. Gregory: https://www.imperial.ac.uk/people/t.gregory18
44-
Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge, https://avatars.githubusercontent.com/u/43041811
43+
Jack Betteridge: https://www.imperial.ac.uk/people/j.betteridge
4544
Daniel R. Shapero: https://psc.apl.uw.edu/people/investigators/daniel-shapero/
46-
Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10
4745
Connor J. Ward: https://www.imperial.ac.uk/people/c.ward20
48-
Patrick E. Farrell: https://pefarrell.org, https://pefarrell.org/images/profile.jpg
49-
Pablo D. Brubeck: https://www.maths.ox.ac.uk/people/pablo.brubeckmartinez, https://avatars.githubusercontent.com/u/6486130
50-
India Marsden: https://www.maths.ox.ac.uk/people/india.marsden, https://pefarrell.org/images/marsden.jpg
51-
Daiane I. Dolci: https://www.imperial.ac.uk/people/d.dolci, https://avatars.githubusercontent.com/u/63597005?v=4
46+
Patrick E. Farrell: https://pefarrell.org
47+
Pablo D. Brubeck: https://www.maths.ox.ac.uk/people/pablo.brubeckmartinez
48+
India Marsden: https://www.maths.ox.ac.uk/people/india.marsden
49+
Daiane I. Dolci: https://www.imperial.ac.uk/people/d.dolci
5250
Joshua Hope-Collins: https://www.imperial.ac.uk/people/joshua.hope-collins13
53-
Umberto Zerbinati: https://www.uzerbinati.eu, https://www.uzerbinati.eu/assets/logo.jpeg
51+
Umberto Zerbinati: https://www.uzerbinati.eu
5452

5553
[inactive-team]
54+
Lawrence Mitchell: https://www.wence.uk/
55+
Reuben W. Nixon-Hill: https://www.imperial.ac.uk/people/reuben.nixon-hill10
56+
Nacime Bouziani: https://www.imperial.ac.uk/people/n.bouziani18
5657
Sophia Vorderwuelbecke: https://www.imperial.ac.uk/people/s.vorderwuelbecke18
5758
Thomas H. Gibson:
5859
Miklós Homolya:

docs/source/team2.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,11 @@ def rows(self):
3939
return range(self.nrows)
4040

4141

42-
def cache_web_image(name, url):
43-
img_name = "".join(name.split()).lower().encode("punycode").decode()
44-
img_name = img_name[:-1] if img_name[-1] == "-" else img_name
45-
with urlopen(url) as response:
46-
filetype = response.getheader("Content-Type")
47-
ext = filetype.split("/")[1]
48-
if ext == "jpeg":
49-
ext = "jpg"
50-
with open("images/" + img_name + "." + ext, "wb") as fh:
51-
fh.write(response.read())
52-
53-
5442
# Read the current team information from configuration file
5543
team = ConfigParser(interpolation=ExtendedInterpolation())
5644
team.optionxform = lambda x: x
5745
team.read("team.ini")
5846

59-
# Grab images from provided URLs and cahce them (if necessary)
60-
for name, links in team["active-team"].items():
61-
parts = links.split(",")
62-
if parts[1:]:
63-
website = parts[1]
64-
cache_web_image(name, website)
65-
6647
# Environment for applying templates
6748
env = Environment(
6849
loader=FileSystemLoader("."),

0 commit comments

Comments
 (0)