Skip to content

Commit 262aeb1

Browse files
authored
Update README.md
1 parent 32a44db commit 262aeb1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/worker/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ This username/password combination can be used to generate a token. Which can th
2020
1. Hit the authorize button on the top right, enter username/password in the OAuth2PasswordBearer form.
2121
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.
2222

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+
2327
## Testing
2428

2529
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
5155

5256
Enter into the root directory of the repo.
5357

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.
5559
1. `python3 -m venv .venv`
5660
1. `source .venv/bin/activate`
5761
1. `pip install uv`
@@ -63,7 +67,7 @@ For all of the following, the steps above are pre-requisites and you should be i
6367

6468
### Spin up the app locally:
6569

66-
1. `export ENV_FILE_PATH=<full_path_to_your_webapp_.env_file>`
70+
1. `export ENV_FILE_PATH=<full_path_to_your_worker_.env_file>`
6771
1. `fastapi dev src/worker/main.py --port 8000`
6872
1. Go to `http://127.0.0.1:8000/worker/api/v1/docs`
6973
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:
8488

8589
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.
8690

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.
8796

8897
## Local VSCode Debugging
8998

0 commit comments

Comments
 (0)