You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,67 @@ have a common way to access user and group information.
6
6
7
7
It is intended that the code in [models](./splash_userservice/models.py) and [api](./splash_userservice/api.py) would be the front-end interface, and facility-specific APIs would could then write specific code that maps to those model classes.
8
8
9
-
A fastapi server is included just because it docuemnts APIs so well. You can start it up and browse to the OpenAPI page that it generates:
9
+
## Installation
10
+
11
+
This project uses `uv` for dependency management. Install the project with:
12
+
13
+
uv sync # Install all dependencies
14
+
uv sync --group dev # Install with development dependencies
15
+
16
+
Or in editable mode:
17
+
18
+
uv pip install -e .
19
+
20
+
## Running the API Server
21
+
22
+
A FastAPI server is included that documents the APIs with an interactive OpenAPI page:
10
23
11
24
pip install -e .
12
25
uvicorn splash_userservice.api:app
13
26
14
27
Once started, you can navigate to the page at `http://localhost:8000/docs`
15
28
29
+
## Testing
30
+
31
+
### Testing with test_user.py
32
+
33
+
The `scripts/test_user.py` script allows you to test the ALSHubService directly by querying user information:
The script outputs the user information as JSON and logs all requests/responses to stderr. To see debug output (full URLs and response bodies), the logging is configured to show ALSHub service debug messages.
57
+
58
+
### Testing with test_user.sh (bash alternative)
59
+
60
+
A bash version is also available at `scripts/test_user.sh` for making direct HTTP requests:
61
+
62
+
./scripts/test_user.sh <ORCID> [LBNL_ID]
63
+
64
+
**Environment variables:**
65
+
66
+
-`ALSHUB_BASE`: ALSHub base URL (default: https://alsusweb.lbl.gov)
67
+
-`ESAF_BASE`: ESAF base URL (default: https://als-esaf.als.lbl.gov)
68
+
-`INSECURE_TLS`: Set to false for strict TLS verification (default: true for insecure)
-`SKIP_LBNL_REQUIRED_CALLS`: Skip proposals/ESAF calls if LBNLID not found
71
+
16
72
This project in a very early stage. Te [NSLS-II Scipy Cookiecutter](https://github.com/NSLS-II/scientific-python-cookiecutter) was used to start the project, but much is not yet being taken advantage of (especially documentation).
0 commit comments