Skip to content

Commit

Permalink
Add information about index meta-database
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA committed Dec 23, 2019
1 parent 7f9f5ed commit 7c771d3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ open http://localhost:5000/docs
open http://localhost:5000/openapi.json
```

When developing, you can run both the server and an index meta-database server at the same time (from two separate terminals).
Running the following:

```shell
./run.sh index
# or
uvicorn optimade.server.main_index:app --reload --port 5001
```

Will run the index meta-database server at <http://localhost:5001/index/optimade>.

## Getting Started with Filter Parsing and Transforming

Example use:
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ This repository contains a library of tools for implementing and consuming [OPTi

Both the OPTiMaDe specification and this repository are **under development**.

## Installation & Contributing
## Installation (Index Meta-Database)

This package may be used to setup and run an [OPTiMaDe index meta-database](https://github.com/Materials-Consortia/OPTiMaDe/blob/develop/optimade.rst#index-meta-database).
Install the package via `pip install optimade[server]` and change the file `server.cfg` found in the root of the package.

The `server.cfg` file serves paths to a server config file (either an `ini` or `json` file, see the `./optimade/server/config.ini` for an example) and an index `/links`-endpoint data file.
The index meta-database is set up to populate a `mongomock` in-memory database with resources from a static `json` file containing the `child` resources you, as a database provider, want to serve under this index meta-database.

Running the index meta-database is then as simple as writing `./run.sh index` in a terminal from the root of this package.
You can find it at the base URL: [`http://localhost:5001/index/optimade/`](http://localhost:5001/index/optimade/).

## Development installation & Contributing

See [CONTRIBUTING](CONTRIBUTING.md).

Expand Down

0 comments on commit 7c771d3

Please sign in to comment.