Skip to content

Commit

Permalink
adding more to .gitignore and updated README with instructions to run…
Browse files Browse the repository at this point in the history
… locally
  • Loading branch information
lambeb committed Jan 24, 2025
1 parent 31a5e65 commit f9d8ad9
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# VS Code
.vscode
.DS_Store
.DS_Store
.env
/requirements.txt
/venv/
/app.yaml
.pytest_cache
/.idea/
/.coverage
__pycache__
/tmp/
.python-version
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,15 @@ Run unit tests:
```shell
poetry run python -m pytest
```


### Running Locally

Run the following command in a terminal

gcloud config set project <project_id>
gcloud compute start-iap-tunnel restapi-1 80 --local-host-port=localhost:8011


export BLAISE_API_URL="localhost:8011"
export BLAISE_SERVER_PARK="gusty"
14 changes: 13 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import logging
import os

from google.cloud import storage

import utils
from dotenv import load_dotenv
from appconfig.config import Config
from services.blaise_service import BlaiseService
from services.validation_service import ValidationService
Expand Down Expand Up @@ -88,5 +90,15 @@ def process_zip_file(data):
return error_message, 500


if os.path.isfile("./.env"):
print("Loading environment variables from dotenv file")
load_dotenv()

# Testing
process_zip_file()
if __name__ == "__main__":
process_zip_file(
{
"bucket": "ons-blaise-v2-dev-rr3-ingest",
"name": "IPS2501A.zip"
}
)
22 changes: 18 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pytest = "^8.1.1"
mypy = "^1.10.0"
codecov = "^2.1.13"
flask = "^2.0.0"
python-dotenv = "^0.18.0"
flake8-cognitive-complexity = "^0.1.0"
pytest-flakefinder = "^1.0.0"
pytest-lazy-fixture = "^0.6.3"
Expand Down

0 comments on commit f9d8ad9

Please sign in to comment.