Skip to content

Commit

Permalink
setup script and documentation file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kailashahirwar committed Feb 11, 2022
1 parent 39a5889 commit 9f8160f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
17 changes: 9 additions & 8 deletions TEST_FEDERATED_ANALYTICS.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
## How to test federated analytics
How to use federated analytics to calculate mean, variance and standard deviation

#### Steps
### Steps

1. Clone ravsock, ravop, ravjs and ravpy
#### 1. Clone ravsock, ravop, ravjs, ravftp and ravpy


git clone https://github.com/ravenprotocol/ravsock.git
git clone https://github.com/ravenprotocol/ravjs.git
git clone https://github.com/ravenprotocol/ravop.git
git clone https://github.com/ravenprotocol/ravpy.git
git clone https://github.com/ravenprotocol/ravftp.git

2. Setup dependencies(ravjs, ravop, ravftp and ravpy)
#### 2. Setup dependencies(ravjs, ravop, ravftp and ravpy)


sh setup.sh

3. Set FTP server directory and FTP environ path inside of ravsock/config.py
#### 3. Set FTP server directory and FTP environ path inside of ravsock/config.py


# ~/ravftp
Expand All @@ -25,21 +26,21 @@ How to use federated analytics to calculate mean, variance and standard deviatio
# ~/miniconda3/envs/ravftp/bin
FTP_ENVIRON_DIR = "<ravftp_virtual_env_dir>"

4. Set RDF_DATABASE_URI and create database with database tables required for the project
#### 4. Set RDF_DATABASE_URI and create database with database tables required for the project


RDF_DATABASE_URI = "sqlite:///rdf.db?check_same_thread=False"

python reset.py # Deletes the old database


5. Start ravsock server (socket + http server)
#### 5. Start ravsock server (socket + http server)


python run.py


6. Create a federated analytics graph by providing its name, approach and rules which clients must adhere to
#### 6. Create a federated analytics graph by providing its name, approach and rules which clients must adhere to


graph = R.Graph(name="Office Data", approach="federated",
Expand All @@ -50,7 +51,7 @@ How to use federated analytics to calculate mean, variance and standard deviatio
},
"max_clients": 1}))

7. Now you can calculate mean, variance or standard deviation by following the steps given below
#### 7. Now you can calculate mean, variance or standard deviation by following the steps given below


mean = R.federated_mean()
Expand Down
1 change: 0 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cd repos

git clone https://github.com/ravenprotocol/ravop.git
pip install -r ravop/requirements.txt
python ravop/setup.py install
cp -R ravop/ravop ../
rm -rf ravop

Expand Down

0 comments on commit 9f8160f

Please sign in to comment.