Skip to content

Commit

Permalink
Add some basic developer config notes
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Jan 9, 2025
1 parent 8e59253 commit 6ae48cc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ This is the repository for the NSLS-II Facility API codebase.

## 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 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. The json files for the collections can be found at `/nsls2/software/dssi/nsls2core`

1. Copy the `beamlines.json` and `facilities.json` to your development machine

2. Import facility information into the local mongodb
`mongoimport --db=nsls2core-development --collection=facilities --file=nsls2core.facilities.json`
3. Import beamline information into the local mongodb
`mongoimport --db=nsls2core-development --collection=beamlines --file=nsls2core.beamlines.json`

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`)

### Updating Dependencies

Expand Down

0 comments on commit 6ae48cc

Please sign in to comment.