@@ -18,46 +18,30 @@ The simplest way to have this is to check out nomad-lab-base recursively:
then this will be in python-common within it.
# Quick Install
# Local Install
The following instructions were tested on Ubuntu 14.04.
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 'setup.py' 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
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
installing the required dependencies:
```sh
python setup.py develop --user
```
in the folder where setup.py is located. After this the package will be available to import by simply calling
```python
importnomadcore
pip install-r requirements.txt
```
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
and then installing the package itself with the provided installation script:
```sh
pip install-r requirements.txt
python setup.py develop --user
```
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
After this the package will be available to import by simply calling
raiseLookupError("The CacheService value '{}' has already been output to the backend. The CacheOutputMode does not allow this.".format(cache_object.name))
ifcache_object._update:
ifnotcache_object._updated:
raiseLookupError("The CacheService value '{}' has not been update since it was last output. The CacheUpdateMode does not allow this.".format(cache_object.name))
defpush_value(self,name,metaname=None):
"""Pushes the scalar value stored with the given name to the backend.
If the name cannot be found, nothing is pushed. If the metaname
property is not defined the value is pushed with the name that was used
as key.
"""
cache_object=self.get_cache_object(name)
ifcache_objectisNoneorcache_object._valueisNone:
logger.warning("The value for metaname '{}' was not set in the CacheService, and could not be pushed".format(name))