https://github.com/diamondlightsource/flask-ispyb-logistics
Dewar tracking within synchrotron
https://github.com/diamondlightsource/flask-ispyb-logistics
Last synced: 12 months ago
JSON representation
Dewar tracking within synchrotron
- Host: GitHub
- URL: https://github.com/diamondlightsource/flask-ispyb-logistics
- Owner: DiamondLightSource
- License: apache-2.0
- Created: 2018-10-31T13:53:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T09:58:46.000Z (over 1 year ago)
- Last Synced: 2024-10-29T11:57:39.121Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 1.75 MB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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