Skip to content

Commit ee6c53a

Browse files
Merge pull request #418 from noharm-ai/develop
v4.14-beta
2 parents ffbcf20 + f5884ed commit ee6c53a

File tree

7 files changed

+30
-22
lines changed

7 files changed

+30
-22
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ jobs:
3535
run: |
3636
python mobile.py &
3737
sleep 10
38+
- name: Configure AWS Credentials
39+
uses: aws-actions/configure-aws-credentials@v4
40+
with:
41+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
42+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
43+
aws-region: sa-east-1
3844
- name: Run Coverage Report
3945
env:
40-
CACHE_BUCKET_ID: ${{ secrets.CACHE_BUCKET_ID }}
41-
CACHE_BUCKET_KEY: ${{ secrets.CACHE_BUCKET_KEY }}
4246
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
4347
run: python -m pytest --cov-report xml --cov=.
4448
- name: Submit Coverage Report

.github/workflows/deploy-dev.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
psql -h localhost -U postgres -d noharm -a -f database/noharm-newuser.sql -v ON_ERROR_STOP=1
3232
psql -h localhost -U postgres -d noharm -a -f database/noharm-triggers.sql -v ON_ERROR_STOP=1
3333
psql -h localhost -U postgres -d noharm -a -f database/noharm-insert.sql -v ON_ERROR_STOP=1
34+
- name: Configure AWS Credentials
35+
uses: aws-actions/configure-aws-credentials@v4
36+
with:
37+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
38+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+
aws-region: sa-east-1
3440
- name: Run Python Tests
3541
env:
36-
CACHE_BUCKET_ID: ${{ secrets.CACHE_BUCKET_ID }}
37-
CACHE_BUCKET_KEY: ${{ secrets.CACHE_BUCKET_KEY }}
38-
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
42+
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
3943
run: python -m pytest -v
4044
deploy:
4145
needs: [build]

.github/workflows/deploy-prod.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
psql -h localhost -U postgres -d noharm -a -f database/noharm-newuser.sql -v ON_ERROR_STOP=1
3232
psql -h localhost -U postgres -d noharm -a -f database/noharm-triggers.sql -v ON_ERROR_STOP=1
3333
psql -h localhost -U postgres -d noharm -a -f database/noharm-insert.sql -v ON_ERROR_STOP=1
34+
- name: Configure AWS Credentials
35+
uses: aws-actions/configure-aws-credentials@v4
36+
with:
37+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
38+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+
aws-region: sa-east-1
3440
- name: Run Python Tests
3541
env:
36-
CACHE_BUCKET_ID: ${{ secrets.CACHE_BUCKET_ID }}
37-
CACHE_BUCKET_KEY: ${{ secrets.CACHE_BUCKET_KEY }}
38-
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
42+
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
3943
run: python -m pytest -v
4044
deploy:
4145
needs: [build]

.github/workflows/deploy-test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
psql -h localhost -U postgres -d noharm -a -f database/noharm-newuser.sql -v ON_ERROR_STOP=1
3232
psql -h localhost -U postgres -d noharm -a -f database/noharm-triggers.sql -v ON_ERROR_STOP=1
3333
psql -h localhost -U postgres -d noharm -a -f database/noharm-insert.sql -v ON_ERROR_STOP=1
34+
- name: Configure AWS Credentials
35+
uses: aws-actions/configure-aws-credentials@v4
36+
with:
37+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
38+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+
aws-region: sa-east-1
3440
- name: Run Python Tests
3541
env:
36-
CACHE_BUCKET_ID: ${{ secrets.CACHE_BUCKET_ID }}
37-
CACHE_BUCKET_KEY: ${{ secrets.CACHE_BUCKET_KEY }}
38-
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
42+
CACHE_BUCKET_NAME: ${{ secrets.CACHE_BUCKET_NAME }}
3943
run: python -m pytest -v
4044
deploy:
4145
needs: [build]

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
class Config:
8-
VERSION = "v4.13-beta"
8+
VERSION = "v4.14-beta"
99
FRONTEND_VERSION = "4.0.10"
1010
ENV = getenv("ENV") or NoHarmENV.DEVELOPMENT.value
1111
SECRET_KEY = getenv("SECRET_KEY") or "secret_key"

services/admin/admin_ai_service.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ def get_factors(conversions):
120120

121121

122122
def _get_client():
123-
return boto3.client(
124-
"s3",
125-
aws_access_key_id=Config.CACHE_BUCKET_ID,
126-
aws_secret_access_key=Config.CACHE_BUCKET_KEY,
127-
)
123+
return boto3.client("s3")
128124

129125

130126
def _get_model(model_name):

services/reports/reports_cache_service.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88

99

1010
def _get_client():
11-
return boto3.client(
12-
"s3",
13-
aws_access_key_id=Config.CACHE_BUCKET_ID,
14-
aws_secret_access_key=Config.CACHE_BUCKET_KEY,
15-
)
11+
return boto3.client("s3")
1612

1713

1814
def get_resource_name(report, schema, filename="current"):

0 commit comments

Comments
 (0)