Skip to content

Commit 70847f9

Browse files
authored
Merge pull request #7 from nipreps/codex/add-readme.md-with-setup-instructions
Add README with setup and usage details
2 parents 7e6d0ee + 96d1363 commit 70847f9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# fmriprep_stats
2+
3+
This repository contains utilities to download usage statistics of fMRIPrep from Sentry.io.
4+
5+
## Setup
6+
7+
1. Install Python 3.8 or newer.
8+
2. Install dependencies using `requirements.txt`:
9+
10+
```bash
11+
python -m pip install -r requirements.txt
12+
```
13+
14+
## Running `src/run.py`
15+
16+
`src/run.py` exposes a command line interface built with Click. Before running,
17+
set a `SENTRY_TOKEN` environment variable with a valid token.
18+
19+
Example usage:
20+
21+
```bash
22+
SENTRY_TOKEN=your_token python src/run.py get -m started -m success -s 2023-01-01 -u 2023-01-31
23+
```
24+
25+
This will fetch the "started" and "success" events for January 2023. Omit the
26+
`-s` and `-u` options to use the default window (last 90 days). Run
27+
28+
```bash
29+
python src/run.py --help
30+
```
31+
32+
for a description of all available options.

0 commit comments

Comments
 (0)