Skip to content

Commit

Permalink
colin filings and future effective
Browse files Browse the repository at this point in the history
  • Loading branch information
tshyun24 committed Jan 31, 2024
1 parent acebd34 commit 9e70d1d
Show file tree
Hide file tree
Showing 19 changed files with 965 additions and 412 deletions.
65 changes: 1 addition & 64 deletions .github/workflows/business-email-reminder-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,9 @@ defaults:
working-directory: ./jobs/email-reminder

jobs:
# setup-job:
# runs-on: ubuntu-20.04

# if: github.repository == 'bcgov/lear'

# steps:
# - uses: actions/checkout@v3
# - run: "true"

# linting:
# needs: setup-job
# runs-on: ubuntu-20.04

# strategy:
# matrix:
# python-version: [3.8]

# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# make setup
# - name: Lint with pylint
# id: pylint
# run: |
# make pylint
# - name: Lint with flake8
# id: flake8
# run: |
# make flake8

# testing:
# needs: setup-job
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# make setup
# - name: Test with pytest
# id: test
# run: |
# make test

# build-check:
# needs: setup-job
# runs-on: ubuntu-20.04

# steps:
# - uses: actions/checkout@v3
# - name: build to check strictness
# id: build
# run: |
# make build-nc

business-email-reminder-ci:
uses: bcgov/bcregistry-sre/.github/workflows/api-ci.yaml@main
with:
app_name: "business-email-reminder"
working_directory: "./jobs/email-reminder"
codecov_flag: "emailreminder"
codecov_flag: "emailreminder"
76 changes: 7 additions & 69 deletions .github/workflows/business-future-effective-filings-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,17 @@ on:
types: [assigned, synchronize]
paths:
- "jobs/future-effective-filings/**"
workflow_dispatch:

defaults:
run:
shell: bash
working-directory: ./jobs/future-effective-filings

jobs:
setup-job:
runs-on: ubuntu-20.04

if: github.repository == 'bcgov/lear'

steps:
- uses: actions/checkout@v3
- run: "true"

linting:
needs: setup-job
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make setup
- name: Lint with pylint
id: pylint
run: |
make pylint
- name: Lint with flake8
id: flake8
run: |
make flake8
testing:
needs: setup-job
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make setup
- name: Test with pytest
id: test
run: |
make test
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./queue_services/entity-pay/coverage.xml
# flags: entitypay
# name: codecov-entity-pay
# fail_ci_if_error: true

build-check:
needs: setup-job
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: build to check strictness
id: build
run: |
make build-nc
business-future-effective-filings-ci:
uses: bcgov/bcregistry-sre/.github/workflows/api-ci.yaml@main
with:
app_name: "business-future-effective-filings"
working_directory: "./jobs/future-effective-filings"
codecov_flag: "futureeffective"
76 changes: 7 additions & 69 deletions .github/workflows/business-update-colin-filings-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,17 @@ on:
types: [assigned, synchronize]
paths:
- "jobs/update-colin-filings/**"
workflow_dispatch:

defaults:
run:
shell: bash
working-directory: ./jobs/update-colin-filings

jobs:
setup-job:
runs-on: ubuntu-20.04

if: github.repository == 'bcgov/lear'

steps:
- uses: actions/checkout@v3
- run: "true"

linting:
needs: setup-job
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make setup
- name: Lint with pylint
id: pylint
run: |
make pylint
- name: Lint with flake8
id: flake8
run: |
make flake8
testing:
needs: setup-job
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make setup
- name: Test with pytest
id: test
run: |
make test
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./queue_services/entity-pay/coverage.xml
# flags: entitypay
# name: codecov-entity-pay
# fail_ci_if_error: true

build-check:
needs: setup-job
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: build to check strictness
id: build
run: |
make build-nc
business-update-colin-filings-ci:
uses: bcgov/bcregistry-sre/.github/workflows/api-ci.yaml@main
with:
app_name: "business-future-effective-filings"
working_directory: "./jobs/update-colin-filings"
codecov_flag: "updatecolin"
6 changes: 2 additions & 4 deletions jobs/email-reminder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ google-auth = "^2.21.0"
google-cloud-pubsub = "^2.17.1"
pg8000 = "^1.29.8"

[tool.poetry.group.test.dependencies]
[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-mock = "^3.11.1"
black = "^23.3.0"

[tool.poetry.group.dev.dependencies]
requests-mock = "^1.11.0"
black = "^23.12.1"
pylint = "^3.0.3"
bandit = "^1.7.6"
Expand Down
11 changes: 3 additions & 8 deletions jobs/future-effective-filings/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

from dotenv import find_dotenv, load_dotenv


# this will load all the envars from a .env file located in the project root (api)
load_dotenv(find_dotenv())

Expand All @@ -55,7 +54,7 @@
}


class Config(object): # pylint: disable=too-few-public-methods
class Config(): # pylint: disable=too-few-public-methods
"""Base class configuration that should set reasonable defaults for all the other configurations."""

PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -68,12 +67,8 @@ class Config(object): # pylint: disable=too-few-public-methods

GCP_AUTH_KEY = os.getenv("GCP_AUTH_KEY", None)
ENTITY_FILER_TOPIC = os.getenv("ENTITY_FILER_TOPIC", "filer")
AUDIENCE = os.getenv(
"AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Subscriber"
)
PUBLISHER_AUDIENCE = os.getenv(
"PUBLISHER_AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Publisher"
)
AUDIENCE = os.getenv("AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Subscriber")
PUBLISHER_AUDIENCE = os.getenv("PUBLISHER_AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Publisher")

# API Endpoints
BUSINESS_API_URL = os.getenv("BUSINESS_API_URL", "")
Expand Down
Loading

0 comments on commit 9e70d1d

Please sign in to comment.