11# Internet Quality Barometer (IQB)
22
3- [ ![ Build Status] ( https://github.com/m-lab/iqb/actions/workflows/ci.yml/badge.svg )] ( https://github.com/m-lab/iqb/actions ) [ ![ codecov] ( https://codecov.io/gh/m-lab/iqb/branch/main/graph/badge.svg )] ( https://codecov.io/gh/m-lab/iqb )
3+ [ ![ Build Status] ( https://github.com/m-lab/iqb/actions/workflows/ci.yml/badge.svg )] ( https://github.com/m-lab/iqb/actions ) [ ![ codecov] ( https://codecov.io/gh/m-lab/iqb/branch/main/graph/badge.svg )] ( https://codecov.io/gh/m-lab/iqb ) [ ![ Ask DeepWiki ] ( https://deepwiki.com/badge.svg )] ( https://deepwiki.com/m-lab/iqb )
44
55This repository contains the source for code the Internet Quality Barometer (IQB)
66library, and related applications and notebooks.
@@ -68,28 +68,35 @@ See [data/README.md](data/README.md) for details.
6868
6969Symbolic link to [ data] ( data ) that simplifies running the pipeline on Unix.
7070
71- ## Development Environment
71+ ## Data Flow
7272
73- We use [ uv] ( https://astral.sh/uv ) as a replacement for several Python repository
74- management tools such as ` pip ` , ` poetry ` , etc.
73+ The components above connect as follows:
7574
76- ### Installing uv
77-
78- On Ubuntu:
79-
80- ``` bash
81- sudo snap install astral-uv --classic
75+ ```
76+ BigQuery → [iqb pipeline run] → local cache/ → [IQBCache] → [IQBCalculator] → scores
77+ ↕
78+ [iqb cache pull/push] ↔ GCS
8279```
8380
84- On macOS:
81+ The ** pipeline** queries BigQuery for M-Lab NDT measurements and stores
82+ percentile summaries as Parquet files in the local cache. To avoid expensive
83+ re-queries, ** ` iqb cache pull ` ** can download pre-computed results from GCS
84+ instead. The ** ` IQBCache ` ** API reads cached data, and ** ` IQBCalculator ` **
85+ applies quality thresholds and weights to produce IQB scores. The
86+ ** prototype** and ** analysis notebooks** both consume scores through
87+ these library APIs.
8588
86- ``` bash
87- brew install uv
88- ```
89+ ## Understanding the Codebase
90+
91+ - To learn ** how the data pipeline works** , read the
92+ [ internals guide] ( docs/internals/README.md ) — it walks through queries,
93+ the pipeline, the remote cache, and the researcher API in sequence.
8994
90- On other platforms, see the [ uv installation guide] ( https://docs.astral.sh/uv/getting-started/installation/ ) .
95+ - To understand ** why specific technical decisions were made** , see the
96+ [ design documents] ( docs/design/README.md ) — architecture decision records
97+ covering cache design, data distribution, and more.
9198
92- ### Quick Start
99+ ## Quick Start
93100
94101``` bash
95102# Clone the repository
@@ -104,68 +111,5 @@ cd prototype
104111uv run streamlit run Home.py
105112```
106113
107- ### Using VSCode
108-
109- This repository is configured for VSCode with selected Python
110- development tools (Ruff, Pyright, pytest).
111-
112- When you first open this repository with VSCode, it will prompt you
113- to install the required extensions for Python development.
114-
115- Make sure you also read the following section to avoid ` uv `
116- issues: there is no official ` uv ` extension for VSCode yet and
117- it seems more prudent to avoid using unofficial ones.
118-
119- #### First-time uv setup
120-
121- Running ` uv sync --dev ` creates the required ` .venv ` directory
122- that VSCode needs to find the proper python version and the proper
123- development tools.
124-
125- If you open the repository using VSCode * before* running
126- ` uv sync --dev ` , you see the following error:
127-
128- ```
129- Unexpected error while trying to find the Ruff binary
130- ```
131-
132- To fix this, either run ` uv sync --dev ` from the command line or
133- use VSCode directly to run ` uv ` and reload:
134-
135- 1 . Run the setup task:
136-
137- - Press ` Ctrl+Shift+P ` (or ` Cmd+Shift+P ` on macOS)
138-
139- - Type "Tasks: Run Task"
140-
141- - Select ** "IQB: Setup Development Environment"**
142-
143- - This runs ` uv sync --dev ` to install all development dependencies
144-
145- 2 . After setup completes, reload VSCode:
146-
147- - Press ` Ctrl+Shift+P ` → "Developer: Reload Window"
148-
149- - The Ruff error should disappear
150-
151- #### Available Tasks
152-
153- Access them via ` Ctrl+Shift+P ` → "Tasks: Run Task":
154-
155- - ** IQB: Setup Development Environment** - Run ` uv sync --dev ` to install/update dependencies
156-
157- - ** IQB: Run Tests** - Run the pytest test suite
158-
159- - ** IQB: Run Ruff Check** - Check code style and quality
160-
161- - ** IQB: Run Pyright** - Run type checking
162-
163- #### Extensions
164-
165- VSCode will prompt to install these extensions:
166-
167- - Python (` ms-python.python ` )
168-
169- - Pylance (` ms-python.vscode-pylance ` )
170-
171- - Ruff (` charliermarsh.ruff ` )
114+ See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for full development environment
115+ setup, VSCode configuration, and component-specific workflows.
0 commit comments