Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kzdev420/lear into 21208_up…
Browse files Browse the repository at this point in the history
…date_AR_filing_to_withdraw_business_in_dissolution
  • Loading branch information
kzdev420 committed Jun 24, 2024
2 parents 6b89cf1 + a4b57b7 commit dd96a02
Show file tree
Hide file tree
Showing 84 changed files with 2,122 additions and 263 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/colin-api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./colin-api/coverage.xml
flags: colinapi
name: codecov-colin-api
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/entity-bn-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./queue_services/entity-bn/coverage.xml
flags: entitybn
name: codecov-entity-bn
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/entity-digital-credentials-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./queue_services/entity-digital-credentials/coverage.xml
flags: entity-digital-credentials
name: codecov-entity-digital-credentials
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/entity-emailer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./queue_services/entity-emailer/coverage.xml
flags: entityemailer
name: codecov-entity-emailer
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/entity-filer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

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

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -72,10 +72,15 @@ jobs:
ACCOUNT_SVC_AUTH_URL: https://mock_account_svc_auth_url
ACCOUNT_SVC_CLIENT_ID: account_svc_client_id
ACCOUNT_SVC_CLIENT_SECRET: account_svc_client_secret
BUSINESS_EVENTS_TOPIC: projects/project-id/topics/test


runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [3.9.19]

services:
postgres:
image: postgres:12
Expand All @@ -102,11 +107,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./queue_services/entity-filer/coverage.xml
flags: entityfiler
name: codecov-entity-filer
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/entity-pay-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ jobs:
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./queue_services/entity-pay/coverage.xml
flags: entitypay
name: codecov-entity-pay
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/furnishings-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ jobs:
id: test
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./jobs/furnishings/coverage.xml
flags: furnishings
name: codecov-furnishings
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
needs: setup-job
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/involuntary-dissolutions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ jobs:
id: test
run: |
make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./jobs/involuntary-dissolutions/coverage.xml
flags: involuntary-dissolutions
name: codecov-involuntary-dissolutions
token: ${{ secrets.CODECOV_TOKEN}}
fail_ci_if_error: true

build-check:
needs: setup-job
Expand All @@ -98,4 +106,4 @@ jobs:
- name: build to check strictness
id: build
run: |
make build-nc
make build-nc
21 changes: 18 additions & 3 deletions codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ coverage:
- entityemailer
- entityfiler
- entitypay
- datareset
- entitybn
- entity-digital-credentials
- furnishings
- involuntary-dissolutions

ignore:
- "^/tests/**/*" # ignore test harness code
Expand Down Expand Up @@ -57,7 +60,19 @@ flags:
paths:
- queue_services/entity-pay/src/entity_pay
carryforward: true
datareset:
entitybn:
paths:
- data-reset-tool/src/data_reset_tool
- queue_services/entity-bn/src/entity_bn
carryforward: true
entity-digital-credentials:
paths:
- queue_services/entity-digital-credentials/src/entity_digital_credentials
carryforward: true
furnishings:
paths:
- jobs/furnishings
carryforward: true
involuntary-dissolutions:
paths:
- jobs/involuntary-dissolutions
carryforward: true
3 changes: 1 addition & 2 deletions colin-api/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,11 @@ good-names=

[pylint]
ignore=migrations,test
max_line_length=120
notes=FIXME,XXX,TODO
ignored-modules=flask_sqlalchemy,sqlalchemy,SQLAlchemy,alembic,scoped_session
ignored-classes=scoped_session
min-similarity-lines=100
disable=C0301,W0511,R0801,R0902A,E1136
disable=C0301,W0511,R0801,R0902,E1136

[isort]
line_length = 120
Expand Down
2 changes: 1 addition & 1 deletion colin-api/src/colin_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import sentry_sdk # noqa: I001; pylint: disable=ungrouped-imports; conflicts with Flake8

from flask import Flask
from colin_api.services import flags
from sentry_sdk.integrations.flask import FlaskIntegration # noqa: I001

from colin_api import config, errorhandlers
from colin_api.resources import API, API_BLUEPRINT, OPS_BLUEPRINT
from colin_api.services import flags
from colin_api.utils.auth import jwt
from colin_api.utils.logging import setup_logging
from colin_api.utils.run_version import get_run_version
Expand Down
22 changes: 11 additions & 11 deletions colin-api/src/colin_api/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GenericException(Exception):

def __init__(self, error, status_code, *args, **kwargs):
"""Return a valid GenericException."""
super(GenericException, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.error = error
self.status_code = status_code

Expand All @@ -33,7 +33,7 @@ class BusinessNotFoundException(GenericException):

def __init__(self, *args, identifier=None, **kwargs):
"""Return a valid BusinessNotFoundException."""
super(BusinessNotFoundException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
if identifier:
self.error = f'{identifier} not found'
else:
Expand All @@ -46,7 +46,7 @@ class FilingNotFoundException(GenericException):

def __init__(self, *args, identifier: str, filing_type: str, **kwargs):
"""Return a valid FilingNotFoundException."""
super(FilingNotFoundException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
self.error = f'{filing_type} not found for {identifier}'
self.status_code = 404

Expand All @@ -56,7 +56,7 @@ class OfficeNotFoundException(GenericException):

def __init__(self, *args, identifier: str = None, **kwargs):
"""Return a valid AddressNotFoundException."""
super(OfficeNotFoundException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
if identifier:
self.error = f'Office not found for {identifier}'
else:
Expand All @@ -69,7 +69,7 @@ class AddressNotFoundException(GenericException):

def __init__(self, *args, address_id, **kwargs):
"""Return a valid AddressNotFoundException."""
super(AddressNotFoundException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
if address_id:
self.error = f'Address not found with id: {address_id}'
else:
Expand All @@ -82,7 +82,7 @@ class PartiesNotFoundException(GenericException):

def __init__(self, *args, identifier: str = None, **kwargs):
"""Return a valid PartiesNotFoundException."""
super(PartiesNotFoundException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
if identifier:
self.error = f'Parties not found for {identifier}'
else:
Expand All @@ -94,8 +94,8 @@ class NamesNotFoundException(GenericException):
"""Exception with defined error code and messaging."""

def __init__(self, *args, identifier: str = None, **kwargs):
"""Return a valid PartiesNotFoundException."""
super(NamesNotFoundException, self).__init__(None, None, *args, **kwargs)
"""Return a valid NamesNotFoundException."""
super().__init__(None, None, *args, **kwargs)
if identifier:
self.error = f'Corp names not found for {identifier}'
else:
Expand All @@ -108,7 +108,7 @@ class InvalidFilingTypeException(GenericException):

def __init__(self, *args, filing_type=None, **kwargs):
"""Return a valid InvalidFilingTypeException."""
super(InvalidFilingTypeException, self).__init__(None, None, *args, **kwargs)
super().__init__(None, None, *args, **kwargs)
if filing_type:
self.error = f'{filing_type} is an invalid filing type'
else:
Expand All @@ -120,8 +120,8 @@ class UnableToDetermineCorpTypeException(GenericException):
"""Exception with defined error code and messaging."""

def __init__(self, *args, filing_type=None, **kwargs):
"""Return a valid InvalidFilingTypeException."""
super(UnableToDetermineCorpTypeException, self).__init__(None, None, *args, **kwargs)
"""Return a valid UnableToDetermineCorpTypeException."""
super().__init__(None, None, *args, **kwargs)
if filing_type:
self.error = f'Unable to determine corp type for {filing_type} filing type'
else:
Expand Down
6 changes: 3 additions & 3 deletions colin-api/src/colin_api/models/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_by_address_id(cls, cursor, address_id: str = None) -> Optional[Address]:

except Exception as err:
current_app.logger.error(err.with_traceback(None))
raise AddressNotFoundException(address_id=address_id)
raise AddressNotFoundException(address_id=address_id) # pylint: disable=raise-missing-from

@classmethod
def create_new_address(cls, cursor, address_info: dict = None, corp_num: str = None):
Expand All @@ -153,7 +153,7 @@ def create_new_address(cls, cursor, address_info: dict = None, corp_num: str = N
UPDATE system_id
SET id_num = :new_num
WHERE id_typ_cd = 'ADD'
""", new_num=addr_id+1)
""", new_num=addr_id + 1)

country_typ_cd = pycountry.countries.search_fuzzy(address_info.get('addressCountry'))[0].alpha_2
except Exception as err:
Expand Down Expand Up @@ -225,7 +225,7 @@ def delete(cls, cursor, address_ids: list = None):

if cursor.rowcount < 1:
current_app.logger.error('Database not updated.')
raise Exception
raise Exception # pylint: disable=broad-exception-raised
return
except Exception as err:
current_app.logger.error(f'Failed to delete addresses {address_ids}')
Expand Down
Loading

0 comments on commit dd96a02

Please sign in to comment.