From e79d30a53e1562228560b679c5b6912d204ba539 Mon Sep 17 00:00:00 2001 From: Stuart Campbell Date: Mon, 13 Jan 2025 11:49:43 -0500 Subject: [PATCH] Add note concerning bnlroot.crt and formatted file. --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 11614b1..c57d45b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,19 @@ # NSLS-II Facility API -This is the repository for the NSLS-II Facility API codebase. +This is the repository for the NSLS-II Facility API codebase. ## Current Status [![Integration Tests for Deployed API](https://github.com/NSLS2/nsls2api/actions/workflows/test-production-deployment.yml/badge.svg)](https://github.com/NSLS2/nsls2api/actions/workflows/test-production-deployment.yml) -## Developer Notes +## Developer Notes In order to develop locally you will need to have a local MongoDB running. -This can be installed using your preferred method, a native install or [running a container](https://hub.docker.com/_/mongo) work perfectly fine. +This can be installed using your preferred method, a native install +or [running a container](https://hub.docker.com/_/mongo) work perfectly fine. -Once you have MongoDB up and running you then need to 'seed' the facility and beamline information that -does not get pulled from any other source. +Once you have MongoDB up and running you then need to 'seed' the facility and beamline information that +does not get pulled from any other source. The files for the collections can be found within the `/nsls2/software/dssi/nsls2core/nsls2core-development.tgz` @@ -22,22 +23,24 @@ The files for the collections can be found within the `/nsls2/software/dssi/nsls ```bash mongorestore --uri="mongodb://localhost:27017" --nsFrom=nsls2core-development.facilities --nsTo=nsls2core-development.facilities ./nsls2core-development/facilities.bson ``` -3. Import beamline information into the local mongodb +3. Import beamline information into the local mongodb ```bash mongorestore --uri="mongodb://localhost:27017" --nsFrom=nsls2core-development.beamlines --nsTo=nsls2core-development.beamlines ./nsls2core-development/beamlines.bson ``` -You will then need to create a `.env` file that contains the configuration (an example can also be found in the same +You will then need to create a `.env` file that contains the configuration (an example can also be found in the same directory as the json files). 1. Copy `/nsls2/software/dssi/nsls2core/.env.development` to your local machine 2. Rename to `.env` and place in the `src/nsls2api` directory in your cloned repo (in the same folder as `main.py`) +3. Ensure that you have the `bnlroot.crt` file (which is deployed to all BNL managed machines) in the location specified + within the `.env` file. ### Updating Dependencies -The project uses `uv pip compile` to manage the `requirements.txt` and `requirements-dev.txt` files. +The project uses `uv pip compile` to manage the `requirements.txt` and `requirements-dev.txt` files. -In order to upgrade the packages you will need to simply run +In order to upgrade the packages you will need to simply run ``` uv pip compile requirements-dev.in --upgrade -o requirements-dev.txt