This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
This repository analyzes the Open Source LLM Development Landscape by tracking project vitality, trends, and community engagement metrics. The project uses OpenRank to assess repository health and identifies emerging trends in the LLM ecosystem. Reports are published on Medium and WeChat, with an interactive version on Canva.
- Python 3.12
- pip or conda for package management
- Access to ClickHouse database (credentials in
.env) - GitHub API token (for GitHub API calls)
-
Create and activate virtual environment:
python3 -m venv .venv source .venv/bin/activate # On macOS/Linux # or: .venv\Scripts\activate # On Windows
-
Configure environment variables (
.envfile innotebooks/directory):GITHUB_TOKEN=your_github_token CLICKHOUSE_HOST=your_clickhouse_host CLICKHOUSE_USER=your_username CLICKHOUSE_PASSWORD=your_password HF_TOKEN=your_huggingface_token # Optional, for some analyses -
Install dependencies: Dependencies are managed via Jupyter notebooks' import statements. Key packages include:
pandas- Data manipulation and analysisrequests- API calls (GitHub, Open-Digger)clickhouse_connect- ClickHouse database accessmatplotlib- Basic plottingscipy- Interpolation and scientific computingpython-dotenv- Environment variable managementwordcloud- Word cloud generation
├── notebooks/ # Jupyter notebooks for data analysis and visualization
│ ├── src/ # Font files (e.g., RacingSansOne-Regular.ttf)
│ ├── get_projects_info.ipynb # Query OpenRank data and fetch project info
│ ├── contruct_network_from_seed.ipynb # Build project relationship networks
│ ├── draw_figures.ipynb # Create all report visualizations
│ └── .env # Local environment variables (not in git)
├── data/ # CSV datasets with landscape data
│ ├── landscape_250913.csv # Current landscape snapshot
│ └── landscape_full_250913.csv # Full project data
├── reports/ # Generated report outputs
│ ├── 250913_llm_landscape/ # Latest report (figures, data)
│ └── 250527_llm_landscape/ # Previous reports
├── data_stories/ # Community-contributed project insights (markdown files)
├── .cursor/ # Cursor IDE configuration (empty - available for rules)
└── README.md # Project overview and links
The workflow follows this sequence:
-
Data Collection (
get_projects_info.ipynb):- Query ClickHouse for repositories with OpenRank ≥ 50 in specified month
- Fetch project metadata from GitHub API (stars, forks, language, topics, description)
- Retrieve OpenRank trend data from Open-Digger API
- Save results as CSV in
data/directory
-
Network Analysis (
contruct_network_from_seed.ipynb):- Build dependency/relationship networks from seed projects
- Identify project clusters and connections
-
Visualization Generation (
draw_figures.ipynb):- Create OpenRank trend charts with smooth spline interpolation
- Generate comparative OpenRank curves (e.g., PyTorch vs TensorFlow)
- Produce word clouds from project descriptions
- Export figures to PNG/SVG for reports
-
Report Assembly:
- Figures from step 3 are manually organized into reports in
reports/directory - Data stories collected from
data_stories/are compiled
- Figures from step 3 are manually organized into reports in
OpenRank Score: A metric maintained by OpenRank measuring repository vitality based on:
- Commit frequency
- Star growth
- Contributor activity
- Issue/PR engagement
Selection criterion: Projects with OpenRank ≥ 50 in the analyzed month are included (adjustable per report).
Landscape Categories: Projects are categorized by domain:
- Large Models (foundational LLMs)
- AI Coding/Development Tools
- RAG/Knowledge Systems
- Agent Frameworks
- Infrastructure/Serving
- And others based on analysis focus
cd notebooks
jupyter notebook get_projects_info.ipynb
# Select "Run All" or "Restart & Run All" from the Kernel menu- Open notebook in Jupyter
- Click on a cell and press
Shift+Enterto run it - Cells typically include section headers (markdown cells) for organization
- All notebooks use
.envin thenotebooks/directory for configuration - Database connection established once at notebook start (see first code cell)
- Modify month/date parameters in queries to analyze different time periods
- Font file (
RacingSansOne-Regular.ttf) must be innotebooks/src/for word clouds
- Endpoint:
https://api.github.com/repos/{owner}/{repo} - Rate limit: 60 requests/minute (unauthenticated), 5000/hour (authenticated with token)
- Required for fetching: stars, forks, language, topics, description, creation date
- Hosts global repository metrics including OpenRank
- Query examples in notebooks filter by
platform = 'GitHub'and date ranges - Default table:
opensource.global_openrank
- Endpoint:
https://oss.open-digger.cn/github/{repo_name}/openrank.json - Returns monthly OpenRank values (e.g., "2025-07": 150)
- Used for trend analysis and historical comparison
- Create
.mdfile indata_stories/named after project (e.g.,DeepSeek.md) - Include analysis, insights, and metrics from the landscape
- Submit via pull request
- See
data_stories/README.mdfor format details
- Modify notebook parameters (date, OpenRank threshold, project list)
- Re-run affected cells to regenerate data
- Save outputs and commit alongside updated notebooks
- Create date-named subdirectory in
reports/(e.g.,reports/260301_llm_landscape/) - Update notebook parameters for new date range/criteria
- Run
get_projects_info.ipynbto refresh data CSV - Run
draw_figures.ipynbto generate all visualizations - Save figures to report directory
- Document selection criteria and findings
- Modify
repo_nameslist inget_projects_info.ipynbwith GitHub full names (e.g.,openai/gpt-4) - Run fetch section to get stats, or query ClickHouse directly for trends
- Data formatted as CSV for import into reports
- Edit chart parameters in
draw_figures.ipynb(colors, fonts, axes labels) - Use custom fonts from
notebooks/src/directory - Matplotlib/Wordcloud libraries used; refer to cell examples for common patterns
- Store all persistent materials for a talk under
presentations/<YYMMDD>-<event-slug>/. - Keep the brief, research notes, scripts, decks, audience-facing HTML, charts, sourced assets, and final QA artifacts together in that event directory.
- Example: CommunityOverCode China 2026 keynote materials belong in
presentations/260807-CoC-KN/. - Do not place presentation materials in
outputs/; reserveoutputs/for non-presentation generated artifacts. - Keep disposable build intermediates in a temporary directory and remove them before handoff.
- Never commit
.envfile - contains API tokens and database credentials .gitignoreexcludes.envand.venv/- Use Ant Group's ClickHouse instance or configure own for development
- Rotate GitHub tokens regularly; use fine-grained personal access tokens when possible