Skip to content

Commit

Permalink
Add note concerning bnlroot.crt and formatted file.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Jan 13, 2025
1 parent 562a1da commit e79d30a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`

Expand All @@ -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
Expand Down

0 comments on commit e79d30a

Please sign in to comment.