chg: Change directory used to store raw data
parent
3512290cc2
commit
595fa671d7
43
README.md
43
README.md
|
@ -1,18 +1,55 @@
|
|||
# BGP-Ranking
|
||||
New version of BGP Ranking, complete rewrite in python3.6+ and an ARDB backend
|
||||
|
||||
# Installation
|
||||
|
||||
**IMPORTANT**: run it in a virtualenv, seriously. This install guide assumes you know what it is, and use one.
|
||||
|
||||
## Install redis
|
||||
|
||||
```bash
|
||||
git clone https://github.com/antirez/redis.git
|
||||
cd redis
|
||||
git checkout 4.0
|
||||
make
|
||||
make test
|
||||
cd ..
|
||||
```
|
||||
|
||||
## Install ardb
|
||||
|
||||
```bash
|
||||
git clone https://github.com/yinqiwen/ardb.git
|
||||
cd ardb
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
||||
## Install BGP Ranking
|
||||
|
||||
```bash
|
||||
git clone https://github.com/D4-project/BGP-Ranking.git
|
||||
cd BGP-Ranking
|
||||
pip install -r requirements.txt
|
||||
pip install -e .
|
||||
export BGPRANKING_HOME='./'
|
||||
start.py
|
||||
```
|
||||
|
||||
# Directory structure
|
||||
|
||||
*Config files*: `listimport / modules_config / *.json`
|
||||
*Config files*: `bgpranking / config / *.json`
|
||||
|
||||
*Per-module parsers*: `listimport / parsers`
|
||||
*Per-module parsers*: `bgpraking / parsers`
|
||||
|
||||
*Libraries* : `listimport / libs`
|
||||
*Libraries* : `brpranking / libs`
|
||||
|
||||
# Raw dataset directory structure
|
||||
|
||||
## Files to import
|
||||
|
||||
*Note*: The default location of `<storage_directory>` is the root directory of the repo.
|
||||
|
||||
`<storage_directory> / <vendor> / <listname>`
|
||||
|
||||
## Last modified date (if possible) and lock file
|
||||
|
|
|
@ -22,7 +22,7 @@ class ModulesArchiver():
|
|||
if not config_dir:
|
||||
config_dir = get_config_path()
|
||||
if not storage_directory:
|
||||
self.storage_directory = get_homedir()
|
||||
self.storage_directory = get_homedir() / 'rawdata'
|
||||
modules_config = config_dir / 'modules'
|
||||
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
|
||||
self.modules = [DeepArchive(path, self.storage_directory, loglevel) for path in modules_paths]
|
||||
|
|
|
@ -21,7 +21,7 @@ class ModulesManager(AbstractManager):
|
|||
if not config_dir:
|
||||
config_dir = get_config_path()
|
||||
if not storage_directory:
|
||||
storage_directory = get_homedir()
|
||||
storage_directory = get_homedir() / 'rawdata'
|
||||
modules_config = config_dir / 'modules'
|
||||
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
|
||||
self.modules = [Fetcher(path, storage_directory, loglevel) for path in modules_paths]
|
||||
|
|
|
@ -19,7 +19,7 @@ class ParserManager(AbstractManager):
|
|||
if not config_dir:
|
||||
config_dir = get_config_path()
|
||||
if not storage_directory:
|
||||
storage_directory = get_homedir()
|
||||
storage_directory = get_homedir() / 'rawdata'
|
||||
modules_config = config_dir / 'modules'
|
||||
modules_paths = [modulepath for modulepath in modules_config.glob('*.json')]
|
||||
self.modules = [RawFilesParser(path, storage_directory, loglevel) for path in modules_paths]
|
||||
|
|
Loading…
Reference in New Issue