Skip to content

Commit

Permalink
Update check.py (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGreenhill committed Feb 19, 2024
1 parent 00b1200 commit 0afb745
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/phlorest/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ def check(condition, msg):
success &= check(
all(char.get('Concepticon_ID', "") == "" for char in d.characters),
"characters.csv file missing concepticon coding")

# check that we have the same number of entries in ./etc/characters.csv and ./cldf/parameters.csv
if d.characters:
try:
nparams = len(d.cldf_dir.read_csv('parameters.csv', dicts=True))
except FileNotFoundError:
nparams = 0
success &= check(nparams != len(d.characters), "characters.csv does not match parameters.csv")

success &= check((d.dir / 'Makefile').exists(), "has a legacy Makefile")
return success

0 comments on commit 0afb745

Please sign in to comment.