Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions api/namex/services/payment/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from decimal import Decimal

from pydantic.dataclasses import dataclass as pydantic_dataclass
from pydantic import Field
from pydantic import ConfigDict, Field
from datetime import date

from .abstract import Serializable
Expand Down Expand Up @@ -122,21 +122,18 @@ class PaymentRequest(Serializable):
details: list = field(default_factory=PaymentDetailItem)


class PydanticConfig:
"""Pydantic config to ignore extra fields."""
extra = 'ignore'
underscore_attrs_are_private = False
_pydantic_config = ConfigDict(extra='ignore')


@pydantic_dataclass(config=PydanticConfig)
@pydantic_dataclass(config=_pydantic_config)
class PaymentRefundInvoice:
refundId: int
refundAmount: Decimal
message: str
isPartialRefund: bool


@pydantic_dataclass(config=PydanticConfig)
@pydantic_dataclass(config=_pydantic_config)
class PaymentInvoice(Serializable):
id: int
serviceFees: float
Expand Down Expand Up @@ -193,7 +190,7 @@ class Receipt(Serializable):
receiptNumber: str = ''


@pydantic_dataclass(config=PydanticConfig)
@pydantic_dataclass(config=_pydantic_config)
class ReceiptResponse(Serializable):
bcOnlineAccountNumber: Optional[str] = None
filingIdentifier: Optional[str] = None
Expand Down
4 changes: 2 additions & 2 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jinja2 = "^3.1.2"
markupSafe = "^2.1.1"
itsdangerous = "^2.1.2"
werkzeug = "^3.0.0"
protobuf = "^3.20.1"
protobuf = "^5.0.0"
marshmallow-sqlalchemy = "^0.28.1"
marshmallow = "^3.18.0"
inflect = "^6.0.0"
Expand Down Expand Up @@ -61,7 +61,7 @@ pkgutil_resolve_name = "^1.3.10"
pronouncing = "^0.2.0"
pyasn1 = "^0.4.8"
pycountry = "^22.3.5"
pydantic = "^1.10.2"
pydantic = "^2.0.0"
pyparsing = "^3.0.9"
pyrsistent = "^0.18.1"
pysolr = "^3.9.0"
Expand Down
38 changes: 19 additions & 19 deletions services/auto-analyze/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
Flask-SQLAlchemy==2.5.1
Flask==1.1.2
Hypercorn==0.11.2
Jinja2==2.11.3
MarkupSafe==1.1.1
Quart==0.10.0
SQLAlchemy==1.4.11
Werkzeug==1.0.1
aiofiles==0.7.0
blinker==1.4
Flask-SQLAlchemy==3.1.1
Flask==3.1.0
Hypercorn==0.17.3
Jinja2==3.1.4
MarkupSafe==2.1.5
Quart==0.19.6
SQLAlchemy==2.0.36
Werkzeug==3.0.6
aiofiles==24.1.0
blinker==1.9.0
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
flask-marshmallow==0.14.0
greenlet==1.0.0
h11==0.12.0
click==8.1.7
flask-marshmallow==1.1.0
greenlet==3.1.1
h11==0.14.0
h2==4.0.0
hpack==4.0.0
hyperframe==6.0.1
idna==2.10
inflect==5.3.0
itsdangerous==1.1.0
itsdangerous==2.2.0
joblib==1.0.1
jsonpickle==2.0.0
lxml==4.6.3
marshmallow-sqlalchemy==0.24.3
marshmallow-sqlalchemy==1.1.0
marshmallow==3.11.1
nltk==3.6.2
numpy==1.20.2
pandas==1.2.4
priority==1.3.0
priority==2.0.0
pysolr==3.9.0
python-dateutil==2.8.1
pytz==2021.1
Expand All @@ -38,7 +38,7 @@ six==1.15.0
toml==0.10.2
tqdm==4.60.0
urllib3==1.26.4
wsproto==1.0.0
wsproto==1.2.0
git+https://github.com/bcgov/namex.git#egg=namex&subdirectory=api
git+https://github.com/bcgov/namex-synonyms-api-py-client.git#egg=swagger_client
git+https://github.com/bcgov/namex-payment-api-py-client.git@dev#egg=openapi_client
git+https://github.com/bcgov/namex-payment-api-py-client.git@dev#egg=openapi_client
4 changes: 0 additions & 4 deletions services/auto-analyze/src/auto_analyze/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""The service that analyzes an array of names."""
# This is important as this will add modules purporting to be Flask modules for later use by the extension.
# Without this, Flask-SQLAlchemy may not work!
# Thanks!
import asyncio
import os

import config # pylint: disable=wrong-import-order; # noqa: I001
import quart.flask_patch
from namex import models
from namex.models import db, ma
from namex.services.name_request.auto_analyse.protected_name_analysis import ProtectedNameAnalysisService
Expand Down