Skip to content

Commit

Permalink
#70: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Oct 14, 2019
1 parent 15693c1 commit 5bb9cf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ This is illustrated below.
│ └── test_base
│ ├── constants.py
│ └── rest_test.py
├── util
│ └── icat_db_generator.py
├── logs.log
└── config.json
`````
Expand Down Expand Up @@ -119,6 +121,14 @@ and updating them, in a form easily converted to JSON.



## Database Generator
There is a tool to generate mock data into the database. It is located in `util/icat_db_generator.py`
By default it will generate 20 years worth of data (approx 70,000 entities). The script makes use of
`random` and `Faker` and is seeded with a seed of 1. The seed and number of years of data generated can
be changed by using the arg flags `-s` or `--seed` for the seed, and `-y` or `--years` for the number of years.
For example:
`python util/icat_db_generator.py -s 4 -y 10` Would set the seed to 4 and generate 10 years of data.

## Running Tests
To run the tests use `python -m unittest discover`

Expand Down

0 comments on commit 5bb9cf2

Please sign in to comment.