Skip to content

Refactor plots into manifest-driven atlas#1

Merged
mschwar merged 1 commit intomainfrom
audit/plots-next-level
Apr 24, 2026
Merged

Refactor plots into manifest-driven atlas#1
mschwar merged 1 commit intomainfrom
audit/plots-next-level

Conversation

@mschwar
Copy link
Copy Markdown
Owner

@mschwar mschwar commented Apr 24, 2026

No description provided.

@mschwar mschwar merged commit 1cbf646 into main Apr 24, 2026
3 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the repository to a manifest-driven architecture, introducing plots_manifest.json as the single source of truth for the atlas inventory. The homepage, README, and dashboard have been refactored to be dynamically generated, while data schemas and visualization scripts across multiple categories were standardized. New automated validation tools for link integrity and accessibility were also added. Review feedback recommends centralizing hardcoded constants in the compute timeline generators, enhancing the Markdown link-parsing regex to support optional titles, and pruning dead code from the refactored validation script.

Comment on lines +42 to +44
year = row["year"]
if year < 1945:
return 1e2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the static generator, these fallback values are hardcoded magic numbers. Centralizing these constants in a shared utility or documenting them would improve consistency between the static and interactive plots.

Suggested change
year = row["year"]
if year < 1945:
return 1e2
if year < 2012:
return 1e10
return 1e12

Comment thread scripts/check_links.py
return md_links


def _is_local_link(link: str) -> bool:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The regular expression used to extract Markdown links is too restrictive. It will fail to correctly parse links that include optional titles (e.g., [text](url "title")), as the title will be included in the captured URL group, leading to broken link reports during validation.

    md_links = re.findall(r"!?\[[^\]]*\]\(([^)\s]+)(?:\s+["'][^"']*["'])?\)", text)

Comment thread scripts/validate_all.py
Comment on lines +327 to +340
PLOTS = [
{
"name": entry["id"],
"csv": str(Path(entry["data"]).relative_to(entry["id"])),
"meta": str(Path(entry["metadata"]).relative_to(entry["id"])),
"required_files": [
str(Path(path).relative_to(entry["id"]))
for path in (entry["interactive"], entry["png"], entry["svg"], f"{entry['id']}/index.html")
if path
],
**entry,
}
for entry in plot_entries(ROOT, published_only=True)
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The PLOTS list is defined but appears to be unused in the refactored main() function, which now relies on plot_entries() from manifest_utils. This dead code should be removed to improve maintainability.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7a97ff040b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dashboard/dashboard.js
const tooltip = d3.select('body').append('div').attr('class', 'tooltip');

const totalHeight = LANES.length * (LANE_HEIGHT + 20) + MARGIN.top + MARGIN.bottom;
const totalHeight = 8 * (LANE_HEIGHT + 20) + MARGIN.top + MARGIN.bottom;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive SVG height from manifest lane count

The dashboard now loads lanes from plots_manifest.json, but totalHeight is hardcoded for exactly 8 lanes. If the number of published non-dashboard entries changes, rendered lanes and the x-axis can fall outside the declared viewBox (or leave unused space), so the manifest-driven layout breaks as soon as inventory changes. Compute height from the loaded entry count instead of a fixed constant.

Useful? React with 👍 / 👎.

Comment thread dashboard/dashboard.js
const raw = row.year || row.Year || row.Years_Ago || row.date;
if (!raw) return null;
if (row.Years_Ago) return 2026 - parseFloat(raw);
const value = parseFloat(String(raw).slice(0, 4));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve sub-year precision for date-based events

For rows using date values, parseYear truncates to the first four characters, collapsing all events in the same calendar year to the same x-position. In this dashboard each lane uses a single y-level, so same-year events overlap and later points can hide earlier ones, making portions of the timeline and tooltips effectively inaccessible (notably for dense model-size releases). Parse full dates to fractional years (or timestamps) rather than year-only truncation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant