You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an artifact-type suffix to standardized filenames (#1404)
Standardized artifact filenames gain a trailing type segment for the two
types whose file is ambiguous once downloaded: a talk's exported slides
and a poster generate the same Author_TitleInTitleCase_VenueYear name as
the paper itself. Talks now end in "_Talk", posters in "_Poster";
publications and grants stay unsuffixed (a bare paper PDF is the default
expectation, and that name is also the .bib download name).
Trailing rather than the existing mid-name suffix slot, so everything
before it stays byte-identical to the old scheme and the "-<timestamp>"
uniquifier still appends cleanly. The label comes from a class attribute
(FILENAME_TYPE_SUFFIX), not from data -- Poster has no type field and
Talk.talk_type is nullable and editor-editable, so deriving it would
rename files on a metadata-only edit.
Applied retroactively via restandardize_artifact_filenames, which is
already an idempotent every-container-start step. It ships here with
--dry-run so the scope is reviewable in the logs before any file moves.
The load-bearing subtlety is ordering: backfill_original_filenames runs
BEFORE that step, and its "already standardized?" guard is what stops it
recording a renamed file's current name as its "Originally uploaded as"
provenance. The moment the scheme changed, every already-renamed talk and
poster would have failed that guard and had its old standardized name
written in as a fake original -- so the guard now accepts both schemes.
Also extracts the uniquifier-tolerant name comparison that three commands
had each copy-pasted into one tested helper (matches_standardized_basename),
and teaches repair_diverged_artifact_filenames to look for orphans under
the pre-#1404 base too (that bug predates the scheme change).
Known and accepted: /media/talks/ and /media/posters/ 404s are answered by
Apache and never reach Django, so unlike publications (which serve_pdf can
redirect via the recorded original filename) external links to renamed
talk/poster PDFs cannot be rescued from this repo. Tracked separately.
Tests: 661 OK. New coverage for the trailing segment, per-class labels,
the shared matcher, the retroactive rename of a pre-#1404 talk (pdf + raw
+ thumbnail) and its idempotency, publications not churning, and the
backfill guard for both a legacy name and its uniquified variant.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
echo"4.10b Running 'python manage.py restandardize_artifact_filenames' to rename legacy talk/poster/pub files to the standardized scheme (#1401)"
168
-
echo"******************************************"
169
-
python manage.py restandardize_artifact_filenames
167
+
echo"4.10b Running 'python manage.py restandardize_artifact_filenames' to rename legacy talk/poster/pub files to the standardized scheme (#1401/#1404)"
168
+
echo"******************************************"
169
+
# TEMPORARY (#1404): the scheme just gained a trailing artifact-type segment
170
+
# ("..._CHI2024_Talk"), so this step would re-rename EVERY already-standardized
171
+
# talk and poster in one unattended pass. --dry-run logs what WOULD be renamed,
172
+
# touching nothing on disk or in the DB, so the scope can be reviewed on the
173
+
# test server (and then prod) first. REMOVE --dry-run and redeploy to perform
174
+
# the rename; after that this step is idempotent again and stays in place.
echo"4.10c Running 'python manage.py repair_diverged_artifact_filenames' to recover artifacts whose files were renamed on disk but not in the DB (#1390 dotted-name bug)"
# Makeability Lab Global Variables, including Makeability Lab version
89
-
ML_WEBSITE_VERSION="2.28.1"# Keep this updated with each release and also change the short description below
90
-
ML_WEBSITE_VERSION_DESCRIPTION="Adds Project People and Activity Log quick links to the admin header, so two internal pages that nothing in the site nav points at are one click away. The Activity Log link is superuser-only, matching that page's own gate."
89
+
ML_WEBSITE_VERSION="2.29.0"# Keep this updated with each release and also change the short description below
90
+
ML_WEBSITE_VERSION_DESCRIPTION="Standardized filenames for talks and posters now end in '_Talk' and '_Poster' (#1404), so a downloaded slide deck or poster is no longer indistinguishable from the paper PDF of the same work. Publication filenames are unchanged. Existing talk/poster files are renamed once, on deploy."
91
91
DATE_MAKEABILITYLAB_FORMED=datetime.date(2012, 1, 1) # Date Makeability Lab was formed
92
92
MAX_BANNERS=7# Maximum number of banners on a page
0 commit comments