Fix relative paths for the library imports
* Use ndn_cmmap_translators.<module_name>
* Update README to reflect updated dependecies and installation instructions
Change-Id: I7b44f10b9034ee21a5f55b2b41a5ea44dbd1cff9
diff --git a/README.md b/README.md
index 4b8c6f6..a6ec745 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,10 @@
* For OSX, the prerequisites can be installed using Homebrew:
<pre>
- brew install boost sqlite3 mysql jsoncpp
+ brew install boost sqlite3 mysql jsoncpp hdf5 openssl cryptopp protobuf
+ pip3 install mysql-connector-python --allow-all-external
+ pip3 install netCDF4
+
</pre>
* For Ubuntu, use the command below to install the prerequisites:
@@ -40,8 +43,12 @@
sudo apt-get install libboost-all-dev libssl-dev libcrypto++-dev \
libsqlite3-dev libmysqlclient-dev libjsoncpp-dev \
protobuf-compiler libprotobuf-dev netcdf4-python \
- python3-mysql.connector
+ python3-mysql.connector python3-pip libhdf5-dev \
+ libnetcdf-dev python3-numpy
+
+ sudo pip3 install netCDF4
</pre>
+
* For Fedora, use the command below to install the prerequisites:
<pre>
sudo yum install boost-devel openssl-devel cryptopp-devel sqlite3x-devel \
@@ -125,7 +132,7 @@
---------------------------
1. For the translator, ndn_cmmap_translator library is required to be in PYTHONPATH
<pre>
- export PYTHONPATH="full path to /ndn-atmos/lib/ndn_cmmap_translators":$PYTHONPATH
+ export PYTHONPATH="full path to /ndn-atmos/lib":$PYTHONPATH
</pre>
@@ -207,7 +214,7 @@
<pre>
git clone http://github.com/named-data/ndn-js.git
cd ndn-js
- git checkout v0.8.1 (or the latest version)
+ git checkout v0.8.1
</pre>
* Start python simple server in the client folder (ndn-atmos/client)
diff --git a/lib/ndn_cmmap_translators/__init__.py b/lib/ndn_cmmap_translators/__init__.py
index e69de29..a5c4e6b 100644
--- a/lib/ndn_cmmap_translators/__init__.py
+++ b/lib/ndn_cmmap_translators/__init__.py
@@ -0,0 +1,3 @@
+'''define the modules here so that they can be imported'''
+__all__ = ["atmos2ndn_parser", "atmos2ndn_translators"]
+
diff --git a/lib/ndn_cmmap_translators/atmos2ndn_translators/translate.py b/lib/ndn_cmmap_translators/atmos2ndn_translators/translate.py
index 10fd9b6..2eb4a26 100644
--- a/lib/ndn_cmmap_translators/atmos2ndn_translators/translate.py
+++ b/lib/ndn_cmmap_translators/atmos2ndn_translators/translate.py
@@ -28,8 +28,8 @@
import netCDF4
import glob
import os
-from atmos2ndn_parser import cmd_arg_parser
-from atmos2ndn_parser import conf_file_parser
+from ndn_cmmap_translators.atmos2ndn_parser import cmd_arg_parser
+from ndn_cmmap_translators.atmos2ndn_parser import conf_file_parser
from . import cmip5_translator
def translate(parsedConfig, dataFilepath):
diff --git a/lib/ndn_cmmap_translators/atmos_translator.py b/lib/ndn_cmmap_translators/atmos_translator.py
index 280d0d2..a12b420 100644
--- a/lib/ndn_cmmap_translators/atmos_translator.py
+++ b/lib/ndn_cmmap_translators/atmos_translator.py
@@ -22,8 +22,8 @@
'''Translates a netcdf filename to a NDN name'''
-from atmos2ndn_parser import conf_file_parser, cmd_arg_parser
-from atmos2ndn_translators import translate
+from ndn_cmmap_translators.atmos2ndn_parser import conf_file_parser, cmd_arg_parser
+from ndn_cmmap_translators.atmos2ndn_translators import translate
def argsForTranslation(dataFilepath, configPath):
'''this module does the actual translation calls'''