Skip to content
Snippets Groups Projects
Commit d7a6d3e7 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Updated readme.

parent 0eb6d2eb
Branches
Tags
No related merge requests found
# __python-common__ # __python-common__
This repository contains the common python files that are This repository contains the common python files that are
part of the [NOMAD Laboratory](http://nomad-lab.eu). part of the [NOMAD Laboratory](http://nomad-lab.eu).
The official version lives at The official version lives at
...@@ -18,54 +17,20 @@ The simplest way to have this is to check out nomad-lab-base recursively: ...@@ -18,54 +17,20 @@ The simplest way to have this is to check out nomad-lab-base recursively:
then this will be in python-common within it. then this will be in python-common within it.
# Local Install # Installation
The code is python>=2.7 and python>=3.4 compatible. First download and install
The following instructions were tested on Ubuntu 14.04. With these instructions this package:
you can install the package for the local user (doesn't need root privileges).
First make sure you have [pip](https://pypi.python.org/pypi/pip) available. If
not, you can install it for python 2.x with:
```sh
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
```
or for python3 with:
```sh ```sh
wget https://bootstrap.pypa.io/get-pip.py git clone https://gitlab.mpcdf.mpg.de/nomad-lab/python-common.git
python3 get-pip.py --user cd python-common
pip install -r requirements.txt
pip install -e .
``` ```
The modules used for parser development are located under the 'nomadcore' Then download the metainfo definitions to the same folder where the
package. If you wish to setup this package locally, you can do so by first 'python-common' repository was cloned:
installing the required dependencies (use pip3 for python3 setup)
```sh ```sh
pip install -r requirements.txt --user git clone https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-meta-info.git
#pip3 install -r requirements.txt --user
``` ```
and then installing the package itself with the provided installation
script(use python3 for python3 setup)
```sh
python setup.py develop --user
#python3 setup.py develop --user
```
This will install a development version, which means that if you update the
source code, all the changes will be available immediately without reinstall of
the package. The current setup also assumes a certain location for the metainfo
repository. If you place all the repositories (python-common, nomad-meta-info,
parser repository) in the same folder, things should work.
After this the package will be available to import by simply calling
```python
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'.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment