diff --git a/queue_services/business-filer/devops/vaults.gcp.env b/queue_services/business-filer/devops/vaults.gcp.env index ec9ee1487a..d0b50bf6e6 100644 --- a/queue_services/business-filer/devops/vaults.gcp.env +++ b/queue_services/business-filer/devops/vaults.gcp.env @@ -37,6 +37,7 @@ SUB_SERVICE_ACCOUNT="op://gcp-queue/$APP_ENV/a083gt/BUSINESS_SERVICE_ACCOUNT" BUSINESS_EVENTS_TOPIC="op://gcp-queue/$APP_ENV/topics/BUSINESS_EVENTS_TOPIC" BUSINESS_MAILER_TOPIC="op://gcp-queue/$APP_ENV/topics/BUSINESS_EMAILER_TOPIC" BUSINESS_PAY_TOPIC="op://gcp-queue/$APP_ENV/topics/BUSINESS_PAY_TOPIC" +DOC_CREATE_REC_TOPIC="op://gcp-queue/$APP_ENV/topics/DOC_CREATE_REC_TOPIC" NAMEX_PAY_TOPIC="op://gcp-queue/$APP_ENV/topics/NAMEX_PAY_TOPIC" VPC_CONNECTOR="op://CD/$APP_ENV/base/VPC_CONNECTOR" diff --git a/queue_services/business-filer/poetry.lock b/queue_services/business-filer/poetry.lock index 21ca8e7edd..f75013e600 100644 --- a/queue_services/business-filer/poetry.lock +++ b/queue_services/business-filer/poetry.lock @@ -113,10 +113,10 @@ files = [ [[package]] name = "business-model" -version = "3.3.15" +version = "3.3.16" description = "" optional = false -python-versions = ">=3.9,<4" +python-versions = ">=3.13,<3.14" groups = ["main"] files = [] develop = true @@ -140,7 +140,7 @@ sql-versioning = {git = "https://github.com/bcgov/lear.git", rev = "main", subdi type = "git" url = "https://github.com/bcgov/lear.git" reference = "main" -resolved_reference = "787a072b4f72f3e1ff608d817aa86d5831d329d7" +resolved_reference = "7787f48bb59b52beb30466ab120ecffa95d0d81b" subdirectory = "python/common/business-registry-model" [[package]] @@ -409,11 +409,116 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["main", "dev"] +markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "platform_system == \"Windows\"", dev = "platform_system == \"Windows\" or sys_platform == \"win32\""} + +[[package]] +name = "coverage" +version = "7.13.2" +description = "Code coverage measurement for Python" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "coverage-7.13.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f4af3b01763909f477ea17c962e2cca8f39b350a4e46e3a30838b2c12e31b81b"}, + {file = "coverage-7.13.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:36393bd2841fa0b59498f75466ee9bdec4f770d3254f031f23e8fd8e140ffdd2"}, + {file = "coverage-7.13.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9cc7573518b7e2186bd229b1a0fe24a807273798832c27032c4510f47ffdb896"}, + {file = "coverage-7.13.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:ca9566769b69a5e216a4e176d54b9df88f29d750c5b78dbb899e379b4e14b30c"}, + {file = "coverage-7.13.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c9bdea644e94fd66d75a6f7e9a97bb822371e1fe7eadae2cacd50fcbc28e4dc"}, + {file = "coverage-7.13.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5bd447332ec4f45838c1ad42268ce21ca87c40deb86eabd59888859b66be22a5"}, + {file = "coverage-7.13.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7c79ad5c28a16a1277e1187cf83ea8dafdcc689a784228a7d390f19776db7c31"}, + {file = "coverage-7.13.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:76e06ccacd1fb6ada5d076ed98a8c6f66e2e6acd3df02819e2ee29fd637b76ad"}, + {file = "coverage-7.13.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:49d49e9a5e9f4dc3d3dac95278a020afa6d6bdd41f63608a76fa05a719d5b66f"}, + {file = "coverage-7.13.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ed2bce0e7bfa53f7b0b01c722da289ef6ad4c18ebd52b1f93704c21f116360c8"}, + {file = "coverage-7.13.2-cp310-cp310-win32.whl", hash = "sha256:1574983178b35b9af4db4a9f7328a18a14a0a0ce76ffaa1c1bacb4cc82089a7c"}, + {file = "coverage-7.13.2-cp310-cp310-win_amd64.whl", hash = "sha256:a360a8baeb038928ceb996f5623a4cd508728f8f13e08d4e96ce161702f3dd99"}, + {file = "coverage-7.13.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:060ebf6f2c51aff5ba38e1f43a2095e087389b1c69d559fde6049a4b0001320e"}, + {file = "coverage-7.13.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1ea8ca9db5e7469cd364552985e15911548ea5b69c48a17291f0cac70484b2e"}, + {file = "coverage-7.13.2-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:b780090d15fd58f07cf2011943e25a5f0c1c894384b13a216b6c86c8a8a7c508"}, + {file = "coverage-7.13.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:88a800258d83acb803c38175b4495d293656d5fac48659c953c18e5f539a274b"}, + {file = "coverage-7.13.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6326e18e9a553e674d948536a04a80d850a5eeefe2aae2e6d7cf05d54046c01b"}, + {file = "coverage-7.13.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:59562de3f797979e1ff07c587e2ac36ba60ca59d16c211eceaa579c266c5022f"}, + {file = "coverage-7.13.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:27ba1ed6f66b0e2d61bfa78874dffd4f8c3a12f8e2b5410e515ab345ba7bc9c3"}, + {file = "coverage-7.13.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8be48da4d47cc68754ce643ea50b3234557cbefe47c2f120495e7bd0a2756f2b"}, + {file = "coverage-7.13.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:2a47a4223d3361b91176aedd9d4e05844ca67d7188456227b6bf5e436630c9a1"}, + {file = "coverage-7.13.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c6f141b468740197d6bd38f2b26ade124363228cc3f9858bd9924ab059e00059"}, + {file = "coverage-7.13.2-cp311-cp311-win32.whl", hash = "sha256:89567798404af067604246e01a49ef907d112edf2b75ef814b1364d5ce267031"}, + {file = "coverage-7.13.2-cp311-cp311-win_amd64.whl", hash = "sha256:21dd57941804ae2ac7e921771a5e21bbf9aabec317a041d164853ad0a96ce31e"}, + {file = "coverage-7.13.2-cp311-cp311-win_arm64.whl", hash = "sha256:10758e0586c134a0bafa28f2d37dd2cdb5e4a90de25c0fc0c77dabbad46eca28"}, + {file = "coverage-7.13.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f106b2af193f965d0d3234f3f83fc35278c7fb935dfbde56ae2da3dd2c03b84d"}, + {file = "coverage-7.13.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:78f45d21dc4d5d6bd29323f0320089ef7eae16e4bef712dff79d184fa7330af3"}, + {file = "coverage-7.13.2-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:fae91dfecd816444c74531a9c3d6ded17a504767e97aa674d44f638107265b99"}, + {file = "coverage-7.13.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:264657171406c114787b441484de620e03d8f7202f113d62fcd3d9688baa3e6f"}, + {file = "coverage-7.13.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae47d8dcd3ded0155afbb59c62bd8ab07ea0fd4902e1c40567439e6db9dcaf2f"}, + {file = "coverage-7.13.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8a0b33e9fd838220b007ce8f299114d406c1e8edb21336af4c97a26ecfd185aa"}, + {file = "coverage-7.13.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b3becbea7f3ce9a2d4d430f223ec15888e4deb31395840a79e916368d6004cce"}, + {file = "coverage-7.13.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f819c727a6e6eeb8711e4ce63d78c620f69630a2e9d53bc95ca5379f57b6ba94"}, + {file = "coverage-7.13.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:4f7b71757a3ab19f7ba286e04c181004c1d61be921795ee8ba6970fd0ec91da5"}, + {file = "coverage-7.13.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b7fc50d2afd2e6b4f6f2f403b70103d280a8e0cb35320cbbe6debcda02a1030b"}, + {file = "coverage-7.13.2-cp312-cp312-win32.whl", hash = "sha256:292250282cf9bcf206b543d7608bda17ca6fc151f4cbae949fc7e115112fbd41"}, + {file = "coverage-7.13.2-cp312-cp312-win_amd64.whl", hash = "sha256:eeea10169fac01549a7921d27a3e517194ae254b542102267bef7a93ed38c40e"}, + {file = "coverage-7.13.2-cp312-cp312-win_arm64.whl", hash = "sha256:2a5b567f0b635b592c917f96b9a9cb3dbd4c320d03f4bf94e9084e494f2e8894"}, + {file = "coverage-7.13.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ed75de7d1217cf3b99365d110975f83af0528c849ef5180a12fd91b5064df9d6"}, + {file = "coverage-7.13.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:97e596de8fa9bada4d88fde64a3f4d37f1b6131e4faa32bad7808abc79887ddc"}, + {file = "coverage-7.13.2-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:68c86173562ed4413345410c9480a8d64864ac5e54a5cda236748031e094229f"}, + {file = "coverage-7.13.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7be4d613638d678b2b3773b8f687537b284d7074695a43fe2fbbfc0e31ceaed1"}, + {file = "coverage-7.13.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d7f63ce526a96acd0e16c4af8b50b64334239550402fb1607ce6a584a6d62ce9"}, + {file = "coverage-7.13.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:406821f37f864f968e29ac14c3fccae0fec9fdeba48327f0341decf4daf92d7c"}, + {file = "coverage-7.13.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ee68e5a4e3e5443623406b905db447dceddffee0dceb39f4e0cd9ec2a35004b5"}, + {file = "coverage-7.13.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2ee0e58cca0c17dd9c6c1cdde02bb705c7b3fbfa5f3b0b5afeda20d4ebff8ef4"}, + {file = "coverage-7.13.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:6e5bbb5018bf76a56aabdb64246b5288d5ae1b7d0dd4d0534fe86df2c2992d1c"}, + {file = "coverage-7.13.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a55516c68ef3e08e134e818d5e308ffa6b1337cc8b092b69b24287bf07d38e31"}, + {file = "coverage-7.13.2-cp313-cp313-win32.whl", hash = "sha256:5b20211c47a8abf4abc3319d8ce2464864fa9f30c5fcaf958a3eed92f4f1fef8"}, + {file = "coverage-7.13.2-cp313-cp313-win_amd64.whl", hash = "sha256:14f500232e521201cf031549fb1ebdfc0a40f401cf519157f76c397e586c3beb"}, + {file = "coverage-7.13.2-cp313-cp313-win_arm64.whl", hash = "sha256:9779310cb5a9778a60c899f075a8514c89fa6d10131445c2207fc893e0b14557"}, + {file = "coverage-7.13.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:e64fa5a1e41ce5df6b547cbc3d3699381c9e2c2c369c67837e716ed0f549d48e"}, + {file = "coverage-7.13.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b01899e82a04085b6561eb233fd688474f57455e8ad35cd82286463ba06332b7"}, + {file = "coverage-7.13.2-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:838943bea48be0e2768b0cf7819544cdedc1bbb2f28427eabb6eb8c9eb2285d3"}, + {file = "coverage-7.13.2-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:93d1d25ec2b27e90bcfef7012992d1f5121b51161b8bffcda756a816cf13c2c3"}, + {file = "coverage-7.13.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93b57142f9621b0d12349c43fc7741fe578e4bc914c1e5a54142856cfc0bf421"}, + {file = "coverage-7.13.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f06799ae1bdfff7ccb8665d75f8291c69110ba9585253de254688aa8a1ccc6c5"}, + {file = "coverage-7.13.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:7f9405ab4f81d490811b1d91c7a20361135a2df4c170e7f0b747a794da5b7f23"}, + {file = "coverage-7.13.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:f9ab1d5b86f8fbc97a5b3cd6280a3fd85fef3b028689d8a2c00918f0d82c728c"}, + {file = "coverage-7.13.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:f674f59712d67e841525b99e5e2b595250e39b529c3bda14764e4f625a3fa01f"}, + {file = "coverage-7.13.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c6cadac7b8ace1ba9144feb1ae3cb787a6065ba6d23ffc59a934b16406c26573"}, + {file = "coverage-7.13.2-cp313-cp313t-win32.whl", hash = "sha256:14ae4146465f8e6e6253eba0cccd57423e598a4cb925958b240c805300918343"}, + {file = "coverage-7.13.2-cp313-cp313t-win_amd64.whl", hash = "sha256:9074896edd705a05769e3de0eac0a8388484b503b68863dd06d5e473f874fd47"}, + {file = "coverage-7.13.2-cp313-cp313t-win_arm64.whl", hash = "sha256:69e526e14f3f854eda573d3cf40cffd29a1a91c684743d904c33dbdcd0e0f3e7"}, + {file = "coverage-7.13.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:387a825f43d680e7310e6f325b2167dd093bc8ffd933b83e9aa0983cf6e0a2ef"}, + {file = "coverage-7.13.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:f0d7fea9d8e5d778cd5a9e8fc38308ad688f02040e883cdc13311ef2748cb40f"}, + {file = "coverage-7.13.2-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e080afb413be106c95c4ee96b4fffdc9e2fa56a8bbf90b5c0918e5c4449412f5"}, + {file = "coverage-7.13.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a7fc042ba3c7ce25b8a9f097eb0f32a5ce1ccdb639d9eec114e26def98e1f8a4"}, + {file = "coverage-7.13.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d0ba505e021557f7f8173ee8cd6b926373d8653e5ff7581ae2efce1b11ef4c27"}, + {file = "coverage-7.13.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7de326f80e3451bd5cc7239ab46c73ddb658fe0b7649476bc7413572d36cd548"}, + {file = "coverage-7.13.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:abaea04f1e7e34841d4a7b343904a3f59481f62f9df39e2cd399d69a187a9660"}, + {file = "coverage-7.13.2-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:9f93959ee0c604bccd8e0697be21de0887b1f73efcc3aa73a3ec0fd13feace92"}, + {file = "coverage-7.13.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:13fe81ead04e34e105bf1b3c9f9cdf32ce31736ee5d90a8d2de02b9d3e1bcb82"}, + {file = "coverage-7.13.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d6d16b0f71120e365741bca2cb473ca6fe38930bc5431c5e850ba949f708f892"}, + {file = "coverage-7.13.2-cp314-cp314-win32.whl", hash = "sha256:9b2f4714bb7d99ba3790ee095b3b4ac94767e1347fe424278a0b10acb3ff04fe"}, + {file = "coverage-7.13.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4121a90823a063d717a96e0a0529c727fb31ea889369a0ee3ec00ed99bf6859"}, + {file = "coverage-7.13.2-cp314-cp314-win_arm64.whl", hash = "sha256:6873f0271b4a15a33e7590f338d823f6f66f91ed147a03938d7ce26efd04eee6"}, + {file = "coverage-7.13.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:f61d349f5b7cd95c34017f1927ee379bfbe9884300d74e07cf630ccf7a610c1b"}, + {file = "coverage-7.13.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a43d34ce714f4ca674c0d90beb760eb05aad906f2c47580ccee9da8fe8bfb417"}, + {file = "coverage-7.13.2-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bff1b04cb9d4900ce5c56c4942f047dc7efe57e2608cb7c3c8936e9970ccdbee"}, + {file = "coverage-7.13.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6ae99e4560963ad8e163e819e5d77d413d331fd00566c1e0856aa252303552c1"}, + {file = "coverage-7.13.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e79a8c7d461820257d9aa43716c4efc55366d7b292e46b5b37165be1d377405d"}, + {file = "coverage-7.13.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:060ee84f6a769d40c492711911a76811b4befb6fba50abb450371abb720f5bd6"}, + {file = "coverage-7.13.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3bca209d001fd03ea2d978f8a4985093240a355c93078aee3f799852c23f561a"}, + {file = "coverage-7.13.2-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:6b8092aa38d72f091db61ef83cb66076f18f02da3e1a75039a4f218629600e04"}, + {file = "coverage-7.13.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:4a3158dc2dcce5200d91ec28cd315c999eebff355437d2765840555d765a6e5f"}, + {file = "coverage-7.13.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3973f353b2d70bd9796cc12f532a05945232ccae966456c8ed7034cb96bbfd6f"}, + {file = "coverage-7.13.2-cp314-cp314t-win32.whl", hash = "sha256:79f6506a678a59d4ded048dc72f1859ebede8ec2b9a2d509ebe161f01c2879d3"}, + {file = "coverage-7.13.2-cp314-cp314t-win_amd64.whl", hash = "sha256:196bfeabdccc5a020a57d5a368c681e3a6ceb0447d153aeccc1ab4d70a5032ba"}, + {file = "coverage-7.13.2-cp314-cp314t-win_arm64.whl", hash = "sha256:69269ab58783e090bfbf5b916ab3d188126e22d6070bbfc93098fdd474ef937c"}, + {file = "coverage-7.13.2-py3-none-any.whl", hash = "sha256:40ce1ea1e25125556d8e76bd0b61500839a07944cc287ac21d5626f3e620cad5"}, + {file = "coverage-7.13.2.tar.gz", hash = "sha256:044c6951ec37146b72a50cc81ef02217d27d4c3640efd2640311393cbbf143d3"}, +] + +[package.extras] +toml = ["tomli ; python_full_version <= \"3.11.0a6\""] [[package]] name = "croniter" @@ -892,7 +997,7 @@ description = "Lightweight in-process concurrent programming" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")" +markers = "platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\"" files = [ {file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"}, {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"}, @@ -1172,7 +1277,7 @@ version = "2.1.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["main", "dev"] files = [ {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, @@ -1495,7 +1600,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["main", "dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1868,7 +1973,7 @@ version = "8.3.5" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["main", "dev"] files = [ {file = "pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820"}, {file = "pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845"}, @@ -1883,6 +1988,26 @@ pluggy = ">=1.5,<2" [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +[[package]] +name = "pytest-cov" +version = "7.0.0" +description = "Pytest plugin for measuring coverage." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pytest_cov-7.0.0-py3-none-any.whl", hash = "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861"}, + {file = "pytest_cov-7.0.0.tar.gz", hash = "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1"}, +] + +[package.dependencies] +coverage = {version = ">=7.10.6", extras = ["toml"]} +pluggy = ">=1.2" +pytest = ">=7" + +[package.extras] +testing = ["process-tests", "pytest-xdist", "virtualenv"] + [[package]] name = "pytest-mock" version = "3.14.0" @@ -2826,5 +2951,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = ">=3.13,<4" -content-hash = "bfee9d8b300fb00272007978ab9a3528cf5fffc4a6d1beb57cb658bf19d7d309" +python-versions = ">=3.13,<3.14" +content-hash = "3d600a7fb2aa7dbf95f6c3d85998d4d88a408b09a99bffab3da8cfb125992260" diff --git a/queue_services/business-filer/pyproject.toml b/queue_services/business-filer/pyproject.toml index 527c3c29ec..b8ac94aea8 100644 --- a/queue_services/business-filer/pyproject.toml +++ b/queue_services/business-filer/pyproject.toml @@ -7,7 +7,7 @@ authors = [ ] license = {text = "BSD-3-Clause"} readme = "README.md" -requires-python = ">=3.13,<4" +requires-python = ">=3.13,<3.14" dependencies = [ "business-model @ git+https://github.com/bcgov/lear.git@main#subdirectory=python/common/business-registry-model", @@ -22,7 +22,8 @@ dependencies = [ "pg8000 (>=1.31.2,<2.0.0)", # "business-model @ file:///Users/thor/Developer/thorwolpert/ServiceBC/GCP/lear/python/common/business-registry-model", "gunicorn (>=23.0.0,<24.0.0)", - "business-registry-account @ git+https://github.com/bcgov/lear.git@main#subdirectory=python/common/business-registry-account" + "business-registry-account @ git+https://github.com/bcgov/lear.git@main#subdirectory=python/common/business-registry-account", + "pytest-cov (>=7.0.0,<8.0.0)" ] @@ -143,7 +144,7 @@ minversion = "2.0" testpaths = [ "tests", ] -## addopts = "--verbose --strict -p no:warnings --cov=src --cov-report html:htmlcov --cov-report xml:coverage.xml" +addopts = "--cov=src/business_filer" python_files = [ "test*.py" ] diff --git a/queue_services/business-filer/src/business_filer/config.py b/queue_services/business-filer/src/business_filer/config.py index cdaede7df2..0b137f77f0 100644 --- a/queue_services/business-filer/src/business_filer/config.py +++ b/queue_services/business-filer/src/business_filer/config.py @@ -80,6 +80,7 @@ class _Config: # pylint: disable=too-few-public-methods BUSINESS_EVENTS_TOPIC = os.getenv("BUSINESS_EVENTS_TOPIC", "business-event-dev") BUSINESS_MAILER_TOPIC = os.getenv("BUSINESS_MAILER_TOPIC", "business-mailer-dev") BUSINESS_PAY_TOPIC = os.getenv("BUSINESS_PAY_TOPIC", "business-pay-dev") + DOC_CREATE_REC_TOPIC = os.getenv("DOC_CREATE_REC_TOPIC") NAMEX_PAY_TOPIC = os.getenv("NAMEX_PAY_TOPIC", "namex-pay-dev") SUB_AUDIENCE = os.getenv("SUB_AUDIENCE", "") SUB_SERVICE_ACCOUNT = os.getenv("SUB_SERVICE_ACCOUNT", "") @@ -117,6 +118,9 @@ class TestConfig(_Config): # pylint: disable=too-few-public-methods SUB_AUDIENCE = os.getenv("SUB_AUDIENCE", "test@test.test") SUB_SERVICE_ACCOUNT = os.getenv("SUB_SERVICE_ACCOUNT", "test@test.test") + + # Faked out publishing + DOC_CREATE_REC_TOPIC = os.getenv("TEST_DOC_CREATE_REC_TOPIC", "fake-doc-create-rec-topic") class ProdConfig(_Config): # pylint: disable=too-few-public-methods diff --git a/queue_services/business-filer/src/business_filer/filing_processors/change_of_liquidators.py b/queue_services/business-filer/src/business_filer/filing_processors/change_of_liquidators.py index aeffec6243..57431240bd 100644 --- a/queue_services/business-filer/src/business_filer/filing_processors/change_of_liquidators.py +++ b/queue_services/business-filer/src/business_filer/filing_processors/change_of_liquidators.py @@ -35,6 +35,7 @@ import copy from business_model.models import Business, Filing, PartyRole +from flask import current_app from business_filer.filing_meta import FilingMeta from business_filer.filing_processors.filing_components.filings import update_filing_court_order @@ -44,6 +45,7 @@ create_relationships, update_relationship_addresses, ) +from business_filer.services.publish_event import PublishEvent def process(business: Business, filing_rec: Filing, filing_meta: FilingMeta): @@ -75,4 +77,10 @@ def process(business: Business, filing_rec: Filing, filing_meta: FilingMeta): if court_order := filing_json["filing"]["changeOfLiquidators"].get("courtOrder"): update_filing_court_order(filing_rec, court_order) - # FUTURE: DRS integration with document id \ No newline at end of file + try: + # Create DRS record + PublishEvent.publish_drs_create_message(current_app, business, filing_rec) + except Exception as err: + # log error for ops, but don't prevent filing from completing + current_app.logger.warning(err.with_traceback(None)) + current_app.logger.warning(f"Failed to create DRS Record for {filing_rec.id}.") \ No newline at end of file diff --git a/queue_services/business-filer/src/business_filer/filing_processors/change_of_receivers.py b/queue_services/business-filer/src/business_filer/filing_processors/change_of_receivers.py index dd667a17ed..6785e45a6c 100644 --- a/queue_services/business-filer/src/business_filer/filing_processors/change_of_receivers.py +++ b/queue_services/business-filer/src/business_filer/filing_processors/change_of_receivers.py @@ -35,6 +35,7 @@ import copy from business_model.models import Business, Filing, PartyRole +from flask import current_app from business_filer.filing_meta import FilingMeta from business_filer.filing_processors.filing_components.filings import update_filing_court_order @@ -44,6 +45,7 @@ update_relationship_addresses, update_relationship_entity_info, ) +from business_filer.services.publish_event import PublishEvent def process(business: Business, filing_rec: Filing, filing_meta: FilingMeta): @@ -69,4 +71,11 @@ def process(business: Business, filing_rec: Filing, filing_meta: FilingMeta): if court_order := filing_json["filing"]["changeOfReceivers"].get("courtOrder"): update_filing_court_order(filing_rec, court_order) - # FUTURE: DRS integration with document id \ No newline at end of file + try: + # Create DRS record + PublishEvent.publish_drs_create_message(current_app, business, filing_rec) + + except Exception as err: + # log error for ops, but don't prevent filing from completing + current_app.logger.warning(err.with_traceback(None)) + current_app.logger.warning(f"Failed to create DRS Record for {filing_rec.id}.") \ No newline at end of file diff --git a/queue_services/business-filer/src/business_filer/services/publish_event.py b/queue_services/business-filer/src/business_filer/services/publish_event.py index ea19d5c357..b95b1ba804 100644 --- a/queue_services/business-filer/src/business_filer/services/publish_event.py +++ b/queue_services/business-filer/src/business_filer/services/publish_event.py @@ -56,6 +56,27 @@ def publish_event(app: Flask, business: Business, filing: Filing): except Exception as err: # pylint: disable=broad-except; raise PublishException(err) from err + + @staticmethod + def publish_drs_create_message(app: Flask, business: Business, filing: Filing): + """Publish the drs create record message.""" + try: + subject = app.config.get("DOC_CREATE_REC_TOPIC") + document_id = filing.filing_json["filing"][filing.filing_type].get("documentId", "") + data = { + "accountId": "business-api", + "consumerDocumentId": document_id, + "consumerIdentifier": business.identifier, + "consumerFilingType": filing.filing_type, + "consumerReferenceId": str(filing.id), + "documentClass": "CORP" + } + + ce = PublishEvent._create_cloud_event(app, business, filing, subject, data) + gcp_queue.publish(subject, to_queue_message(ce)) + + except Exception as err: # pylint: disable=broad-except; + raise PublishException(err) from err @staticmethod def publish_mras_email(app: Flask, business: Business, filing: Filing): diff --git a/queue_services/business-filer/tests/unit/test_filer/__init__.py b/queue_services/business-filer/tests/unit/test_filer/__init__.py index 1f47cb6a56..f204ae11ce 100644 --- a/queue_services/business-filer/tests/unit/test_filer/__init__.py +++ b/queue_services/business-filer/tests/unit/test_filer/__init__.py @@ -32,3 +32,21 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. """The Unit Tests for the Worker.""" +import json +from flask import Flask +from unittest.mock import MagicMock + +from business_model.models import Business, Filing + +def check_drs_publish(mock_publish: MagicMock, app: Flask, business: Business, filing: Filing, document_id: str): + """Assert the drs publish was triggered with the expected values.""" + assert mock_publish.call_count == 1 + subject, payload = mock_publish.call_args.args + assert subject == app.config["DOC_CREATE_REC_TOPIC"] + payload_data = (json.loads(payload)).get('data') + assert payload_data.get('accountId') == 'business-api' + assert payload_data.get('consumerDocumentId') == document_id + assert payload_data.get('consumerFilingType') == filing.filing_type + assert payload_data.get('consumerIdentifier') == business.identifier + assert payload_data.get('consumerReferenceId') == str(filing.id) + assert payload_data.get('documentClass') == 'CORP' diff --git a/queue_services/business-filer/tests/unit/test_filer/test_change_of_liquidators.py b/queue_services/business-filer/tests/unit/test_filer/test_change_of_liquidators.py index 485b7aa3ff..03c3741aae 100644 --- a/queue_services/business-filer/tests/unit/test_filer/test_change_of_liquidators.py +++ b/queue_services/business-filer/tests/unit/test_filer/test_change_of_liquidators.py @@ -42,11 +42,9 @@ from business_filer.common.filing_message import FilingMessage from business_filer.services.filer import process_filing -from tests.unit import ( - create_business, - create_filing -) +from tests.unit import create_business, create_filing from tests.unit.filing_processors.filing_components.test_offices import LIQUIDATION_RECORDS_OFFICE +from tests.unit.test_filer import check_drs_publish CHANGE_OF_LIQUIDATORS_INTENT = { 'type': 'intentToLiquidate', @@ -109,12 +107,12 @@ } -def test_process_col_filing(app, session): +def test_process_col_filing(app, session, mocker): """Assert that all COL filings can be applied to the model correctly.""" payment_id = str(random.SystemRandom().getrandbits(0x58)) effective_date = datetime(2023, 10, 10, 10, 0, 0, tzinfo=timezone.utc) identifier = f'BC{random.randint(1000000, 9999999)}' - + drs_publish_mock = mocker.patch('business_filer.services.gcp_queue.publish', return_value=None) business = create_business(identifier) @@ -144,6 +142,8 @@ def test_process_col_filing(app, session): assert intent_filing.business_id == business.id assert intent_filing.status == Filing.Status.COMPLETED.value assert business.in_liquidation == True + check_drs_publish(drs_publish_mock, app, business, intent_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() assert len(party_roles) == 2 @@ -211,6 +211,8 @@ def test_process_col_filing(app, session): assert cease_filing.transaction_id assert cease_filing.business_id == business.id assert cease_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, cease_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() assert len(party_roles) == 2 @@ -287,6 +289,8 @@ def test_process_col_filing(app, session): assert change_address_filing.transaction_id assert change_address_filing.business_id == business.id assert change_address_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, change_address_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() @@ -346,8 +350,10 @@ def test_process_col_filing(app, session): } ] } + new_document_id = '12345677' filing['filing']['changeOfLiquidators'] = { 'type': 'appointLiquidator', + 'documentId': new_document_id, 'relationships': [ new_relationship ] @@ -372,6 +378,8 @@ def test_process_col_filing(app, session): assert appoint_filing.transaction_id assert appoint_filing.business_id == business.id assert appoint_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, appoint_filing, new_document_id) + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() diff --git a/queue_services/business-filer/tests/unit/test_filer/test_change_of_receivers.py b/queue_services/business-filer/tests/unit/test_filer/test_change_of_receivers.py index cb45e63a4a..e3882549e0 100644 --- a/queue_services/business-filer/tests/unit/test_filer/test_change_of_receivers.py +++ b/queue_services/business-filer/tests/unit/test_filer/test_change_of_receivers.py @@ -40,12 +40,10 @@ from business_model.models import Address, Business, Filing, PartyRole, Party from registry_schemas.example_data import FILING_TEMPLATE -from business_filer.services.filer import process_filing -from tests.unit import ( - create_business, - create_filing -) from business_filer.common.filing_message import FilingMessage +from business_filer.services.filer import process_filing +from tests.unit import create_business, create_filing +from tests.unit.test_filer import check_drs_publish CHANGE_OF_RECEIVERS_APPOINT = { 'type': 'appointReceiver', @@ -157,12 +155,12 @@ } -def test_process_cor_filing(app, session): +def test_process_cor_filing(app, session, mocker): """Assert that all COR filings can be applied to the model correctly.""" payment_id = str(random.SystemRandom().getrandbits(0x58)) effective_date = datetime(2023, 10, 10, 10, 0, 0, tzinfo=timezone.utc) identifier = f'BC{random.randint(1000000, 9999999)}' - + drs_publish_mock = mocker.patch('business_filer.services.gcp_queue.publish', return_value=None) business = create_business(identifier) @@ -191,6 +189,8 @@ def test_process_cor_filing(app, session): assert appoint_filing.transaction_id assert appoint_filing.business_id == business.id assert appoint_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, appoint_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() assert len(party_roles) == 4 @@ -244,6 +244,8 @@ def test_process_cor_filing(app, session): assert cease_filing.transaction_id assert cease_filing.business_id == business.id assert cease_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, cease_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() @@ -308,6 +310,8 @@ def test_process_cor_filing(app, session): assert change_address_filing.transaction_id assert change_address_filing.business_id == business.id assert change_address_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, change_address_filing, '') + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all() @@ -368,7 +372,9 @@ def test_process_cor_filing(app, session): } ] } + expected_document_id = '12345678' filing['filing']['changeOfReceivers'] = { + 'documentId': expected_document_id, 'type': 'amendReceiver', 'relationships': [ { @@ -415,6 +421,8 @@ def test_process_cor_filing(app, session): assert amend_filing.transaction_id assert amend_filing.business_id == business.id assert amend_filing.status == Filing.Status.COMPLETED.value + check_drs_publish(drs_publish_mock, app, business, amend_filing, expected_document_id) + drs_publish_mock.reset_mock() party_roles: list[PartyRole] = business.party_roles.all()