The SQuaRE team has successfully adopted Python and FastAPI for building applications for the Rubin Science Platform. The Pydantic model classes that define REST API requests and responses in a FastAPI server are also useful for clients (which can be other Rubin Science Platform applications). This technical note proposes a new vertical monorepo architecture where the server application (deployed as a Docker image) is developed alongside a client library (deployed as a PyPI package) that hosts the Pydantic models for the application's REST API. The vertical monorepo is the most efficient development architecture because both the client and server are developed and released simultaneously from the same Git repository.
Links:
- Publication URL: https://sqr-075.lsst.io
- Alternative editions: https://sqr-075.lsst.io/v
- GitHub repository: https://github.com/lsst-sqre/sqr-075
- Build system: https://github.com/lsst-sqre/sqr-075/actions/
You can clone this repository and build the technote locally with Sphinx:
git clone https://github.com/lsst-sqre/sqr-075
cd sqr-075
pip install -r requirements.txt
make html
Note
In a Conda environment, pip install -r requirements.txt
doesn't work as expected.
Instead, pip
install the packages listed in requirements.txt
individually.
The built technote is located at _build/html/index.html
.
You can edit the index.rst
file, which is a reStructuredText document.
The DM reStructuredText Style Guide is a good resource for how we write reStructuredText.
Remember that images and other types of assets should be stored in the _static/
directory of this repository.
See _static/README.rst
for more information.
The published technote at https://sqr-075.lsst.io will be automatically rebuilt whenever you push your changes to the main
branch on GitHub.
This technote's metadata is maintained in metadata.yaml
.
In this metadata you can edit the technote's title, authors, publication date, etc..
metadata.yaml
is self-documenting with inline comments.
The bibliography files in lsstbib/
are copies from lsst-texmf.
You can update them to the current lsst-texmf versions with:
make refresh-bib
Add new bibliography items to the local.bib
file in the root directory (and later add them to lsst-texmf).