From c13d699f63576539f989017d9b072b786bf514d9 Mon Sep 17 00:00:00 2001 From: Denis_Drobyshev Date: Sun, 20 Sep 2026 18:41:21 +0300 Subject: [PATCH] Say that the course is in both languages, and check the count that says so Both cards described lemma as Russian. That stopped being true when the English build was finished -- twenty-seven modules in each language, behind the same notebooks -- and the card is where a reader decides whether the course is for them. lemma's own CITATION.cff, .zenodo.json and README said the same thing and are corrected; the organisation profile said it too and is corrected. The count beside it was unchecked. Both cards state 27 in digits and the profile states twenty-seven in words, twice, and nothing tied any of the four to the course. This is the shape the page has already been caught in: decisionrl's counts were corrected everywhere the digits appeared and survived in the profile, spelled out. The source is lemma's CITATION.cff, which lemma's own scripts/check_counts.py now holds to docs/modules/ on every push. So this is not a second opinion about how many modules there are -- it is the same count, followed one repository further out. Digits on the cards, words in the profile, and a missing count reported rather than passed. WORDS had no entry between twenty-five and twenty-nine, so the first run reported lemma as unchecked instead of claiming it was fine -- which is the behaviour the file asks for, and the reason the gap was visible at all. Added twenty-six through twenty-eight. Checked by breaking a copy: cards moved to 28 -- both reported; the count removed from the cards altogether -- both reported. --- index.html | 2 +- ru/index.html | 2 +- scripts/check_figures.py | 53 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 37e699c..a186d14 100644 --- a/index.html +++ b/index.html @@ -496,7 +496,7 @@

research
-

Бесплатный курс·27 модулей·русский

+

Бесплатный курс·27 модулей·русский·английский

lemma — дорога в ML, DL и RL

От арифметики среднего до воспроизведения свежей статьи. Без регистрации и без «первый diff --git a/scripts/check_figures.py b/scripts/check_figures.py index 48da015..33b974b 100644 --- a/scripts/check_figures.py +++ b/scripts/check_figures.py @@ -16,6 +16,10 @@ on this site and in the organisation profile, which spells the same figures out in words and so escaped every check that looked for digits + lemma's modules lemma's CITATION.cff, which lemma's own + check_counts.py holds to docs/modules/ -- checked + on both cards here (in digits) and in the profile + (in words, twice) required dependencies glia's pyproject.toml, read directly line coverage Codecov, the run that produced it @@ -55,6 +59,7 @@ PROFILE = f"{RAW}/.github/master/profile/README.md" WORDS = { 22: "twenty-two", 23: "twenty-three", 24: "twenty-four", 25: "twenty-five", + 26: "twenty-six", 27: "twenty-seven", 28: "twenty-eight", 29: "twenty-nine", 30: "thirty", 31: "thirty-one", 32: "thirty-two", 33: "thirty-three", 34: "thirty-four", 35: "thirty-five", } @@ -87,6 +92,22 @@ def source_counts() -> tuple[int, int, int] | None: return tuple(int(g) for g in match.groups()) if match else None +def source_lemma_modules() -> int | None: + """How many modules lemma actually has. + + Read from lemma's CITATION.cff, which lemma's own scripts/check_counts.py + holds to docs/modules/ on every push. So this is not a second opinion about + the count -- it is the same count, followed one repository further out. + """ + citation = fetch(f"{RAW}/lemma/main/CITATION.cff") + if citation is None: + return None + match = re.search(r"([a-z]+(?:-[a-z]+)?) modules in [a-z]+ parts", citation.lower()) + if match is None: + return None + return next((value for value, word in WORDS.items() if word == match.group(1)), None) + + def source_glia_dependencies() -> int | None: pyproject = fetch(f"{RAW}/glia/master/pyproject.toml") if pyproject is None: @@ -146,6 +167,23 @@ def main(root: Path) -> int: f"but decisionrl ships {applied}" ) + modules = source_lemma_modules() + if modules is None: + unchecked.append("lemma's modules — its CITATION.cff could not be read, or spells a " + "count this script has no word for") + else: + for name in PAGES: + page = (root / name).read_text(encoding="utf-8") + # Цифрами на карточке курса: "27 modules" / "27 модулей". + quoted = re.findall(r"(\d+) (?:modules|модул\w+)", page) + if not quoted: + problems.append(f"{name}: no longer states how many modules lemma has") + for value in quoted: + if int(value) != modules: + problems.append( + f"{name}: says {value} modules, lemma has {modules}" + ) + dependencies = source_glia_dependencies() if dependencies is None: unchecked.append("required dependencies — glia's pyproject.toml could not be read") @@ -190,6 +228,21 @@ def main(root: Path) -> int: f"decisionrl ships {word} ({value})" ) + if modules is not None: + profile = fetch(PROFILE) + if profile is None: + unchecked.append("the organisation profile could not be read for lemma's count") + else: + word = WORDS[modules] + stated = re.findall(r"([a-z]+(?:-[a-z]+)?) modules", profile.lower()) + if not stated: + problems.append("organisation profile: no longer states a count of modules") + for said in stated: + if said != word: + problems.append( + f"organisation profile: says {said} modules, lemma has {word} ({modules})" + ) + unchecked.append( "praxis on real models — the offline column of its quality table is pinned by a " "test; recall@5 0.92 and MRR 0.94 need a GPU CI does not have"