https://github.com/diamondlightsource/pato-backend
Particle analysis and tomography data display application (backend)
https://github.com/diamondlightsource/pato-backend
Last synced: 3 months ago
JSON representation
Particle analysis and tomography data display application (backend)
- Host: GitHub
- URL: https://github.com/diamondlightsource/pato-backend
- Owner: DiamondLightSource
- License: apache-2.0
- Created: 2023-03-03T10:04:29.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-25T13:20:56.000Z (3 months ago)
- Last Synced: 2025-02-25T14:33:14.891Z (3 months ago)
- Language: Python
- Homepage:
- Size: 604 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
PATo API
===========================|license|
============== ==============================================================
Source code https://github.com/DiamondLightSource/pato-backend
============== ==============================================================Particle Analysis and Tomography Data API.
==========
Configuration
==========The API supports a configuration file, that follows the example set in :code:`config.json`, but most importantly, two environment variables need to be set:
- :code:`SQL_DATABASE_URL`: The URL for the database
- :code:`CONFIG_PATH`: Path for the configuration file==========
Deployment
==========Running development server on your machine:
1. Install the package with :code:`pip install .` or :code:`pip install -e .`
2. Set the `SQL_DATABASE_URL` environment variable according to your database's location
3. Run :code:`uvicorn` with `uvicorn pato.main:app --reload --port 8000`============
Testing
============- Build the database Docker image in `database` with :code:`podman build . -t diamond-ispyb`
- Run with :code:`podman run -p 3306:3306 --detach --name diamond-ispyb localhost/diamond-ispyb`
- You may change the port or where the container itself runs, just remember to update `.test.env`
- Run :code:`pytest tests`.. |code_ci| image:: https://gitlab.diamond.ac.uk/lims/pato-backend/badges/master/pipeline.svg
:target: https://gitlab.diamond.ac.uk/lims/pato-backend/-/pipelines
:alt: Code CI.. |license| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0
:alt: Apache License..
Anything below this line is used when viewing README.rst and will be replaced
when included in index.rst