README.md 1.59 KB
Newer Older
Lauri Himanen's avatar
update  
Lauri Himanen committed
1
# __python-common__
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


This repository contains the common python files that are
part of the [NOMAD Laboratory](http://nomad-lab.eu).
The official version lives at

    git@gitlab.mpcdf.mpg.de:nomad-lab/python-common.git

you can browse it at

    https://gitlab.mpcdf.mpg.de/nomad-lab/python-common

Some things rely on having the nomad-meta-info checked out at the same level.
The simplest way to have this is to check out nomad-lab-base recursively:

    git clone --recursive git@gitlab.mpcdf.mpg.de:nomad-lab/nomad-lab-base.git

then this will be in python-common within it.
Lauri Himanen's avatar
Lauri Himanen committed
20

21
# Local Install
22

Himanen Lauri's avatar
Himanen Lauri committed
23 24 25 26 27 28
The following instructions were tested on Ubuntu 14.04. With these instructions 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 with:

```sh
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
```
29

30 31
The modules used for parser development are located under the 'nomadcore'
package. If you wish to setup this package locally, you can do so by first
Himanen Lauri's avatar
Himanen Lauri committed
32
installing the required dependencies.
Lauri Himanen's avatar
Lauri Himanen committed
33 34

```sh
Himanen Lauri's avatar
Himanen Lauri committed
35
pip install -r requirements.txt --user
Lauri Himanen's avatar
Lauri Himanen committed
36 37
```

38
and then installing the package itself with the provided installation script:
Lauri Himanen's avatar
Lauri Himanen committed
39 40

```sh
41
python setup.py develop --user
Lauri Himanen's avatar
Update  
Lauri Himanen committed
42
```
Lauri Himanen's avatar
Lauri Himanen committed
43

44
After this the package will be available to import by simply calling
Lauri Himanen's avatar
Lauri Himanen committed
45 46

```python
47
import nomadcore
Lauri Himanen's avatar
Update  
Lauri Himanen committed
48
```
Lauri Himanen's avatar
Lauri Himanen committed
49

50 51 52
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'.