Simulator scripts for datafile-collector
[integration.git] / test / mocks / datafilecollector-testharness / mr-sim / README.md
1 ## Developer workflow
2
3 1. ```sudo apt install python3-venv```
4 2. ```source .env/bin/activate/```
5 3. ```pip3 install "anypackage"```      #also include in source code
6 4. ```pip3 freeze | grep -v "pkg-resources" > requirements.txt```   #to create a req file
7 5. ```FLASK_APP=mr-sim.py flask run```
8
9     or
10
11    ```python3 mr-sim.py ```
12
13 6. Check/lint/format the code before commit/amed by ```autopep8 --in-place --aggressive --aggressive mr-sim.py```
14
15
16 ## User workflow on *NIX
17
18
19 When cloning/fetching from the repository first time:
20 1. `git clone`
21 2. `cd "..." `          #navigate to this folder
22 3. `source setup.sh `   #setting up virtualenv and install requirements
23
24     you'll get a sourced virtualenv shell here, check prompt
25 4. `(env) $ python3 mr-sim.py --help`
26
27     alternatively
28
29     `(env) $ python3 mr-sim.py --tc1`
30
31 Every time you run the script, you'll need to step into the virtualenv by following step 3 first.
32
33 ## User workflow on Windows
34
35 When cloning/fetching from the repository first time:
36
37 1. 'git clone'
38 2. then step into the folder
39 3. 'pip3 install virtualenv'
40 4. 'pip3 install virtualenvwrapper-win'
41 5. 'mkvirtualenv env'
42 6. 'workon env'
43 7. 'pip3 install -r requirements.txt'   #this will install in the local environment then
44 8. 'python3 dfc-sim.py'
45
46 Every time you run the script, you'll need to step into the virtualenv by step 2+6.