Skip to content

Commit 4a93c33

Browse files
authored
fix: date display (#32)
1 parent 9a97372 commit 4a93c33

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

CLAUDE.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a Python CLI tool with a D3.js frontend that generates interactive network visualizations of GitHub contributors. The CLI fetches data from GitHub, generates CSVs, and builds a static site for deployment.
8+
9+
## Commands
10+
11+
### Development
12+
13+
```bash
14+
# Install dependencies
15+
uv sync
16+
17+
# Run CLI commands
18+
uv run contributor-network data # Fetch contribution data from GitHub
19+
uv run contributor-network csvs # Generate CSVs from JSON
20+
uv run contributor-network build # Build static site to dist/
21+
uv run contributor-network discover # Find new repositories
22+
uv run contributor-network list-contributors # Display all contributors
23+
```
24+
25+
### Quality Checks
26+
27+
```bash
28+
# Run all checks (as in CI)
29+
uv run ruff format --check .
30+
uv run ruff check .
31+
uv run mypy
32+
33+
# Auto-fix formatting and lint issues
34+
uv run ruff format .
35+
uv run ruff check --fix .
36+
37+
# Run tests
38+
uv run pytest
39+
uv run pytest tests/test_config.py::test_function_name # Single test
40+
```
41+
42+
## Architecture
43+
44+
**Data flow**: GitHub API → Python CLI → JSON files → CSV files → D3.js visualization
45+
46+
- `src/contributor_network/cli.py` - Click-based CLI with 5 subcommands
47+
- `src/contributor_network/config.py` - Pydantic models for TOML configuration
48+
- `src/contributor_network/models.py` - Data models (Link, Repository)
49+
- `src/contributor_network/client.py` - GitHub API client wrapper
50+
- `index.js` - D3.js visualization (vanilla JS, no build step)
51+
- `templates/` - Jinja2 HTML templates
52+
- `config.toml`, `veda.toml` - Repository and contributor configuration
53+
54+
## Code Style
55+
56+
- Use `ruff` for linting and formatting
57+
- Type hints required (mypy runs in CI)
58+
- Pydantic for data validation
59+
- Click for CLI commands

templates/index.html.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
})
305305
// Now get the most recent commit date from the links to the central repository
306306
let most_recent_commit = d3.max(links_to_central, d => d.commit_sec_max)
307-
document.getElementById("last-commit-date").innerHTML = `Including commits up to ${formatDateLong(most_recent_commit)}`
307+
document.getElementById("last-commit-date").innerHTML = `Including commits up to ${formatDateLong(most_recent_commit * 1000)}`
308308
})//promises
309309
})//fonts.ready
310310

0 commit comments

Comments
 (0)