From baf8c2440ea398055863582ba50f6869eec82f0f Mon Sep 17 00:00:00 2001 From: Ketaki Deodhar Date: Wed, 18 Feb 2026 12:27:38 -0800 Subject: [PATCH 1/3] modify notebooks --- jobs/correction-ben-statement/.env.example | 9 + .../add_corrections_alterations.ipynb | 169 +++++++++--------- .../add_corrections_ia.ipynb | 163 ++++++++--------- .../add_registrars_notation_alteration.ipynb | 162 ++++++++--------- .../add_registrars_notation_historical.ipynb | 74 ++++---- .../add_registrars_notation_ia.ipynb | 165 ++++++++--------- 6 files changed, 380 insertions(+), 362 deletions(-) create mode 100644 jobs/correction-ben-statement/.env.example diff --git a/jobs/correction-ben-statement/.env.example b/jobs/correction-ben-statement/.env.example new file mode 100644 index 0000000000..2d2cbecb8b --- /dev/null +++ b/jobs/correction-ben-statement/.env.example @@ -0,0 +1,9 @@ +ACCOUNT_SVC_AUTH_URL= +ACCOUNT_SVC_CLIENT_ID= +ACCOUNT_SVC_CLIENT_SECRET= +LEGAL_API_BASE_URL= +ENTITY_DATABASE_USERNAME= +ENTITY_DATABASE_PASSWORD= +ENTITY_DATABASE_HOST= +ENTITY_DATABASE_NAME= +ENTITY_DATABASE_PORT= diff --git a/jobs/correction-ben-statement/add_corrections_alterations.ipynb b/jobs/correction-ben-statement/add_corrections_alterations.ipynb index 129683660c..f2d1af40fb 100644 --- a/jobs/correction-ben-statement/add_corrections_alterations.ipynb +++ b/jobs/correction-ben-statement/add_corrections_alterations.ipynb @@ -26,8 +26,7 @@ "source": [ "import os\n", "from dotenv import load_dotenv, find_dotenv\n", - "import psycopg2\n", - "import pandas as pd\n", + "from sqlalchemy import create_engine, text\n", "\n", "# this will load all the envars from a .env file located in the project root (api)\n", "load_dotenv(find_dotenv())\n", @@ -45,19 +44,11 @@ " os.getenv('ENTITY_DATABASE_USERNAME', '') + \":\" + os.getenv('ENTITY_DATABASE_PASSWORD', '') +'@' + \\\n", " os.getenv('ENTITY_DATABASE_HOST', '') + ':' + os.getenv('ENTITY_DATABASE_PORT', '5432') + '/' + \\\n", " os.getenv('ENTITY_DATABASE_NAME', '');\n", - "connect_to_db\n", - " \n", - "%sql $connect_to_db" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%%sql \n", - "select now() AT TIME ZONE 'PST' as current_date" + "engine = create_engine(connect_to_db)\n", + "\n", + "# Test connection\n", + "with engine.connect() as conn:\n", + " print(\"Connected successfully!\")" ] }, { @@ -129,76 +120,88 @@ "skipped_identifiers = []\n", "\n", "# loop through list of businesses to create filing\n", - "for identifier in businesses:\n", - " filing_details = %sql \\\n", - " SELECT f.id, f.filing_date \\\n", - " FROM businesses b \\\n", - " JOIN filings f ON b.id = f.business_id \\\n", - " WHERE f.filing_type = 'alteration' \\\n", - " AND f.meta_data->'alteration'->>'fromLegalType' IN ('BC', 'ULC', 'CC', 'C', 'CUL', 'CCC') \\\n", - " AND f.meta_data->'alteration'->>'toLegalType' IN ('BEN', 'CBEN') \\\n", - " AND b.identifier = :identifier\n", - " \n", - " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", - "\n", - " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", - " \n", - " draft_details = %sql \\\n", - " SELECT b.state, \\\n", - " (SELECT COUNT(1) \\\n", - " FROM filings f \\\n", - " WHERE f.business_id = b.id \\\n", - " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \\\n", - " FROM businesses b \\\n", - " WHERE b.identifier = :identifier\n", - " state = None\n", - " has_draft = None\n", - " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", - " \n", - " if state != 'ACTIVE' or has_draft:\n", - " skipped_identifiers.append(identifier)\n", - " continue\n", - " \n", - " correction_filing_data = {\n", - " \"filing\": {\n", - " \"header\": {\n", - " \"name\": \"correction\",\n", - " \"date\": current_date,\n", - " \"certifiedBy\": \"system\",\n", - " \"correctionBenStatement\": True,\n", - " \"waiveFees\": True\n", - " },\n", - " \"business\": {\n", - " \"identifier\": identifier,\n", - " \"legalType\": \"BEN\"\n", - " },\n", - " \"correction\": {\n", - " \"details\": \"BEN Correction statement\",\n", - " \"correctedFilingId\": filing_id,\n", - " \"correctedFilingType\": \"alteration\",\n", - " \"commentOnly\": True,\n", - " \"comment\": f\"\"\"Correction for Alteration filed on {formatted_filing_date} \\n{correction_statement}\"\"\"\n", + "with engine.connect() as conn:\n", + " for identifier in businesses:\n", + " filing_details_query = text(\"\"\"\n", + " SELECT f.id, f.filing_date \n", + " FROM businesses b \n", + " JOIN filings f ON b.id = f.business_id \n", + " WHERE f.filing_type = 'alteration' \n", + " AND f.meta_data->'alteration'->>'fromLegalType' IN ('BC', 'ULC', 'CC', 'C', 'CUL', 'CCC') \n", + " AND f.meta_data->'alteration'->>'toLegalType' IN ('BEN', 'CBEN') \n", + " AND b.identifier = :identifier\n", + " \"\"\")\n", + " filing_details_query_result = conn.execute(filing_details_query, {\"identifier\": identifier})\n", + " filing_details = filing_details_query_result.mappings().fetchone()\n", + " \n", + " if filing_details:\n", + " filing_id = filing_details[0]['id']\n", + " filing_date = filing_details[0]['filing_date']\n", + "\n", + " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", + " \n", + " draft_details_query = text(\"\"\"\n", + " SELECT b.state,\n", + " (SELECT COUNT(1)\n", + " FROM filings f\n", + " WHERE f.business_id = b.id\n", + " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft\n", + " FROM businesses b\n", + " WHERE b.identifier = :identifier\n", + " \"\"\")\n", + " \n", + " draft_details_query_result = conn.execute(draft_details_query, {\"identifier\": identifier})\n", + " draft_details = draft_details_query_result.mappings().fetchone()\n", + " \n", + " state = None\n", + " has_draft = None\n", + " if draft_details:\n", + " state = draft_details[0]['state']\n", + " has_draft = draft_details[0]['has_draft']\n", + " \n", + " if state != 'ACTIVE' or has_draft:\n", + " skipped_identifiers.append(identifier)\n", + " continue\n", + " \n", + " correction_filing_data = {\n", + " \"filing\": {\n", + " \"header\": {\n", + " \"name\": \"correction\",\n", + " \"date\": current_date,\n", + " \"certifiedBy\": \"system\",\n", + " \"correctionBenStatement\": True,\n", + " \"waiveFees\": True\n", + " },\n", + " \"business\": {\n", + " \"identifier\": identifier,\n", + " \"legalType\": \"BEN\"\n", + " },\n", + " \"correction\": {\n", + " \"details\": \"BEN Correction statement\",\n", + " \"correctedFilingId\": filing_id,\n", + " \"correctedFilingType\": \"alteration\",\n", + " \"commentOnly\": True,\n", + " \"comment\": f\"\"\"Correction for Alteration filed on {formatted_filing_date} \\n{correction_statement}\"\"\"\n", + " }\n", " }\n", " }\n", - " }\n", - "\n", - " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", - " rv = requests.post(filing_url, headers=headers, json=correction_filing_data)\n", - "\n", - " # Check the status code of the response\n", - " if rv.status_code == 201:\n", - " correction_filing_id = rv.json()[\"filing\"][\"header\"][\"filingId\"]\n", - " successful_identifiers.append(identifier)\n", - " else:\n", - " failed_identifiers.append(identifier)\n", - " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", - "print('Successfully filed Corrections for:', successful_identifiers) # Print the error message if the request fails \n", - "print('Failed to file Corrections for:', failed_identifiers) # Print the error message if the request fails\n", - "print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n" + "\n", + " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", + " rv = requests.post(filing_url, headers=headers, json=correction_filing_data)\n", + "\n", + " # Check the status code of the response\n", + " if rv.status_code == 201:\n", + " correction_filing_id = rv.json()[\"filing\"][\"header\"][\"filingId\"]\n", + " successful_identifiers.append(identifier)\n", + " else:\n", + " failed_identifiers.append(identifier)\n", + " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", + " print('Successfully filed Corrections for:', successful_identifiers) # Print the error message if the request fails \n", + " print('Failed to file Corrections for:', failed_identifiers) # Print the error message if the request fails\n", + " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n", + "\n", + "#close the engine connection\n", + "conn.close()" ] } ], diff --git a/jobs/correction-ben-statement/add_corrections_ia.ipynb b/jobs/correction-ben-statement/add_corrections_ia.ipynb index dc330cc548..9053874037 100644 --- a/jobs/correction-ben-statement/add_corrections_ia.ipynb +++ b/jobs/correction-ben-statement/add_corrections_ia.ipynb @@ -26,8 +26,7 @@ "source": [ "import os\n", "from dotenv import load_dotenv, find_dotenv\n", - "import psycopg2\n", - "import pandas as pd\n", + "from sqlalchemy import create_engine, text\n", "\n", "# this will load all the envars from a .env file located in the project root (api)\n", "load_dotenv(find_dotenv())\n", @@ -45,19 +44,11 @@ " os.getenv('ENTITY_DATABASE_USERNAME', '') + \":\" + os.getenv('ENTITY_DATABASE_PASSWORD', '') +'@' + \\\n", " os.getenv('ENTITY_DATABASE_HOST', '') + ':' + os.getenv('ENTITY_DATABASE_PORT', '5432') + '/' + \\\n", " os.getenv('ENTITY_DATABASE_NAME', '');\n", - "connect_to_db\n", - " \n", - "%sql $connect_to_db" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%%sql \n", - "select now() AT TIME ZONE 'PST' as current_date" + "engine = create_engine(connect_to_db)\n", + "\n", + "# Test connection\n", + "with engine.connect() as conn:\n", + " print(\"Connected successfully!\")" ] }, { @@ -129,74 +120,84 @@ "skipped_identifiers = []\n", "\n", "# loop through list of businesses to create filing\n", - "for identifier in businesses:\n", - " filing_details = %sql \\\n", - " SELECT f.id, f.filing_date \\\n", - " FROM businesses b \\\n", - " JOIN filings f ON b.id = f.business_id \\\n", - " WHERE f.filing_type = 'incorporationApplication' \\\n", - " AND b.identifier = :identifier\n", - " \n", - " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", - "\n", - " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", - " \n", - " draft_details = %sql \\\n", - " SELECT b.state, \\\n", - " (SELECT COUNT(1) \\\n", - " FROM filings f \\\n", - " WHERE f.business_id = b.id \\\n", - " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \\\n", - " FROM businesses b \\\n", - " WHERE b.identifier = :identifier\n", - " \n", - " state = None\n", - " has_draft = None\n", - " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", - " \n", - " if state == 'HISTORICAL' or has_draft:\n", - " skipped_identifiers.append(identifier)\n", - " continue\n", - " \n", - " correction_filing_data = {\n", - " \"filing\": {\n", - " \"header\": {\n", - " \"name\": \"correction\",\n", - " \"date\": current_date,\n", - " \"certifiedBy\": \"system\",\n", - " \"correctionBenStatement\": True,\n", - " \"waiveFees\": True\n", - " },\n", - " \"business\": {\n", - " \"identifier\": identifier,\n", - " \"legalType\": \"BEN\"\n", - " },\n", - " \"correction\": {\n", - " \"details\": \"BEN Correction statement\",\n", - " \"correctedFilingId\": filing_id,\n", - " \"correctedFilingType\": \"incorporationApplication\",\n", - " \"commentOnly\": True,\n", - " \"comment\": f\"\"\"Correction for Incorporation Application filed on {formatted_filing_date} \\n{correction_statement}\"\"\"\n", + "with engine.connect() as conn:\n", + " for identifier in businesses:\n", + " filing_details_query = text(\"\"\"\n", + " SELECT f.id, f.filing_date \n", + " FROM businesses b \n", + " JOIN filings f ON b.id = f.business_id \n", + " WHERE f.filing_type = 'incorporationApplication' \n", + " AND b.identifier = :identifier\n", + " \"\"\")\n", + " filing_details_query_result = conn.execute(filing_details_query, {\"identifier\": identifier})\n", + " filing_details = filing_details_query_result.mappings().fetchone()\n", + " \n", + " if filing_details:\n", + " filing_id = filing_details[0]['id']\n", + " filing_date = filing_details[0]['filing_date']\n", + "\n", + " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", + " \n", + " draft_details_query = text(\"\"\"\n", + " SELECT b.state, \n", + " (SELECT COUNT(1) \n", + " FROM filings f \n", + " WHERE f.business_id = b.id \n", + " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \n", + " FROM businesses b \n", + " WHERE b.identifier = :identifier\n", + " \"\"\")\n", + " draft_details_query_result = conn.execute(draft_details_query, {\"identifier\": identifier})\n", + " draft_details = draft_details_query_result.mappings().fetchone()\n", + " \n", + " state = None\n", + " has_draft = None\n", + " if draft_details:\n", + " state = draft_details[0]['state']\n", + " has_draft = draft_details[0]['has_draft']\n", + " \n", + " if state == 'HISTORICAL' or has_draft:\n", + " skipped_identifiers.append(identifier)\n", + " continue\n", + " \n", + " correction_filing_data = {\n", + " \"filing\": {\n", + " \"header\": {\n", + " \"name\": \"correction\",\n", + " \"date\": current_date,\n", + " \"certifiedBy\": \"system\",\n", + " \"correctionBenStatement\": True,\n", + " \"waiveFees\": True\n", + " },\n", + " \"business\": {\n", + " \"identifier\": identifier,\n", + " \"legalType\": \"BEN\"\n", + " },\n", + " \"correction\": {\n", + " \"details\": \"BEN Correction statement\",\n", + " \"correctedFilingId\": filing_id,\n", + " \"correctedFilingType\": \"incorporationApplication\",\n", + " \"commentOnly\": True,\n", + " \"comment\": f\"\"\"Correction for Incorporation Application filed on {formatted_filing_date} \\n{correction_statement}\"\"\"\n", + " }\n", " }\n", " }\n", - " }\n", - "\n", - " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", - " rv = requests.post(filing_url, headers=headers, json=correction_filing_data)\n", - "\n", - " # Check the status code of the response\n", - " if rv.status_code == 201:\n", - " successful_identifiers.append(identifier)\n", - " else:\n", - " failed_identifiers.append(identifier)\n", - " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", - "print('Successfully filed Corrections for:', successful_identifiers) # Print the successful identifiers\n", - "print('Failed to file Corrections for:', failed_identifiers) # Print the failed identifiers\n", - "print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n" + "\n", + " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", + " rv = requests.post(filing_url, headers=headers, json=correction_filing_data)\n", + "\n", + " # Check the status code of the response\n", + " if rv.status_code == 201:\n", + " successful_identifiers.append(identifier)\n", + " else:\n", + " failed_identifiers.append(identifier)\n", + " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", + " print('Successfully filed Corrections for:', successful_identifiers) # Print the successful identifiers\n", + " print('Failed to file Corrections for:', failed_identifiers) # Print the failed identifiers\n", + " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n", + "\n", + "#close the engine connection\n", + "conn.close()" ] } ], diff --git a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb index 24ded64ccf..218c710993 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb @@ -26,8 +26,7 @@ "source": [ "import os\n", "from dotenv import load_dotenv, find_dotenv\n", - "import psycopg2\n", - "import pandas as pd\n", + "from sqlalchemy import create_engine, text\n", "\n", "# this will load all the envars from a .env file located in the project root (api)\n", "load_dotenv(find_dotenv())\n", @@ -45,19 +44,11 @@ " os.getenv('ENTITY_DATABASE_USERNAME', '') + \":\" + os.getenv('ENTITY_DATABASE_PASSWORD', '') +'@' + \\\n", " os.getenv('ENTITY_DATABASE_HOST', '') + ':' + os.getenv('ENTITY_DATABASE_PORT', '5432') + '/' + \\\n", " os.getenv('ENTITY_DATABASE_NAME', '');\n", - "connect_to_db\n", - " \n", - "%sql $connect_to_db" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%%sql \n", - "select now() AT TIME ZONE 'PST' as current_date" + "engine = create_engine(connect_to_db)\n", + "\n", + "# Test connection\n", + "with engine.connect() as conn:\n", + " print(\"Connected successfully!\")" ] }, { @@ -121,73 +112,84 @@ "skipped_identifiers = []\n", "\n", "# loop through list of businesses to create filing\n", - "for identifier in businesses:\n", - " filing_details = %sql \\\n", - " SELECT f.id, f.filing_date \\\n", - " FROM businesses b \\\n", - " JOIN filings f ON b.id = f.business_id \\\n", - " WHERE f.filing_type = 'alteration' \\\n", - " AND f.meta_data->'alteration'->>'fromLegalType' IN ('BC', 'ULC', 'CC', 'C', 'CUL', 'CCC') \\\n", - " AND f.meta_data->'alteration'->>'toLegalType' IN ('BEN', 'CBEN') \\\n", - " AND b.identifier = :identifier\n", - " \n", - " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", - "\n", - " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", - " \n", - " draft_details = %sql \\\n", - " SELECT b.state, \\\n", - " (SELECT COUNT(1) \\\n", - " FROM filings f \\\n", - " WHERE f.business_id = b.id \\\n", - " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \\\n", - " FROM businesses b \\\n", - " WHERE b.identifier = :identifier\n", - " \n", - " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", - " \n", - " if state == 'HISTORICAL' or has_draft:\n", - " skipped_identifiers.append(identifier)\n", - " continue\n", - " \n", - " filing_data = {\n", - " \"filing\": {\n", - " \"header\": {\n", - " \"name\": \"registrarsNotation\",\n", - " \"date\": current_date,\n", - " \"certifiedBy\": \"system\"\n", - " },\n", - " \"business\": {\n", - " \"identifier\": identifier,\n", - " \"legalType\": \"BEN\"\n", - " },\n", - " \"registrarsNotation\": {\n", - " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", - " \"section 51.992 of the Business Corporations Act corrected from \" +\n", - " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", - " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", - " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", - " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + "with engine.connect() as conn:\n", + " for identifier in businesses:\n", + " filing_details_query = text(\"\"\"\n", + " SELECT f.id, f.filing_date\n", + " FROM businesses b\n", + " JOIN filings f ON b.id = f.business_id\n", + " WHERE f.filing_type = 'alteration'\n", + " AND f.meta_data->'alteration'->>'fromLegalType' IN ('BC', 'ULC', 'CC', 'C', 'CUL', 'CCC')\n", + " AND f.meta_data->'alteration'->>'toLegalType' IN ('BEN', 'CBEN')\n", + " AND b.identifier = :identifier\n", + " \"\"\")\n", + " filing_details_query_result = conn.execute(filing_details_query, {\"identifier\": identifier})\n", + " filing_details = filing_details_query_result.mappings().fetchone()\n", + " \n", + " if filing_details:\n", + " filing_id = filing_details[0]['id']\n", + " filing_date = filing_details[0]['filing_date']\n", + "\n", + " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", + " \n", + " draft_details_query = text(\"\"\"\n", + " SELECT b.state,\n", + " (SELECT COUNT(1)\n", + " FROM filings f\n", + " WHERE f.business_id = b.id\n", + " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft\n", + " FROM businesses b\n", + " WHERE b.identifier = :identifier\n", + " \"\"\")\n", + " \n", + " draft_details_query_result = conn.execute(draft_details_query, {\"identifier\": identifier})\n", + " draft_details = draft_details_query_result.mappings().fetchone()\n", + " \n", + " if draft_details:\n", + " state = draft_details[0]['state']\n", + " has_draft = draft_details[0]['has_draft']\n", + " \n", + " if state == 'HISTORICAL' or has_draft:\n", + " skipped_identifiers.append(identifier)\n", + " continue\n", + " \n", + " filing_data = {\n", + " \"filing\": {\n", + " \"header\": {\n", + " \"name\": \"registrarsNotation\",\n", + " \"date\": current_date,\n", + " \"certifiedBy\": \"system\"\n", + " },\n", + " \"business\": {\n", + " \"identifier\": identifier,\n", + " \"legalType\": \"BEN\"\n", + " },\n", + " \"registrarsNotation\": {\n", + " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", + " \"section 51.992 of the Business Corporations Act corrected from \" +\n", + " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", + " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", + " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", + " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + " }\n", " }\n", " }\n", - " }\n", - "\n", - " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", - " response = requests.post(filing_url, headers=headers, json=filing_data)\n", - "\n", - " # Check the status code of the response\n", - " if response.status_code == 201:\n", - " successful_identifiers.append(identifier)\n", - " else:\n", - " failed_identifiers.append(identifier)\n", - " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", - "print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", - "print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", - "print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n" + "\n", + " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", + " response = requests.post(filing_url, headers=headers, json=filing_data)\n", + "\n", + " # Check the status code of the response\n", + " if response.status_code == 201:\n", + " successful_identifiers.append(identifier)\n", + " else:\n", + " failed_identifiers.append(identifier)\n", + " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", + " print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", + " print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", + " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n", + "\n", + "#close the engine connection\n", + "conn.close()" ] } ], diff --git a/jobs/correction-ben-statement/add_registrars_notation_historical.ipynb b/jobs/correction-ben-statement/add_registrars_notation_historical.ipynb index fb5ad05dd3..af2548bde8 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_historical.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_historical.ipynb @@ -26,8 +26,7 @@ "source": [ "import os\n", "from dotenv import load_dotenv, find_dotenv\n", - "import psycopg2\n", - "import pandas as pd\n", + "from sqlalchemy import create_engine, text\n", "\n", "# this will load all the envars from a .env file located in the project root (api)\n", "load_dotenv(find_dotenv())\n", @@ -45,9 +44,11 @@ " os.getenv('ENTITY_DATABASE_USERNAME', '') + \":\" + os.getenv('ENTITY_DATABASE_PASSWORD', '') +'@' + \\\n", " os.getenv('ENTITY_DATABASE_HOST', '') + ':' + os.getenv('ENTITY_DATABASE_PORT', '5434') + '/' + \\\n", " os.getenv('ENTITY_DATABASE_NAME', '');\n", - "connect_to_db\n", - " \n", - "%sql $connect_to_db" + "engine = create_engine(connect_to_db)\n", + "\n", + "# Test connection\n", + "with engine.connect() as conn:\n", + " print(\"Connected successfully!\")" ] }, { @@ -121,41 +122,42 @@ "skipped_identifiers = []\n", "\n", "# loop through list of businesses to create filing\n", - "for identifier in businesses: \n", - " filing_data = {\n", - " \"filing\": {\n", - " \"header\": {\n", - " \"name\": \"registrarsNotation\",\n", - " \"date\": current_date,\n", - " \"certifiedBy\": \"system\"\n", - " },\n", - " \"business\": {\n", - " \"identifier\": identifier,\n", - " \"legalType\": \"BEN\"\n", - " },\n", - " \"registrarsNotation\": {\n", - " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", - " \"section 51.992 of the Business Corporations Act corrected from \" +\n", - " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", - " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", - " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", - " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + "with engine.connect() as conn:\n", + " for identifier in businesses: \n", + " filing_data = {\n", + " \"filing\": {\n", + " \"header\": {\n", + " \"name\": \"registrarsNotation\",\n", + " \"date\": current_date,\n", + " \"certifiedBy\": \"system\"\n", + " },\n", + " \"business\": {\n", + " \"identifier\": identifier,\n", + " \"legalType\": \"BEN\"\n", + " },\n", + " \"registrarsNotation\": {\n", + " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", + " \"section 51.992 of the Business Corporations Act corrected from \" +\n", + " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", + " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", + " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", + " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + " }\n", " }\n", " }\n", - " }\n", "\n", - " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", - " response = requests.post(filing_url, headers=headers, json=filing_data)\n", + " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", + " response = requests.post(filing_url, headers=headers, json=filing_data)\n", "\n", - " # Check the status code of the response\n", - " if response.status_code == 201:\n", - " successful_identifiers.append(identifier)\n", - " else:\n", - " failed_identifiers.append(identifier)\n", - " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", - "print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", - "print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", - "print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n" + " # Check the status code of the response\n", + " if response.status_code == 201:\n", + " successful_identifiers.append(identifier)\n", + " else:\n", + " failed_identifiers.append(identifier)\n", + " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", + " print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", + " print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", + " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n" ] } ], diff --git a/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb b/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb index 292656df85..4c06bde2c5 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb @@ -26,8 +26,7 @@ "source": [ "import os\n", "from dotenv import load_dotenv, find_dotenv\n", - "import psycopg2\n", - "import pandas as pd\n", + "from sqlalchemy import create_engine, text\n", "\n", "# this will load all the envars from a .env file located in the project root (api)\n", "load_dotenv(find_dotenv())\n", @@ -45,19 +44,11 @@ " os.getenv('ENTITY_DATABASE_USERNAME', '') + \":\" + os.getenv('ENTITY_DATABASE_PASSWORD', '') +'@' + \\\n", " os.getenv('ENTITY_DATABASE_HOST', '') + ':' + os.getenv('ENTITY_DATABASE_PORT', '5432') + '/' + \\\n", " os.getenv('ENTITY_DATABASE_NAME', '');\n", - "connect_to_db\n", - " \n", - "%sql $connect_to_db" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%%sql \n", - "select now() AT TIME ZONE 'PST' as current_date" + "engine = create_engine(connect_to_db)\n", + "\n", + "# Test connection\n", + "with engine.connect() as conn:\n", + " print(\"Connected successfully!\")" ] }, { @@ -121,80 +112,90 @@ "skipped_identifiers = []\n", "\n", "# loop through list of businesses to create filing\n", - "for identifier in businesses:\n", - " filing_details = %sql \\\n", - " SELECT f.id, f.filing_date \\\n", - " FROM businesses b \\\n", - " JOIN filings f ON b.id = f.business_id \\\n", - " WHERE f.filing_type = 'incorporationApplication' \\\n", - " AND b.identifier = :identifier\n", - " \n", - " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", - "\n", - " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", - " \n", - " draft_details = %sql \\\n", - " SELECT b.state, \\\n", - " (SELECT COUNT(1) \\\n", - " FROM filings f \\\n", - " WHERE f.business_id = b.id \\\n", - " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \\\n", - " FROM businesses b \\\n", - " WHERE b.identifier = :identifier\n", - " \n", - " state = None\n", - " has_draft = None\n", - " \n", - " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", - " \n", - " if state == 'HISTORICAL' or has_draft:\n", - " skipped_identifiers.append(identifier)\n", - " continue\n", + "with engine.connect() as conn:\n", + " for identifier in businesses:\n", + " filing_details_query = text(\"\"\"\n", + " SELECT f.id, f.filing_date \n", + " FROM businesses b \n", + " JOIN filings f ON b.id = f.business_id \n", + " WHERE f.filing_type = 'incorporationApplication' \n", + " AND b.identifier = :identifier\n", + " \"\"\")\n", + " filing_details_query_result = conn.execute(filing_details_query, {\"identifier\": identifier})\n", + " filing_details = filing_details_query_result.mappings().fetchone()\n", + " \n", + " if filing_details:\n", + " filing_id = filing_details['id']\n", + " filing_date = filing_details['filing_date']\n", + "\n", + " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", + " \n", + " draft_details_query = text(\"\"\"\n", + " SELECT b.state, \n", + " (SELECT COUNT(1) \n", + " FROM filings f \n", + " WHERE f.business_id = b.id \n", + " AND f.status in ('DRAFT', 'PENDING')) <> 0 AS has_draft \n", + " FROM businesses b \n", + " WHERE b.identifier = :identifier\n", + " \"\"\")\n", + " draft_details_query_result = conn.execute(draft_details_query, {\"identifier\": identifier})\n", + " draft_details = draft_details_query_result.mappings().fetchone()\n", + " \n", + " state = None\n", + " has_draft = None\n", + " \n", + " if draft_details:\n", + " state = draft_details['state']\n", + " has_draft = draft_details['has_draft']\n", + " \n", + " if state == 'HISTORICAL' or has_draft:\n", + " skipped_identifiers.append(identifier)\n", + " continue\n", " \n", - " filing_data = {\n", - " \"filing\": {\n", - " \"header\": {\n", - " \"name\": \"registrarsNotation\",\n", - " \"date\": current_date,\n", - " \"certifiedBy\": \"system\"\n", - " },\n", - " \"business\": {\n", - " \"identifier\": identifier,\n", - " \"legalType\": \"BEN\"\n", - " },\n", - " \"registrarsNotation\": {\n", - " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", - " \"section 51.992 of the Business Corporations Act corrected from \" +\n", - " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", - " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", - " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", - " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + " filing_data = {\n", + " \"filing\": {\n", + " \"header\": {\n", + " \"name\": \"registrarsNotation\",\n", + " \"date\": current_date,\n", + " \"certifiedBy\": \"system\"\n", + " },\n", + " \"business\": {\n", + " \"identifier\": identifier,\n", + " \"legalType\": \"BEN\"\n", + " },\n", + " \"registrarsNotation\": {\n", + " \"orderDetails\": \"BC benefit company statement contained in notice of articles as required under \" + \n", + " \"section 51.992 of the Business Corporations Act corrected from \" +\n", + " \"\\\"This company is a benefit company and, as such, has purposes that include conducting its business \" +\n", + " \" in a responsible and sustainable manner and promoting one or more public benefits\\\" to \" + \n", + " \"\\\"This company is a benefit company and, as such, is committed to conducting its business in a \" + \n", + " \"responsible and sustainable manner and promoting one or more public benefits\\\".\"\n", + " }\n", " }\n", " }\n", - " }\n", - "\n", - " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", - " response = requests.post(filing_url, headers=headers, json=filing_data)\n", - "\n", - " # Check the status code of the response\n", - " if response.status_code == 201:\n", - " successful_identifiers.append(identifier)\n", - " else:\n", - " failed_identifiers.append(identifier)\n", - " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", - "print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", - "print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", - "print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n" + "\n", + " filing_url = urljoin(base_url, f\"/api/v2/businesses/{identifier}/filings\")\n", + " response = requests.post(filing_url, headers=headers, json=filing_data)\n", + "\n", + " # Check the status code of the response\n", + " if response.status_code == 201:\n", + " successful_identifiers.append(identifier)\n", + " else:\n", + " failed_identifiers.append(identifier)\n", + " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", + " print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", + " print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", + " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n", + "\n", + "#close the engine connection\n", + "conn.close()" ] } ], "metadata": { "kernelspec": { - "display_name": "3.8.17", + "display_name": "3.11.7", "language": "python", "name": "python3" }, @@ -208,7 +209,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.11.7" } }, "nbformat": 4, From 53904078316c01687abcbac0e674093c1ad2751f Mon Sep 17 00:00:00 2001 From: Ketaki Deodhar Date: Tue, 3 Mar 2026 12:14:36 -0800 Subject: [PATCH 2/3] modify correction notebooks --- .../add_corrections_alterations.ipynb | 8 ++++---- .../add_corrections_ia.ipynb | 12 ++++++------ .../add_registrars_notation_alteration.ipynb | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/jobs/correction-ben-statement/add_corrections_alterations.ipynb b/jobs/correction-ben-statement/add_corrections_alterations.ipynb index f2d1af40fb..112a5874e3 100644 --- a/jobs/correction-ben-statement/add_corrections_alterations.ipynb +++ b/jobs/correction-ben-statement/add_corrections_alterations.ipynb @@ -135,8 +135,8 @@ " filing_details = filing_details_query_result.mappings().fetchone()\n", " \n", " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", + " filing_id = filing_details['id']\n", + " filing_date = filing_details['filing_date']\n", "\n", " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", " \n", @@ -156,8 +156,8 @@ " state = None\n", " has_draft = None\n", " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", + " state = draft_details['state']\n", + " has_draft = draft_details['has_draft']\n", " \n", " if state != 'ACTIVE' or has_draft:\n", " skipped_identifiers.append(identifier)\n", diff --git a/jobs/correction-ben-statement/add_corrections_ia.ipynb b/jobs/correction-ben-statement/add_corrections_ia.ipynb index 9053874037..0e1184c624 100644 --- a/jobs/correction-ben-statement/add_corrections_ia.ipynb +++ b/jobs/correction-ben-statement/add_corrections_ia.ipynb @@ -133,8 +133,8 @@ " filing_details = filing_details_query_result.mappings().fetchone()\n", " \n", " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", + " filing_id = filing_details['id']\n", + " filing_date = filing_details['filing_date']\n", "\n", " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", " \n", @@ -153,8 +153,8 @@ " state = None\n", " has_draft = None\n", " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", + " state = draft_details['state']\n", + " has_draft = draft_details['has_draft']\n", " \n", " if state == 'HISTORICAL' or has_draft:\n", " skipped_identifiers.append(identifier)\n", @@ -203,7 +203,7 @@ ], "metadata": { "kernelspec": { - "display_name": "3.8.17", + "display_name": "3.11.7", "language": "python", "name": "python3" }, @@ -217,7 +217,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.11.7" } }, "nbformat": 4, diff --git a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb index 218c710993..29e647052f 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb @@ -127,8 +127,8 @@ " filing_details = filing_details_query_result.mappings().fetchone()\n", " \n", " if filing_details:\n", - " filing_id = filing_details[0]['id']\n", - " filing_date = filing_details[0]['filing_date']\n", + " filing_id = filing_details['id']\n", + " filing_date = filing_details['filing_date']\n", "\n", " formatted_filing_date = filing_date.strftime(\"%B %d, %Y\")\n", " \n", @@ -146,8 +146,8 @@ " draft_details = draft_details_query_result.mappings().fetchone()\n", " \n", " if draft_details:\n", - " state = draft_details[0]['state']\n", - " has_draft = draft_details[0]['has_draft']\n", + " state = draft_details['state']\n", + " has_draft = draft_details['has_draft']\n", " \n", " if state == 'HISTORICAL' or has_draft:\n", " skipped_identifiers.append(identifier)\n", From 83a3ee25c0b264db0734a7ff50ea13e896a36587 Mon Sep 17 00:00:00 2001 From: Ketaki Deodhar Date: Tue, 3 Mar 2026 12:37:03 -0800 Subject: [PATCH 3/3] remove close connection --- .../add_corrections_alterations.ipynb | 9 +++------ jobs/correction-ben-statement/add_corrections_ia.ipynb | 5 +---- .../add_registrars_notation_alteration.ipynb | 9 +++------ .../add_registrars_notation_ia.ipynb | 5 +---- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/jobs/correction-ben-statement/add_corrections_alterations.ipynb b/jobs/correction-ben-statement/add_corrections_alterations.ipynb index 112a5874e3..a23bdc1ea1 100644 --- a/jobs/correction-ben-statement/add_corrections_alterations.ipynb +++ b/jobs/correction-ben-statement/add_corrections_alterations.ipynb @@ -198,16 +198,13 @@ " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", " print('Successfully filed Corrections for:', successful_identifiers) # Print the error message if the request fails \n", " print('Failed to file Corrections for:', failed_identifiers) # Print the error message if the request fails\n", - " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n", - "\n", - "#close the engine connection\n", - "conn.close()" + " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers" ] } ], "metadata": { "kernelspec": { - "display_name": "3.8.17", + "display_name": "3.11.7", "language": "python", "name": "python3" }, @@ -221,7 +218,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.11.7" } }, "nbformat": 4, diff --git a/jobs/correction-ben-statement/add_corrections_ia.ipynb b/jobs/correction-ben-statement/add_corrections_ia.ipynb index 0e1184c624..e8b5966705 100644 --- a/jobs/correction-ben-statement/add_corrections_ia.ipynb +++ b/jobs/correction-ben-statement/add_corrections_ia.ipynb @@ -194,10 +194,7 @@ " print(f\"Failed to make POST request. Status code: {rv.status_code}: {rv.text} for {identifier}\")\n", " print('Successfully filed Corrections for:', successful_identifiers) # Print the successful identifiers\n", " print('Failed to file Corrections for:', failed_identifiers) # Print the failed identifiers\n", - " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers\n", - "\n", - "#close the engine connection\n", - "conn.close()" + " print('Skipped to file Corrections for:', skipped_identifiers) # Print the skipped identifiers" ] } ], diff --git a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb index 29e647052f..d6e98bc715 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_alteration.ipynb @@ -186,16 +186,13 @@ " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", " print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", " print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", - " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n", - "\n", - "#close the engine connection\n", - "conn.close()" + " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers" ] } ], "metadata": { "kernelspec": { - "display_name": "3.8.17", + "display_name": "3.11.7", "language": "python", "name": "python3" }, @@ -209,7 +206,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.11.7" } }, "nbformat": 4, diff --git a/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb b/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb index 4c06bde2c5..9c13f189bf 100644 --- a/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb +++ b/jobs/correction-ben-statement/add_registrars_notation_ia.ipynb @@ -186,10 +186,7 @@ " print(f\"Failed to make POST request. Status code: {response.status_code} for {identifier}\")\n", " print('Successfully filed Registrar Notation for:', successful_identifiers) # Print the successful identifiers\n", " print('Failed to file Registrar Notation for:', failed_identifiers) # Print the failed identifiers\n", - " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers\n", - "\n", - "#close the engine connection\n", - "conn.close()" + " print('Skipped to file Registrar Notation for:', skipped_identifiers) # Print the skipped identifiers" ] } ],