Commit cb1a3c9b authored by Lauri Himanen's avatar Lauri Himanen

Added a readme file.

parent 0fcddd85
# python-common
This repository contains the common components for building a parser for the NOMAD project.
These instructions were tested on Ubuntu 14.04.
## Quick Install
The modules used for parser development are located under the 'nomadcore' package. You can setup this package in any way you like, but a simple installation script '' is provided for ease of use. It will install the nomadcore package along with the needed dependencies. You can install the package in development mode by calling the terminal command
python develop --user
in the folder where is located. After this the package will be available to import by simply calling
import nomadcore
in python. The development mode also means that the latest version of the code is used, so any updates from git will automatically be available. You can install a static snapshot by using 'install' instead of 'develop'.
## Manual install
This package depends on other python libraries which are declared in 'requirements.txt'. The requirements can be installed simply by calling the terminal command
pip install -r requirements.txt
in the folder where the file is located. In order to use the nomadcore package you have to add the directory to PYTHONPATH so that python knows where to look for it. This can be achieved temporarily by using a script like this
import sys
dir = os.path.normpath("path/to/python-common/python"))
if not commonDir in sys.path:
sys.path.insert(0, commonDir)
or the addition can be made permanent by adding the line
export PYTHONPATH="${PYTHONPATH}:/path/to/python-common/python"
to your ~/.bashrc file.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment