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: src/worker/README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ This username/password combination can be used to generate a token. Which can th
20
20
1. Hit the authorize button on the top right, enter username/password in the OAuth2PasswordBearer form.
21
21
2. You are authenticated! You can execute the other endpoints from the swagger UI directly. You can modify the request body then hit execute and see the results.
22
22
23
+
## GCP Storage Access
24
+
25
+
The worker does need direct access to GCP storage. It accesses the <env>_sftp_ingestion bucket (and should create it for a given environment if it does not already exist) which is where it first pulls the SFTP ingested data from.
26
+
23
27
## Testing
24
28
25
29
Unit test files are named `<file_under_test>_test.py` to correspond with the files they are testing. Unit tests only test behavior introduced by logic written in those files and do not test any integration with other systems. To respect test isolation, we have the following levels of testing:
@@ -51,7 +55,7 @@ Package management is done via [uv](https://docs.astral.sh/uv/). When adding a n
51
55
52
56
Enter into the root directory of the repo.
53
57
54
-
1. Copy the `./src/worker/.env.example` file to `./src/worker/.env`
58
+
1. Copy the `./src/worker/.env.example` file to `./src/worker/.env`. Populate any needed fields.
55
59
1.`python3 -m venv .venv`
56
60
1.`source .venv/bin/activate`
57
61
1.`pip install uv`
@@ -63,7 +67,7 @@ For all of the following, the steps above are pre-requisites and you should be i
1. Go to `http://127.0.0.1:8000/worker/api/v1/docs`
69
73
1. Hit the `Authorize` button on the top right and enter the username/password.
@@ -84,6 +88,11 @@ For convenience: the .env.example username/password combo for the local env are:
84
88
85
89
Non-error Pylint is very opinionated, and **SOMETIMES WRONG**. For example, there exist warnings to switch `== NONE` to `is None` for SQL query where clauses. THIS WILL CAUSE THE SQL QUERY TO NOT WORK -- (it appears to be due to how SqlAlchemy understands the clauses). So be careful when following the recommendations from pylint. While the worker doesn't have database actions, there may be other such cases.
86
90
91
+
## Other notes
92
+
93
+
The .env processing file is config.py -- make sure any new environment variables get added to this file so that the program will ensure its required on start up time and so that you can access it in other files using the config.py's maps.
94
+
95
+
For the bearer token, it appears FastAPI likes the bearer token to be structured like so: `Bearer <token_value>` as the field set in the authorization header.
0 commit comments