An open API service indexing awesome lists of open source software.

https://github.com/diamondlightsource/flask-ispyb-logistics

Dewar tracking within synchrotron
https://github.com/diamondlightsource/flask-ispyb-logistics

Last synced: 3 months ago
JSON representation

Dewar tracking within synchrotron

Awesome Lists containing this project

README

        

# ISPyB Logistics (Dewar Management)

## Setup
Create a virtualenv (e.g python 3.8) then install dependencies with pip
$ virtualenv --python=python3.8
$ source .env/bin/activate
$ pip install -r requirements.txt

## Configuration
There is an example run script in the ./scripts directory which shows how to configure the app

### SynchWeb URL (for updating history)
export SYNCHWEB_HOST=

### ISPyB Database config
export ISPYB_CONFIG_FILE=
export ISPYB_CONFIG_SECTION=

Format of the .cfg file is as specified by ispyb-python-api
Example in tests/test.cfg

### Flask config
export FLASK_APP=app.py
export FLASK_ENV=development | production

## Running
$ flask run --host --port

## Security
There is no application level authentication here
It's designed to work with nginx to control access

## Model Generation
This app uses a fraction of the ISPyB database tables
If core tables have changed (Dewar, DewarTransportHistory, BLSession, Proposal, Person, Shipping etc.) the models file might need to be re-generated.

To update the models within the ispyb_api package run:
$ python -m scripts/generate_models

This will create a './scripts/automodels.py' file

The script output will show if the file differs from ispyb_api/models.py

If it does, integrate changes or copy the ./scripts/automodels.py file across to the ispyb_api/models.py