Skip to content

Commit 9739d42

Browse files
committed
linting fixes
1 parent bb4435f commit 9739d42

1 file changed

Lines changed: 34 additions & 29 deletions

File tree

README.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# dataverse-reports
2-
A python3-based tool to generate and email statistical reports from Dataverse (https://dataverse.org/) using the native API and database queries.
32

4-
As with Miniverse (https://github.com/IQSS/miniverse), the reports require access to the Dataverse database.
3+
A python3-based tool to generate and email statistical reports from [Dataverse](https://dataverse.org/) using the native API and database queries.
54

6-
Configuration
7-
-----
5+
As with [Miniverse](https://github.com/IQSS/miniverse), the reports require access to the Dataverse database.
6+
7+
## Requirements
8+
9+
- Python 3.6+
10+
- Dataverse 5.1+
11+
12+
## Python 3 Virtual Environment Setup
13+
14+
```bash
15+
python3 -m venv venv
16+
source venv/bin/activate
17+
pip install pipenv
18+
pipenv install
19+
```
20+
21+
## Configuration
822

923
```bash
10-
$ cp config/application.yml.sample config/application.yml
24+
cp config/application.yml.sample config/application.yml
1125
```
1226

13-
Example
27+
### Example
28+
1429
```yaml
1530
dataverse_api_host: ''
1631
dataverse_api_key: ''
@@ -44,18 +59,10 @@ Set parameters for API and database connections. Accounts list refers to top-lev
4459
4560
NOTE: The accounts section can be left blank if your Dataverse instance is not set up with separate institutions as top-level dataverses. In that case, your reports will be for everything from the root dataverse on down and sent to all admins.
4661
62+
## Usage
4763
48-
Python 3 Virtual Environment Setup
49-
-----
50-
```bash
51-
python3 -m venv venv
52-
source venv/bin/activate
53-
pip install pipenv
54-
pipenv install
55-
```
64+
**NOTE: All of the following commands assume that the user is in the virtual environment.**
5665
57-
Usage
58-
-----
5966
```bash
6067
Usage: run.py [options]
6168

@@ -73,30 +80,28 @@ Options:
7380
-e, --email Email reports to liaisons?
7481
```
7582

76-
<h5>Launch virtual environment</h5>
83+
### Sample commands
84+
85+
- Generate and email a report of all dataverses, datasets and users for super admin(s).
7786

7887
```bash
79-
$ source venv/bin/activate
88+
python run.py -c config/application.yml -r all -g all -o $HOME/reports -e
8089
```
8190

82-
<h5>Sample commands run inside the virtual environment.</h5>
91+
- Generate and email reports of dataverses for each institution beginning at a top-level dataverse.
8392

84-
Generate and email a report of all dataverses, datasets and users for super admin(s).
8593
```bash
86-
$ python run.py -c config/application.yml -r all -g all -o $HOME/reports -e
94+
python run.py -c config/application.yml -r dataverse -g institutions -o $HOME/reports -e
8795
```
8896

89-
Generate and email reports of dataverses for each institution beginning at a top-level dataverse.
90-
```bash
91-
$ python run.py -c config/application.yml -r dataverse -g institutions -o $HOME/reports -e
92-
```
97+
- Generate and email a report of all datasets for super admin(s).
9398

94-
Generate and email a report of all datasets for super admin(s).
9599
```bash
96-
$ python run.py -c config/application.yml -r dataset -g all -o $HOME/reports -e
100+
python run.py -c config/application.yml -r dataset -g all -o $HOME/reports -e
97101
```
98102

99-
Generate and email reports of users for each institution beginning at a top-level dataverse.
103+
- Generate and email reports of users for each institution beginning at a top-level dataverse.
104+
100105
```bash
101-
$ python run.py -c config/application.yml -r user -g institutions -o $HOME/reports -e
106+
python run.py -c config/application.yml -r user -g institutions -o $HOME/reports -e
102107
```

0 commit comments

Comments
 (0)