From 5e36aeafddbdeac5edef120dcde7b88e731b8b42 Mon Sep 17 00:00:00 2001 From: Phil Dominguez <142051477+phildominguez-gsa@users.noreply.github.com> Date: Fri, 1 Dec 2023 10:21:06 -0500 Subject: [PATCH 1/2] 2895: New cmd for paginated census migration (#2905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Creating paginated command * Updating readme * Lint * Using django paginator * Using page_size instead of batchSize * Readme tweak * Readme tweak * Update backend/census_historical_migration/README.md --------- Co-authored-by: Phil Dominguez <“philip.dominguez@gsa.gov”> Co-authored-by: Hassan D. M. Sambo --- backend/census_historical_migration/README.md | 14 ++++- .../historic_data_loader.py | 57 ++++++++++++------- .../commands/run_paginated_migration.py | 41 +++++++++++++ 3 files changed, 88 insertions(+), 24 deletions(-) create mode 100644 backend/census_historical_migration/management/commands/run_paginated_migration.py diff --git a/backend/census_historical_migration/README.md b/backend/census_historical_migration/README.md index 95570f276e..c4810cb640 100644 --- a/backend/census_historical_migration/README.md +++ b/backend/census_historical_migration/README.md @@ -41,7 +41,7 @@ python manage.py csv_to_postgres --clean True ## How to load test Census data into Postgres -1. Download test Census data from https://drive.google.com/drive/folders/1TY-7yWsMd8DsVEXvwrEe_oWW1iR2sGoy into census_historical_migration/data folder. +1. Download test Census data from https://drive.google.com/drive/folders/1TY-7yWsMd8DsVEXvwrEe_oWW1iR2sGoy into census_historical_migration/data folder. NOTE: Never check in the census_historical_migration/data folder into GitHub. 2. In the FAC/backend folder, run the following to load CSV files from census_historical_migration/data folder into fac-census-to-gsafac-s3 bucket. @@ -55,6 +55,7 @@ docker compose run --rm web python manage.py csv_to_postgres --folder data --chu ``` ### How to run the historic data migrator: +To migrate individual dbkeys: ``` docker compose run --rm web python manage.py historic_data_migrator --years 22 \ @@ -62,6 +63,15 @@ docker compose run --rm web python manage.py historic_data_migrator ``` - `year` and `dbkey` are optional. The script will use default values for these if they aren't provided. +To migrate dbkeys for a given year with pagination: +``` +docker compose run --rm web python manage.py run_paginated_migration + --year 2022 \ + --page_size 1000 + --pages 1, 3, 4 +``` +- `batchSize` and `pages` are optional. The script will use default values for these if they aren't provided. + ### How to run the historic workbook generator: ``` docker compose run --rm web python manage.py historic_workbook_generator \ @@ -74,6 +84,6 @@ docker compose run --rm web python manage.py historic_workbook_generator \ ### How to trigger historic data migrator from GitHub: - Go to GitHub Actions and select `Historic data migrator` action -- Next, click on `Run workflow` on top right and +- Next, click on `Run workflow` on top right and - Provide the target `environment` along with optional parameters such as `dbkeys` and `years` - Click `Run` diff --git a/backend/census_historical_migration/historic_data_loader.py b/backend/census_historical_migration/historic_data_loader.py index dafc93c965..7e69406b27 100644 --- a/backend/census_historical_migration/historic_data_loader.py +++ b/backend/census_historical_migration/historic_data_loader.py @@ -2,36 +2,49 @@ from .workbooklib.end_to_end_core import run_end_to_end from django.contrib.auth import get_user_model +from django.core.paginator import Paginator + User = get_user_model() -def load_historic_data_for_year(audit_year): +def load_historic_data_for_year(audit_year, page_size, pages): """Iterates over and processes submissions for the given audit year""" result_log = {} total_count = error_count = 0 user = create_or_get_user() - submissions_for_year = Gen.objects.filter(AUDITYEAR=audit_year) - - for submission in submissions_for_year: - dbkey = submission.DBKEY - result = {"success": [], "errors": []} - - try: - # Migrate a single submission - run_end_to_end(user, dbkey, audit_year, result) - except Exception as exc: - result["errors"].append(f"{exc}") - - result_log[(audit_year, dbkey)] = result - total_count += 1 - - if len(result["errors"]) > 0: - error_count += 1 - if total_count % 5 == 0: - print(f"Processed = {total_count}, Errors = {error_count}") - if error_count > 5: - break + submissions_for_year = Gen.objects.filter(AUDITYEAR=audit_year).order_by( + "ELECAUDITHEADERID" + ) + paginator = Paginator(submissions_for_year, page_size) + + print(f"{submissions_for_year.count()} submissions found for {audit_year}") + + for page_number in pages: + page = paginator.page(page_number) + print( + f"Processing page {page_number} with {page.object_list.count()} submissions." + ) + + for submission in page.object_list: + dbkey = submission.DBKEY + result = {"success": [], "errors": []} + + try: + # Migrate a single submission + run_end_to_end(user, dbkey, audit_year, result) + except Exception as exc: + result["errors"].append(f"{exc}") + + result_log[(audit_year, dbkey)] = result + total_count += 1 + + if len(result["errors"]) > 0: + error_count += 1 + if total_count % 5 == 0: + print(f"Processed = {total_count}, Errors = {error_count}") + if error_count > 5: + break print("********* Loader Summary ***************") diff --git a/backend/census_historical_migration/management/commands/run_paginated_migration.py b/backend/census_historical_migration/management/commands/run_paginated_migration.py new file mode 100644 index 0000000000..eedab80484 --- /dev/null +++ b/backend/census_historical_migration/management/commands/run_paginated_migration.py @@ -0,0 +1,41 @@ +from ...historic_data_loader import load_historic_data_for_year + +from django.core.management.base import BaseCommand + +import logging +import sys + + +logger = logging.getLogger(__name__) +logger.setLevel(logging.WARNING) + + +class Command(BaseCommand): + help = """ + Migrate from Census tables to GSAFAC tables for a given year using pagination + Usage: + manage.py run_migration + --year + --pageSize + --pages + """ + + def add_arguments(self, parser): + parser.add_argument("--year", help="4-digit Audit Year") + parser.add_argument("--page_size", type=int, required=False, default=5) + parser.add_argument("--pages", type=str, required=False, default="1") + + def handle(self, *args, **options): + year = options.get("year") + if not year: + print("Please specify an audit year") + return + + try: + pages_str = options["pages"] + pages = list(map(lambda d: int(d), pages_str.split(","))) + except ValueError: + logger.error(f"Found a non-integer in pages '{pages_str}'") + sys.exit(-1) + + load_historic_data_for_year(year, options["page_size"], pages) From 7ad3cbbe535176dcf29cf19d41a7f3bb73587da3 Mon Sep 17 00:00:00 2001 From: "Hassan D. M. Sambo" Date: Fri, 1 Dec 2023 11:05:15 -0500 Subject: [PATCH 2/2] 2901 update logic in general information to use census models (#2906) * #2901 Updated logic to use Census models * Code improvement * Update backend/census_historical_migration/sac_general_lib/general_information.py Co-authored-by: Phil Dominguez <142051477+phildominguez-gsa@users.noreply.github.com> * Update backend/census_historical_migration/sac_general_lib/audit_information.py * Linting --------- Co-authored-by: Phil Dominguez <142051477+phildominguez-gsa@users.noreply.github.com> --- backend/census_historical_migration/admin.py | 4 +- .../sac_general_lib/audit_information.py | 160 +- .../sac_general_lib/auditee_certification.py | 18 +- .../sac_general_lib/auditor_certification.py | 19 +- .../sac_general_lib/general_information.py | 186 +- .../sac_general_lib/report_id_generator.py | 17 +- .../sac_general_lib/sac_creator.py | 43 +- .../sac_general_lib/utils.py | 10 +- .../test_excel_creation.py | 6 +- .../workbooklib/additional_eins.py | 10 +- .../workbooklib/additional_ueis.py | 8 +- .../workbooklib/census_models/census.py | 1978 ----------------- .../workbooklib/corrective_action_plan.py | 8 +- .../workbooklib/end_to_end_core.py | 10 +- .../workbooklib/excel_creation_utils.py | 40 +- .../workbooklib/federal_awards.py | 10 +- .../workbooklib/findings.py | 10 +- .../workbooklib/findings_text.py | 8 +- .../workbooklib/secondary_auditors.py | 8 +- .../workbooklib/workbook_builder.py | 2 +- .../workbooklib/workbook_builder_loader.py | 4 +- .../workbooklib/workbook_section_handlers.py | 16 +- 22 files changed, 335 insertions(+), 2240 deletions(-) delete mode 100644 backend/census_historical_migration/workbooklib/census_models/census.py diff --git a/backend/census_historical_migration/admin.py b/backend/census_historical_migration/admin.py index e32ef50ae4..d8ad4c682f 100644 --- a/backend/census_historical_migration/admin.py +++ b/backend/census_historical_migration/admin.py @@ -1,6 +1,6 @@ -from django.contrib import admin # noqa: F401 +from django.contrib import admin -from census_historical_migration.models import ( +from .models import ( ELECAUDITHEADER, ELECEINS, ELECAUDITFINDINGS, diff --git a/backend/census_historical_migration/sac_general_lib/audit_information.py b/backend/census_historical_migration/sac_general_lib/audit_information.py index a89b6afb1d..bb355fdb45 100644 --- a/backend/census_historical_migration/sac_general_lib/audit_information.py +++ b/backend/census_historical_migration/sac_general_lib/audit_information.py @@ -1,10 +1,12 @@ -from census_historical_migration.workbooklib.census_models.census import ( - CensusGen22 as Gen, - CensusCfda22 as Cfda, - CensusFindings22 as Finding, -) -from census_historical_migration.base_field_maps import FormFieldMap, FormFieldInDissem -from census_historical_migration.sac_general_lib.utils import ( +import re + +from ..transforms.xform_string_to_bool import string_to_bool +from ..exception_utils import DataMigrationError +from ..transforms.xform_string_to_string import string_to_string +from ..workbooklib.excel_creation_utils import get_audits + +from ..base_field_maps import FormFieldMap, FormFieldInDissem +from ..sac_general_lib.utils import ( _create_json_from_db_object, ) import audit.validators @@ -14,74 +16,130 @@ mappings = [ FormFieldMap( "dollar_threshold", - "dollarthreshold", + "DOLLARTHRESHOLD", FormFieldInDissem, settings.DOLLAR_THRESHOLD, int, ), - FormFieldMap("gaap_results", "typereport_fs", FormFieldInDissem, [], list), FormFieldMap( - "is_going_concern_included", "goingconcern", FormFieldInDissem, None, bool + "is_going_concern_included", "GOINGCONCERN", FormFieldInDissem, None, bool ), FormFieldMap( "is_internal_control_deficiency_disclosed", - "materialweakness", + "MATERIALWEAKNESS", FormFieldInDissem, None, bool, ), FormFieldMap( "is_internal_control_material_weakness_disclosed", - "materialweakness_mp", + "MATERIALWEAKNESS_MP", FormFieldInDissem, None, bool, ), FormFieldMap( "is_material_noncompliance_disclosed", - "materialnoncompliance", + "MATERIALNONCOMPLIANCE", FormFieldInDissem, None, bool, ), FormFieldMap( "is_aicpa_audit_guide_included", - "reportablecondition", + "REPORTABLECONDITION", FormFieldInDissem, None, bool, ), - FormFieldMap("is_low_risk_auditee", "lowrisk", FormFieldInDissem, False, bool), - FormFieldMap("agencies", "pyschedule", "agencies_with_prior_findings", [], list), + FormFieldMap("is_low_risk_auditee", "LOWRISK", FormFieldInDissem, False, bool), + FormFieldMap("agencies", "PYSCHEDULE", "agencies_with_prior_findings", [], list), ] def _get_agency_prefixes(dbkey): + """Returns the agency prefixes for the given dbkey.""" agencies = set() - cfdas = Cfda.select().where(Cfda.dbkey == dbkey) + audits = get_audits(dbkey) - for cfda in cfdas: - agency_prefix = int(cfda.cfda.split(".")[0]) - agencies.add(agency_prefix) + for audit_detail in audits: + agencies.add(string_to_string(audit_detail.CFDA_PREFIX)) return agencies -def _get_gaap_results(dbkey): - findings = Finding.select().where(Finding.dbkey == dbkey) - gaap_results = {} - # FIXME: How do we retrieve gaap_results from the historic data? I could not find corresponding fields in Census tables. - for finding in findings: - if finding.modifiedopinion == "Y": - gaap_results["unmodified_opinion"] = 1 - if finding.materialweakness == "Y": - gaap_results["adverse_opinion"] = 1 - if finding.significantdeficiency == "Y": - gaap_results["disclaimer_of_opinion"] = 1 - return gaap_results.keys() - - +def xform_framework_basis(basis): + """Transforms the framework basis from Census format to FAC format.""" + mappings = { + r"cash": "cash_basis", + # FIXME-MSHD: `regulatory` could mean tax_basis or contractual_basis + # or a new basis we don't have yet in FAC validation schema, I don't the answer. + # Defaulting to `contractual_basis` until team decide ????? + r"regulatory": "contractual_basis", + # r"????": "tax_basis", FIXME-MSHD: Could not find any instance of this in historic data + r"other": "other_basis", + } + # Check each pattern in the mappings with case-insensitive search + for pattern, value in mappings.items(): + if re.search(pattern, basis, re.IGNORECASE): + # FIXME-MSHD: This is a transformation that we may want to record + return value + + raise DataMigrationError( + f"Could not find a match for historic framework basis: '{basis}'" + ) + + +def xform_census_keys_to_fac_options(census_keys, fac_options): + """Maps the census keys to FAC options.""" + + if "U" in census_keys: + fac_options.append("unmodified_opinion") + if "Q" in census_keys: + fac_options.append("qualified_opinion") + if "A" in census_keys: + fac_options.append("adverse_opinion") + if "D" in census_keys: + fac_options.append("disclaimer_of_opinion") + + +def _get_sp_framework_gaap_results(audit_header): + """Returns the SP Framework and GAAP results for a given audit header.""" + + sp_framework_gaap_data = string_to_string(audit_header.TYPEREPORT_FS).upper() + if not sp_framework_gaap_data: + raise DataMigrationError( + f"GAAP details are missing for DBKEY: {audit_header.DBKEY}" + ) + + sp_framework_gaap_results = {} + sp_framework_gaap_results["gaap_results"] = [] + xform_census_keys_to_fac_options( + sp_framework_gaap_data, sp_framework_gaap_results["gaap_results"] + ) + if "S" in sp_framework_gaap_data: + sp_framework_gaap_results["gaap_results"].append("not_gaap") + sp_framework_gaap_results["is_sp_framework_required"] = string_to_bool( + audit_header.SP_FRAMEWORK_REQUIRED + ) + sp_framework_gaap_results["sp_framework_opinions"] = [] + sp_framework_opinions = string_to_string( + audit_header.TYPEREPORT_SP_FRAMEWORK + ).upper() + xform_census_keys_to_fac_options( + sp_framework_opinions, sp_framework_gaap_results["sp_framework_opinions"] + ) + sp_framework_gaap_results["sp_framework_basis"] = [] + basis = xform_framework_basis(string_to_string(audit_header.SP_FRAMEWORK)) + sp_framework_gaap_results["sp_framework_basis"].append(basis) + + return sp_framework_gaap_results + + +# FIXME-MSHD: Not being used, but we may need it in the future def _xform_agencies(audit_info): + """Transforms the agencies from Census format to FAC format.""" + new_audit_info = audit_info.copy() # Apply transformation to each key transformed_agencies = [ @@ -92,29 +150,19 @@ def _xform_agencies(audit_info): return new_audit_info -def _build_initial_audit_information(dbkey): - gaap_results = _get_gaap_results(dbkey) - agencies_prefixes = _get_agency_prefixes(dbkey) - gobj = Gen.select().where(Gen.dbkey == dbkey).first() - audit_information = _create_json_from_db_object(gobj, mappings) - audit_information["gaap_results"] = list(gaap_results) - audit_information["agencies"] = list(agencies_prefixes) - return audit_information - - -def _audit_information(dbkey): - audit_information = _build_initial_audit_information(dbkey) - - # List of transformation functions - transformations = [ - _xform_agencies, - ] +def audit_information(audit_header): + """Generates audit information JSON.""" - # Apply transformations - for transform in transformations: - audit_information = transform(audit_information) + results = _get_sp_framework_gaap_results(audit_header) + agencies_prefixes = _get_agency_prefixes(audit_header.DBKEY) + audit_info = _create_json_from_db_object(audit_header, mappings) + audit_info = { + key: results.get(key, audit_info.get(key)) + for key in set(audit_info) | set(results) + } + audit_info["agencies"] = list(agencies_prefixes) # Validate against the schema - audit.validators.validate_audit_information_json(audit_information) + audit.validators.validate_audit_information_json(audit_info) - return audit_information + return audit_info diff --git a/backend/census_historical_migration/sac_general_lib/auditee_certification.py b/backend/census_historical_migration/sac_general_lib/auditee_certification.py index 15012fb7a6..cc10ecf0a2 100644 --- a/backend/census_historical_migration/sac_general_lib/auditee_certification.py +++ b/backend/census_historical_migration/sac_general_lib/auditee_certification.py @@ -1,10 +1,7 @@ import audit.validators from datetime import date -from census_historical_migration.workbooklib.census_models.census import ( - CensusGen22 as Gen, -) -from census_historical_migration.base_field_maps import FormFieldMap, FormFieldInDissem -from census_historical_migration.sac_general_lib.utils import ( +from ..base_field_maps import FormFieldMap, FormFieldInDissem +from ..sac_general_lib.utils import ( _create_json_from_db_object, ) @@ -25,8 +22,8 @@ # auditee_certification_date_signed is not disseminated; it is set to ensure that the record passes validation when saved. auditee_signature_mappings = [ - FormFieldMap("auditee_name", "auditeename", FormFieldInDissem, None, str), - FormFieldMap("auditee_title", "auditeetitle", FormFieldInDissem, None, str), + FormFieldMap("auditee_name", "AUDITEENAME", FormFieldInDissem, None, str), + FormFieldMap("auditee_title", "AUDITEETITLE", FormFieldInDissem, None, str), FormFieldMap( "auditee_certification_date_signed", None, FormFieldInDissem, None, str ), @@ -41,15 +38,14 @@ def _xform_set_certification_date(auditee_certification): return auditee_certification -def _auditee_certification(dbkey): +def auditee_certification(audit_header): """Generates auditee certification JSON.""" - gobj: Gen = Gen.select().where(Gen.dbkey == dbkey).first() certification = {} certification["auditee_certification"] = _create_json_from_db_object( - gobj, auditee_certification_mappings + audit_header, auditee_certification_mappings ) certification["auditee_signature"] = _create_json_from_db_object( - gobj, auditee_signature_mappings + audit_header, auditee_signature_mappings ) certification = _xform_set_certification_date(certification) diff --git a/backend/census_historical_migration/sac_general_lib/auditor_certification.py b/backend/census_historical_migration/sac_general_lib/auditor_certification.py index 41d38a4185..89b726a2d5 100644 --- a/backend/census_historical_migration/sac_general_lib/auditor_certification.py +++ b/backend/census_historical_migration/sac_general_lib/auditor_certification.py @@ -1,10 +1,7 @@ import audit.validators from datetime import date -from census_historical_migration.workbooklib.census_models.census import ( - CensusGen22 as Gen, -) -from census_historical_migration.base_field_maps import FormFieldMap, FormFieldInDissem -from census_historical_migration.sac_general_lib.utils import ( +from ..base_field_maps import FormFieldMap, FormFieldInDissem +from ..sac_general_lib.utils import ( _create_json_from_db_object, ) @@ -22,8 +19,8 @@ # auditor_certification_date_signed is not disseminated; it is set to ensure that the record passes validation when saved. auditor_signature_mappings = [ - FormFieldMap("auditor_name", "cpacontact", FormFieldInDissem, None, str), - FormFieldMap("auditor_title", "cpatitle", FormFieldInDissem, None, str), + FormFieldMap("auditor_name", "CPACONTACT", FormFieldInDissem, None, str), + FormFieldMap("auditor_title", "CPATITLE", FormFieldInDissem, None, str), FormFieldMap( "auditor_certification_date_signed", None, FormFieldInDissem, None, str ), @@ -38,14 +35,14 @@ def _xform_set_certification_date(auditor_certification): return auditor_certification -def _auditor_certification(dbkey): - gobj: Gen = Gen.select().where(Gen.dbkey == dbkey).first() +def auditor_certification(audit_header): + """Generates auditor certification JSON.""" certification = {} certification["auditor_certification"] = _create_json_from_db_object( - gobj, auditor_certification_mappings + audit_header, auditor_certification_mappings ) certification["auditor_signature"] = _create_json_from_db_object( - gobj, auditor_signature_mappings + audit_header, auditor_signature_mappings ) certification = _xform_set_certification_date(certification) diff --git a/backend/census_historical_migration/sac_general_lib/general_information.py b/backend/census_historical_migration/sac_general_lib/general_information.py index d077bc52fa..8a5f7acbdb 100644 --- a/backend/census_historical_migration/sac_general_lib/general_information.py +++ b/backend/census_historical_migration/sac_general_lib/general_information.py @@ -1,16 +1,16 @@ import audit.validators from datetime import timedelta -from census_historical_migration.exception_utils import DataMigrationError -from census_historical_migration.workbooklib.census_models.census import ( - CensusGen22 as Gen, -) -from census_historical_migration.sac_general_lib.utils import ( - _census_date_to_datetime, + +from ..transforms.xform_string_to_string import string_to_string +from ..exception_utils import DataMigrationError +from ..sac_general_lib.utils import ( + xform_census_date_to_datetime, ) -from census_historical_migration.base_field_maps import FormFieldMap, FormFieldInDissem -from census_historical_migration.sac_general_lib.utils import ( +from ..base_field_maps import FormFieldMap, FormFieldInDissem +from ..sac_general_lib.utils import ( _create_json_from_db_object, ) +import re PERIOD_DICT = {"A": "annual", "B": "biennial", "O": "other"} AUDIT_TYPE_DICT = { @@ -18,100 +18,158 @@ "P": "program-specific", "A": "alternative-compliance-engagement", } + + +def xform_entity_type(phrase): + """Transforms the entity type from Census format to FAC format.""" + mappings = { + r"institution\s+of\s+higher\s+education": "higher-ed", + r"non-?profit": "non-profit", + r"local\s+government": "local", + r"state": "state", + r"unknown": "unknown", + r"": "none", + # r"": "tribal" FIXME-MSHD: what is being used for tribal in Census table? + } + new_phrase = string_to_string(phrase) + + # Check each pattern in the mappings with case-insensitive search + for pattern, value in mappings.items(): + if re.search(pattern, new_phrase, re.IGNORECASE): + # FIXME-MSHD: This is a transformation that we may want to record + return value + # FIXME-MSHD: We could default to unknown here instead of raising an error ??? team decision + raise DataMigrationError( + f"Could not find a match for historic entity type '{phrase}'" + ) + + mappings = [ FormFieldMap( - "auditee_fiscal_period_start", "fyenddate", "fy_start_date", None, str + "auditee_fiscal_period_start", "FYENDDATE", "fy_start_date", None, str ), - FormFieldMap("auditee_fiscal_period_end", "fyenddate", "fy_end_date", None, str), - FormFieldMap("audit_period_covered", "periodcovered", FormFieldInDissem, None, str), + FormFieldMap("auditee_fiscal_period_end", "FYENDDATE", "fy_end_date", None, str), + FormFieldMap("audit_period_covered", "PERIODCOVERED", FormFieldInDissem, None, str), FormFieldMap( - "audit_type", "audittype", FormFieldInDissem, None, str + "audit_type", "AUDITTYPE", FormFieldInDissem, None, str ), # FIXME: It appears the audit_type attribute is duplicated in the sac object: it exists both in the object and in the general_information section. - FormFieldMap("auditee_address_line_1", "street1", FormFieldInDissem, None, str), - FormFieldMap("auditee_city", "city", FormFieldInDissem, None, str), + FormFieldMap("auditee_address_line_1", "STREET1", FormFieldInDissem, None, str), + FormFieldMap("auditee_city", "CITY", FormFieldInDissem, None, str), FormFieldMap( - "auditee_contact_name", "auditeecontact", FormFieldInDissem, None, str + "auditee_contact_name", "AUDITEECONTACT", FormFieldInDissem, None, str ), - FormFieldMap("auditee_contact_title", "auditeetitle", FormFieldInDissem, None, str), - FormFieldMap("auditee_email", "auditeeemail", FormFieldInDissem, None, str), - FormFieldMap("auditee_name", "auditeename", FormFieldInDissem, None, str), - FormFieldMap("auditee_phone", "auditeephone", FormFieldInDissem, None, str), - FormFieldMap("auditee_state", "state", FormFieldInDissem, None, str), - FormFieldMap("auditee_uei", "uei", FormFieldInDissem, None, str), - FormFieldMap("auditee_zip", "zipcode", FormFieldInDissem, None, str), - FormFieldMap("auditor_address_line_1", "cpastreet1", FormFieldInDissem, None, str), - FormFieldMap("auditor_city", "cpacity", FormFieldInDissem, None, str), - FormFieldMap("auditor_contact_name", "cpacontact", FormFieldInDissem, None, str), - FormFieldMap("auditor_contact_title", "cpatitle", FormFieldInDissem, None, str), - FormFieldMap("auditor_country", "cpacountry", FormFieldInDissem, None, str), - FormFieldMap("auditor_ein", "auditor_ein", FormFieldInDissem, None, str), - FormFieldMap("auditor_ein_not_an_ssn_attestation", None, None, True, bool), - FormFieldMap("auditor_email", "cpaemail", FormFieldInDissem, None, str), - FormFieldMap("auditor_firm_name", "cpafirmname", FormFieldInDissem, None, str), - FormFieldMap("auditor_phone", "cpaphone", FormFieldInDissem, None, str), - FormFieldMap("auditor_state", "cpastate", FormFieldInDissem, None, str), - FormFieldMap("auditor_zip", "cpazipcode", FormFieldInDissem, None, str), - FormFieldMap("ein", "ein", "auditee_ein", None, str), - FormFieldMap("ein_not_an_ssn_attestation", None, None, True, bool), - FormFieldMap("is_usa_based", None, None, True, bool), - FormFieldMap("met_spending_threshold", None, None, True, bool), - FormFieldMap("multiple_eins_covered", "multipleeins", None, None, bool), + FormFieldMap("auditee_contact_title", "AUDITEETITLE", FormFieldInDissem, None, str), + FormFieldMap("auditee_email", "AUDITEEEMAIL", FormFieldInDissem, None, str), + FormFieldMap("auditee_name", "AUDITEENAME", FormFieldInDissem, None, str), + FormFieldMap("auditee_phone", "AUDITEEPHONE", FormFieldInDissem, None, str), + FormFieldMap("auditee_state", "STATE", FormFieldInDissem, None, str), + FormFieldMap("auditee_uei", "UEI", FormFieldInDissem, None, str), + FormFieldMap("auditee_zip", "ZIPCODE", FormFieldInDissem, None, str), + FormFieldMap("auditor_address_line_1", "CPASTREET1", FormFieldInDissem, None, str), + FormFieldMap("auditor_city", "CPACITY", FormFieldInDissem, None, str), + FormFieldMap("auditor_contact_name", "CPACONTACT", FormFieldInDissem, None, str), + FormFieldMap("auditor_contact_title", "CPATITLE", FormFieldInDissem, None, str), + FormFieldMap("auditor_country", "CPACOUNTRY", FormFieldInDissem, None, str), + FormFieldMap("auditor_ein", "AUDITOR_EIN", FormFieldInDissem, None, str), + FormFieldMap( + "auditor_ein_not_an_ssn_attestation", None, None, True, bool + ), # Not in DB, not disseminated, needed for validation + FormFieldMap("auditor_email", "CPAEMAIL", FormFieldInDissem, None, str), + FormFieldMap("auditor_firm_name", "CPAFIRMNAME", FormFieldInDissem, None, str), + FormFieldMap("auditor_phone", "CPAPHONE", FormFieldInDissem, None, str), + FormFieldMap("auditor_state", "CPASTATE", FormFieldInDissem, None, str), + FormFieldMap("auditor_zip", "CPAZIPCODE", FormFieldInDissem, None, str), + FormFieldMap("ein", "EIN", "auditee_ein", None, str), + FormFieldMap( + "ein_not_an_ssn_attestation", None, None, True, bool + ), # Not in DB, not disseminated, needed for validation + FormFieldMap( + "is_usa_based", None, None, True, bool + ), # Not in DB, not disseminated, needed for validation + FormFieldMap( + "met_spending_threshold", None, None, True, bool + ), # Not in DB, not disseminated, needed for validation FormFieldMap( - "multiple_ueis_covered", "multipleueis", "is_additional_ueis", None, bool + "multiple_eins_covered", "MULTIPLEEINS", None, None, bool + ), # In DB, not disseminated, needed for validation + FormFieldMap( + "multiple_ueis_covered", "MULTIPLEUEIS", "is_additional_ueis", None, bool + ), + FormFieldMap( + "user_provided_organization_type", + "ENTITY_TYPE", + "entity_type", + None, + xform_entity_type, ), FormFieldMap( - "user_provided_organization_type", None, "entity_type", "unknown", str - ), # FIXME: There is no in_db mapping ? - FormFieldMap("secondary_auditors_exist", "multiple_cpas", None, None, bool), + "secondary_auditors_exist", "MULTIPLE_CPAS", None, None, bool + ), # In DB, not disseminated, needed for validation ] def _period_covered(s): + """Helper to transform the period covered from Census format to FAC format.""" if s not in PERIOD_DICT: raise DataMigrationError(f"Key '{s}' not found in period coverage mapping") return PERIOD_DICT[s] def _census_audit_type(s): + """Helper to transform the audit type from Census format to FAC format.""" + if s not in AUDIT_TYPE_DICT: raise DataMigrationError(f"Key '{s}' not found in census audit type mapping") return AUDIT_TYPE_DICT[s] -def _xform_country(gen): - gen["auditor_country"] = "USA" if gen.get("auditor_country") == "US" else "non-USA" - return gen +def _xform_country(general_information): + """Transforms the country from Census format to FAC format.""" + general_information["auditor_country"] = ( + "USA" if general_information.get("auditor_country") == "US" else "non-USA" + ) + return general_information -def _xform_auditee_fiscal_period_end(gen): - gen["auditee_fiscal_period_end"] = _census_date_to_datetime( - gen.get("auditee_fiscal_period_end") +def _xform_auditee_fiscal_period_end(general_information): + """Transforms the fiscal period end from Census format to FAC format.""" + general_information["auditee_fiscal_period_end"] = xform_census_date_to_datetime( + general_information.get("auditee_fiscal_period_end") ).strftime("%Y-%m-%d") - return gen + return general_information -def _xform_auditee_fiscal_period_start(gen): - fiscal_start_date = _census_date_to_datetime( - gen.get("auditee_fiscal_period_end") +def _xform_auditee_fiscal_period_start(general_information): + """Constructs the fiscal period start from the fiscal period end""" + fiscal_start_date = xform_census_date_to_datetime( + general_information.get("auditee_fiscal_period_end") ) - timedelta(days=365) - gen["auditee_fiscal_period_start"] = fiscal_start_date.strftime("%Y-%m-%d") - return gen + general_information["auditee_fiscal_period_start"] = fiscal_start_date.strftime( + "%Y-%m-%d" + ) + return general_information -def _xform_audit_period_covered(gen): - gen["audit_period_covered"] = _period_covered(gen.get("audit_period_covered")) - return gen +def _xform_audit_period_covered(general_information): + """Transforms the period covered from Census format to FAC format.""" + general_information["audit_period_covered"] = _period_covered( + general_information.get("audit_period_covered") + ) + return general_information -def _xform_audit_type(gen): - gen["audit_type"] = _census_audit_type(gen.get("audit_type")) - return gen +def _xform_audit_type(general_information): + """Transforms the audit type from Census format to FAC format.""" + general_information["audit_type"] = _census_audit_type( + general_information.get("audit_type") + ) + return general_information -def _general_information(dbkey): - gobj: Gen = Gen.select().where(Gen.dbkey == dbkey).first() +def general_information(audit_header): + """Generates general information JSON.""" - general_information = _create_json_from_db_object(gobj, mappings) + general_information = _create_json_from_db_object(audit_header, mappings) # List of transformation functions transformations = [ diff --git a/backend/census_historical_migration/sac_general_lib/report_id_generator.py b/backend/census_historical_migration/sac_general_lib/report_id_generator.py index 80c581329d..eb3d3c9637 100644 --- a/backend/census_historical_migration/sac_general_lib/report_id_generator.py +++ b/backend/census_historical_migration/sac_general_lib/report_id_generator.py @@ -1,23 +1,8 @@ -from census_historical_migration.sac_general_lib.utils import ( - _census_date_to_datetime, +from ..sac_general_lib.utils import ( xform_census_date_to_datetime, ) -# FIXME: Get the padding/shape right on the report_id -def dbkey_to_report_id( - Gen, dbkey -): # FIXME-MSHD: Remove this function once we switch all workbook generators to using census models - g = Gen.select(Gen.audityear, Gen.fyenddate).where(Gen.dbkey == dbkey).get() - # month = g.fyenddate.split('-')[1] - # 2022JUN0001000003 - # We start new audits at 1 million. - # So, we want 10 digits, and zero-pad for - # historic DBKEY report_ids - dt = _census_date_to_datetime(g.fyenddate) - return f"{g.audityear}-{dt.month:02}-CENSUS-{dbkey.zfill(10)}" - - def xform_dbkey_to_report_id(audit_header, dbkey): # month = audit_header.fyenddate.split('-')[1] # 2022JUN0001000003 diff --git a/backend/census_historical_migration/sac_general_lib/sac_creator.py b/backend/census_historical_migration/sac_general_lib/sac_creator.py index 8166c4332a..4581829c9d 100644 --- a/backend/census_historical_migration/sac_general_lib/sac_creator.py +++ b/backend/census_historical_migration/sac_general_lib/sac_creator.py @@ -2,24 +2,23 @@ from django.apps import apps from django.conf import settings -from census_historical_migration.sac_general_lib.general_information import ( - _general_information, -) -from census_historical_migration.sac_general_lib.audit_information import ( - _audit_information, + +from ..exception_utils import DataMigrationError +from ..workbooklib.excel_creation_utils import get_audit_header +from ..sac_general_lib.general_information import ( + general_information, ) -from census_historical_migration.sac_general_lib.auditee_certification import ( - _auditee_certification, +from ..sac_general_lib.audit_information import ( + audit_information, ) -from census_historical_migration.sac_general_lib.auditor_certification import ( - _auditor_certification, +from ..sac_general_lib.auditee_certification import ( + auditee_certification, ) -from census_historical_migration.sac_general_lib.report_id_generator import ( - dbkey_to_report_id, +from ..sac_general_lib.auditor_certification import ( + auditor_certification, ) - -from census_historical_migration.workbooklib.census_models.census import ( - CensusGen22 as Gen, +from ..sac_general_lib.report_id_generator import ( + xform_dbkey_to_report_id, ) logger = logging.getLogger(__name__) @@ -28,7 +27,9 @@ def _create_sac(user, dbkey): """Create a SAC object for the historic data migration.""" SingleAuditChecklist = apps.get_model("audit.SingleAuditChecklist") - generated_report_id = dbkey_to_report_id(Gen, dbkey) + audit_header = get_audit_header(dbkey) + generated_report_id = xform_dbkey_to_report_id(audit_header, dbkey) + try: exists = SingleAuditChecklist.objects.get(report_id=generated_report_id) except SingleAuditChecklist.DoesNotExist: @@ -38,12 +39,11 @@ def _create_sac(user, dbkey): sac = SingleAuditChecklist.objects.create( submitted_by=user, - general_information=_general_information(dbkey), - audit_information=_audit_information(dbkey), + general_information=general_information(audit_header), + audit_information=audit_information(audit_header), ) sac.report_id = generated_report_id - Access = apps.get_model("audit.Access") Access.objects.create( sac=sac, @@ -66,8 +66,8 @@ def _create_sac(user, dbkey): role="certifying_auditor_contact", ) - sac.auditee_certification = _auditee_certification(dbkey) - sac.auditor_certification = _auditor_certification(dbkey) + sac.auditee_certification = auditee_certification(audit_header) + sac.auditor_certification = auditor_certification(audit_header) sac.data_source = settings.CENSUS_DATA_SOURCE sac.save() @@ -78,8 +78,7 @@ def _create_sac(user, dbkey): def setup_sac(user, auditee_name, dbkey): """Create a SAC object for the historic data migration.""" if user is None: - logger.error("No user provided to setup_sac") - return + raise DataMigrationError("No user provided to setup sac object") logger.info(f"Creating a SAC object for {user}, {auditee_name}") SingleAuditChecklist = apps.get_model("audit.SingleAuditChecklist") diff --git a/backend/census_historical_migration/sac_general_lib/utils.py b/backend/census_historical_migration/sac_general_lib/utils.py index 299ed94f11..bb83bfc2ca 100644 --- a/backend/census_historical_migration/sac_general_lib/utils.py +++ b/backend/census_historical_migration/sac_general_lib/utils.py @@ -1,10 +1,10 @@ from datetime import date, datetime -from census_historical_migration.transforms.xform_string_to_date import string_to_date -from census_historical_migration.transforms.xform_string_to_string import ( +from ..transforms.xform_string_to_date import string_to_date +from ..transforms.xform_string_to_string import ( string_to_string, ) -from census_historical_migration.transforms.xform_string_to_int import string_to_int -from census_historical_migration.transforms.xform_string_to_bool import string_to_bool +from ..transforms.xform_string_to_int import string_to_int +from ..transforms.xform_string_to_bool import string_to_bool def _create_json_from_db_object(gobj, mappings): @@ -27,6 +27,8 @@ def _create_json_from_db_object(gobj, mappings): value = string_to_int(value) elif mapping.type is date: value = string_to_date(value) + else: + value = mapping.type(value) json_obj[mapping.in_form] = value return json_obj diff --git a/backend/census_historical_migration/test_excel_creation.py b/backend/census_historical_migration/test_excel_creation.py index b6aaafe53f..0f8e5044fa 100644 --- a/backend/census_historical_migration/test_excel_creation.py +++ b/backend/census_historical_migration/test_excel_creation.py @@ -1,9 +1,9 @@ from django.conf import settings -from census_historical_migration.base_field_maps import ( +from .base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.excel_creation_utils import ( +from .workbooklib.excel_creation_utils import ( apply_conversion_function, get_range_values, get_ranges, @@ -15,7 +15,7 @@ from openpyxl import Workbook from openpyxl.utils import quote_sheetname, absolute_coordinate from openpyxl.workbook.defined_name import DefinedName -from census_historical_migration.models import ELECAUDITS as Audits +from .models import ELECAUDITS as Audits class ExcelCreationTests(TestCase): diff --git a/backend/census_historical_migration/workbooklib/additional_eins.py b/backend/census_historical_migration/workbooklib/additional_eins.py index 1c36adee99..63ac709da4 100644 --- a/backend/census_historical_migration/workbooklib/additional_eins.py +++ b/backend/census_historical_migration/workbooklib/additional_eins.py @@ -1,18 +1,18 @@ -from census_historical_migration.transforms.xform_string_to_string import ( +from ..transforms.xform_string_to_string import ( string_to_string, ) -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, map_simple_columns, generate_dissemination_test_table, set_workbook_uei, ) -from census_historical_migration.base_field_maps import ( +from ..base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.models import ELECEINS as Eins +from ..workbooklib.templates import sections_to_template_paths +from ..models import ELECEINS as Eins from audit.fixtures.excel import FORM_SECTIONS import openpyxl as pyxl diff --git a/backend/census_historical_migration/workbooklib/additional_ueis.py b/backend/census_historical_migration/workbooklib/additional_ueis.py index 8c29168c0a..eb1f4c346a 100644 --- a/backend/census_historical_migration/workbooklib/additional_ueis.py +++ b/backend/census_historical_migration/workbooklib/additional_ueis.py @@ -1,15 +1,15 @@ -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, map_simple_columns, generate_dissemination_test_table, set_workbook_uei, ) -from census_historical_migration.base_field_maps import ( +from ..base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.models import ELECUEIS as Ueis +from ..workbooklib.templates import sections_to_template_paths +from ..models import ELECUEIS as Ueis from audit.fixtures.excel import FORM_SECTIONS import openpyxl as pyxl diff --git a/backend/census_historical_migration/workbooklib/census_models/census.py b/backend/census_historical_migration/workbooklib/census_models/census.py deleted file mode 100644 index 76cbd1e277..0000000000 --- a/backend/census_historical_migration/workbooklib/census_models/census.py +++ /dev/null @@ -1,1978 +0,0 @@ -from peewee import ( - Model, - TextField, - BigIntegerField, -) -from playhouse.postgres_ext import PostgresqlDatabase - -# FIXME: pull this from the config -database = PostgresqlDatabase("postgres", **{"host": "db", "user": "postgres"}) - - -def model_module_path(model, year): - return f"census_historical_migration.workbooklib.census_models.census.Census{model}{year}" - - -def dynamic_import(mod, year): - name = model_module_path(mod, year[-2:]) - components = name.split(".") - mod = __import__(components[0]) - for comp in components[1:]: - mod = getattr(mod, comp) - return mod - - -class UnknownField(object): - def __init__(self, *_, **__): - pass - - -class BaseModel(Model): - class Meta: - database = database - - -class CensusAgency16(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency16" - schema = "public" - primary_key = False - - -class CensusAgency17(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency17" - schema = "public" - primary_key = False - - -class CensusAgency18(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency18" - schema = "public" - primary_key = False - - -class CensusAgency19(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency19" - schema = "public" - primary_key = False - - -class CensusAgency20(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency20" - schema = "public" - primary_key = False - - -class CensusAgency21(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency21" - schema = "public" - primary_key = False - - -class CensusAgency22(BaseModel): - agency = TextField(column_name="AGENCY", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_agency22" - schema = "public" - primary_key = False - - -class CensusCaptext19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext19" - schema = "public" - primary_key = False - - -class CensusCaptext20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext20" - schema = "public" - primary_key = False - - -class CensusCaptext21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext21" - schema = "public" - primary_key = False - - -class CensusCaptext22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext22" - schema = "public" - primary_key = False - - -class CensusCaptextFormatted19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext_formatted19" - schema = "public" - primary_key = False - - -class CensusCaptextFormatted20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext_formatted20" - schema = "public" - primary_key = False - - -class CensusCaptextFormatted21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext_formatted21" - schema = "public" - primary_key = False - - -class CensusCaptextFormatted22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_captext_formatted22" - schema = "public" - primary_key = False - - -class CensusCfda16(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda16" - schema = "public" - primary_key = False - - -class CensusCfda17(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda17" - schema = "public" - primary_key = False - - -class CensusCfda18(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda18" - schema = "public" - primary_key = False - - -class CensusCfda19(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda19" - schema = "public" - primary_key = False - - -class CensusCfda20(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda20" - schema = "public" - primary_key = False - - -class CensusCfda21(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda21" - schema = "public" - primary_key = False - - -class CensusCfda22(BaseModel): - amount = TextField(column_name="AMOUNT", null=True) - arra = TextField(column_name="ARRA", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - awardidentification = TextField(column_name="AWARDIDENTIFICATION", null=True) - cfda = TextField(column_name="CFDA", null=True) - cfdaprogramname = TextField(column_name="CFDAPROGRAMNAME", null=True) - clustername = TextField(column_name="CLUSTERNAME", null=True) - clustertotal = TextField(column_name="CLUSTERTOTAL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - direct = TextField(column_name="DIRECT", null=True) - ein = TextField(column_name="EIN", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - federalprogramname = TextField(column_name="FEDERALPROGRAMNAME", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingscount = TextField(column_name="FINDINGSCOUNT", null=True) - loanbalance = TextField(column_name="LOANBALANCE", null=True) - loans = TextField(column_name="LOANS", null=True) - majorprogram = TextField(column_name="MAJORPROGRAM", null=True) - otherclustername = TextField(column_name="OTHERCLUSTERNAME", null=True) - passthroughamount = TextField(column_name="PASSTHROUGHAMOUNT", null=True) - passthroughaward = TextField(column_name="PASSTHROUGHAWARD", null=True) - programtotal = TextField(column_name="PROGRAMTOTAL", null=True) - qcosts2 = TextField(column_name="QCOSTS2", null=True) - rd = TextField(column_name="RD", null=True) - stateclustername = TextField(column_name="STATECLUSTERNAME", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cfda22" - schema = "public" - primary_key = False - - -class CensusCpas16(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas16" - schema = "public" - primary_key = False - - -class CensusCpas17(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas17" - schema = "public" - primary_key = False - - -class CensusCpas18(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas18" - schema = "public" - primary_key = False - - -class CensusCpas19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas19" - schema = "public" - primary_key = False - - -class CensusCpas20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas20" - schema = "public" - primary_key = False - - -class CensusCpas21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas21" - schema = "public" - primary_key = False - - -class CensusCpas22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpaein = TextField(column_name="CPAEIN", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_cpas22" - schema = "public" - primary_key = False - - -class CensusDuns16(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns16" - schema = "public" - primary_key = False - - -class CensusDuns17(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns17" - schema = "public" - primary_key = False - - -class CensusDuns18(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns18" - schema = "public" - primary_key = False - - -class CensusDuns19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns19" - schema = "public" - primary_key = False - - -class CensusDuns20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns20" - schema = "public" - primary_key = False - - -class CensusDuns21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns21" - schema = "public" - primary_key = False - - -class CensusDuns22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - duns = TextField(column_name="DUNS", null=True) - dunseqnum = TextField(column_name="DUNSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_duns22" - schema = "public" - primary_key = False - - -class CensusEins16(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins16" - schema = "public" - primary_key = False - - -class CensusEins17(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins17" - schema = "public" - primary_key = False - - -class CensusEins18(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins18" - schema = "public" - primary_key = False - - -class CensusEins19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins19" - schema = "public" - primary_key = False - - -class CensusEins20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins20" - schema = "public" - primary_key = False - - -class CensusEins21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins21" - schema = "public" - primary_key = False - - -class CensusEins22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - ein = TextField(column_name="EIN", null=True) - einseqnum = TextField(column_name="EINSEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_eins22" - schema = "public" - primary_key = False - - -class CensusFindings16(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings16" - schema = "public" - primary_key = False - - -class CensusFindings17(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings17" - schema = "public" - primary_key = False - - -class CensusFindings18(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings18" - schema = "public" - primary_key = False - - -class CensusFindings19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings19" - schema = "public" - primary_key = False - - -class CensusFindings20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings20" - schema = "public" - primary_key = False - - -class CensusFindings21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings21" - schema = "public" - primary_key = False - - -class CensusFindings22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditfindingsid = TextField(column_name="ELECAUDITFINDINGSID", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - findingsrefnums = TextField(column_name="FINDINGSREFNUMS", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - modifiedopinion = TextField(column_name="MODIFIEDOPINION", null=True) - otherfindings = TextField(column_name="OTHERFINDINGS", null=True) - othernoncompliance = TextField(column_name="OTHERNONCOMPLIANCE", null=True) - priorfindingrefnums = TextField(column_name="PRIORFINDINGREFNUMS", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - repeatfinding = TextField(column_name="REPEATFINDING", null=True) - significantdeficiency = TextField(column_name="SIGNIFICANTDEFICIENCY", null=True) - typerequirement = TextField(column_name="TYPEREQUIREMENT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findings22" - schema = "public" - primary_key = False - - -class CensusFindingstext19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext19" - schema = "public" - primary_key = False - - -class CensusFindingstext20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext20" - schema = "public" - primary_key = False - - -class CensusFindingstext21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext21" - schema = "public" - primary_key = False - - -class CensusFindingstext22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext22" - schema = "public" - primary_key = False - - -class CensusFindingstextFormatted19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext_formatted19" - schema = "public" - primary_key = False - - -class CensusFindingstextFormatted20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext_formatted20" - schema = "public" - primary_key = False - - -class CensusFindingstextFormatted21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext_formatted21" - schema = "public" - primary_key = False - - -class CensusFindingstextFormatted22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - chartstables = TextField(column_name="CHARTSTABLES", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - findingrefnums = TextField(column_name="FINDINGREFNUMS", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - text = TextField(column_name="TEXT", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_findingstext_formatted22" - schema = "public" - primary_key = False - - -class CensusGen16(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen16" - schema = "public" - primary_key = False - - -class CensusGen17(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen17" - schema = "public" - primary_key = False - - -class CensusGen18(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen18" - schema = "public" - primary_key = False - - -class CensusGen19(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen19" - schema = "public" - primary_key = False - - -class CensusGen20(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen20" - schema = "public" - primary_key = False - - -class CensusGen21(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen21" - schema = "public" - primary_key = False - - -class CensusGen22(BaseModel): - auditeecontact = TextField(column_name="AUDITEECONTACT", null=True) - auditeedatesigned = TextField(column_name="AUDITEEDATESIGNED", null=True) - auditeeemail = TextField(column_name="AUDITEEEMAIL", null=True) - auditeefax = TextField(column_name="AUDITEEFAX", null=True) - auditeename = TextField(column_name="AUDITEENAME", null=True) - auditeenametitle = TextField(column_name="AUDITEENAMETITLE", null=True) - auditeephone = TextField(column_name="AUDITEEPHONE", null=True) - auditeetitle = TextField(column_name="AUDITEETITLE", null=True) - auditor_ein = TextField(column_name="AUDITOR_EIN", null=True) - audittype = TextField(column_name="AUDITTYPE", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - city = TextField(column_name="CITY", null=True) - cogagency = TextField(column_name="COGAGENCY", null=True) - cog_over = TextField(column_name="COG_OVER", null=True) - cpacity = TextField(column_name="CPACITY", null=True) - cpacontact = TextField(column_name="CPACONTACT", null=True) - cpacountry = TextField(column_name="CPACOUNTRY", null=True) - cpadatesigned = TextField(column_name="CPADATESIGNED", null=True) - cpaemail = TextField(column_name="CPAEMAIL", null=True) - cpafax = TextField(column_name="CPAFAX", null=True) - cpafirmname = TextField(column_name="CPAFIRMNAME", null=True) - cpaforeign = TextField(column_name="CPAFOREIGN", null=True) - cpaphone = TextField(column_name="CPAPHONE", null=True) - cpastate = TextField(column_name="CPASTATE", null=True) - cpastreet1 = TextField(column_name="CPASTREET1", null=True) - cpastreet2 = TextField(column_name="CPASTREET2", null=True) - cpatitle = TextField(column_name="CPATITLE", null=True) - cpazipcode = TextField(column_name="CPAZIPCODE", null=True) - cyfindings = TextField(column_name="CYFINDINGS", null=True) - datefirewall = TextField(column_name="DATEFIREWALL", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - dollarthreshold = TextField(column_name="DOLLARTHRESHOLD", null=True) - duns = TextField(column_name="DUNS", null=True) - dup_reports = TextField(column_name="DUP_REPORTS", null=True) - ein = TextField(column_name="EIN", null=True) - einsubcode = TextField(column_name="EINSUBCODE", null=True) - entity_type = TextField(column_name="ENTITY_TYPE", null=True) - facaccepteddate = TextField(column_name="FACACCEPTEDDATE", null=True) - fyenddate = TextField(column_name="FYENDDATE", null=True) - goingconcern = TextField(column_name="GOINGCONCERN", null=True) - lowrisk = TextField(column_name="LOWRISK", null=True) - materialnoncompliance = TextField(column_name="MATERIALNONCOMPLIANCE", null=True) - materialweakness = TextField(column_name="MATERIALWEAKNESS", null=True) - materialweakness_mp = TextField(column_name="MATERIALWEAKNESS_MP", null=True) - multipleduns = TextField(column_name="MULTIPLEDUNS", null=True) - multipleeins = TextField(column_name="MULTIPLEEINS", null=True) - multipleueis = TextField(column_name="MULTIPLEUEIS", null=True) - multiple_cpas = TextField(column_name="MULTIPLE_CPAS", null=True) - numbermonths = TextField(column_name="NUMBERMONTHS", null=True) - oversightagency = TextField(column_name="OVERSIGHTAGENCY", null=True) - periodcovered = TextField(column_name="PERIODCOVERED", null=True) - previousdatefirewall = TextField(column_name="PREVIOUSDATEFIREWALL", null=True) - pyschedule = TextField(column_name="PYSCHEDULE", null=True) - qcosts = TextField(column_name="QCOSTS", null=True) - reportablecondition = TextField(column_name="REPORTABLECONDITION", null=True) - reportablecondition_mp = TextField(column_name="REPORTABLECONDITION_MP", null=True) - reportrequired = TextField(column_name="REPORTREQUIRED", null=True) - sp_framework = TextField(column_name="SP_FRAMEWORK", null=True) - sp_framework_required = TextField(column_name="SP_FRAMEWORK_REQUIRED", null=True) - state = TextField(column_name="STATE", null=True) - street1 = TextField(column_name="STREET1", null=True) - street2 = TextField(column_name="STREET2", null=True) - totfedexpend = TextField(column_name="TOTFEDEXPEND", null=True) - typeofentity = TextField(column_name="TYPEOFENTITY", null=True) - typereport_fs = TextField(column_name="TYPEREPORT_FS", null=True) - typereport_mp = TextField(column_name="TYPEREPORT_MP", null=True) - typereport_sp_framework = TextField( - column_name="TYPEREPORT_SP_FRAMEWORK", null=True - ) - uei = TextField(column_name="UEI", null=True) - zipcode = TextField(column_name="ZIPCODE", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_gen22" - schema = "public" - primary_key = False - - -class CensusNotes19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - content = TextField(column_name="CONTENT", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - id = TextField(column_name="ID", null=True) - note_index = TextField(column_name="NOTE_INDEX", null=True) - reportid = TextField(column_name="REPORTID", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - title = TextField(column_name="TITLE", null=True) - type_id = TextField(column_name="TYPE_ID", null=True) - version = TextField(column_name="VERSION", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_notes19" - schema = "public" - primary_key = False - - -class CensusNotes20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - content = TextField(column_name="CONTENT", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - id = TextField(column_name="ID", null=True) - note_index = TextField(column_name="NOTE_INDEX", null=True) - reportid = TextField(column_name="REPORTID", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - title = TextField(column_name="TITLE", null=True) - type_id = TextField(column_name="TYPE_ID", null=True) - version = TextField(column_name="VERSION", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_notes20" - schema = "public" - primary_key = False - - -class CensusNotes21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - content = TextField(column_name="CONTENT", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - id = TextField(column_name="ID", null=True) - note_index = TextField(column_name="NOTE_INDEX", null=True) - reportid = TextField(column_name="REPORTID", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - title = TextField(column_name="TITLE", null=True) - type_id = TextField(column_name="TYPE_ID", null=True) - version = TextField(column_name="VERSION", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_notes21" - schema = "public" - primary_key = False - - -class CensusNotes22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - content = TextField(column_name="CONTENT", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - id = TextField(column_name="ID", null=True) - note_index = TextField(column_name="NOTE_INDEX", null=True) - reportid = TextField(column_name="REPORTID", null=True) - seq_number = TextField(column_name="SEQ_NUMBER", null=True) - title = TextField(column_name="TITLE", null=True) - type_id = TextField(column_name="TYPE_ID", null=True) - version = TextField(column_name="VERSION", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_notes22" - schema = "public" - primary_key = False - - -class CensusPassthrough16(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough16" - schema = "public" - primary_key = False - - -class CensusPassthrough17(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough17" - schema = "public" - primary_key = False - - -class CensusPassthrough18(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough18" - schema = "public" - primary_key = False - - -class CensusPassthrough19(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough19" - schema = "public" - primary_key = False - - -class CensusPassthrough20(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough20" - schema = "public" - primary_key = False - - -class CensusPassthrough21(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough21" - schema = "public" - primary_key = False - - -class CensusPassthrough22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecauditsid = TextField(column_name="ELECAUDITSID", null=True) - passthroughid = TextField(column_name="PASSTHROUGHID", null=True) - passthroughname = TextField(column_name="PASSTHROUGHNAME", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_passthrough22" - schema = "public" - primary_key = False - - -class CensusRevisions19(BaseModel): - auditinfo = TextField(column_name="AUDITINFO", null=True) - auditinfo_explain = TextField(column_name="AUDITINFO_EXPLAIN", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - cap = TextField(column_name="CAP", null=True) - cap_explain = TextField(column_name="CAP_EXPLAIN", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecrptrevisionid = TextField(column_name="ELECRPTREVISIONID", null=True) - federalawards = TextField(column_name="FEDERALAWARDS", null=True) - federalawards_explain = TextField(column_name="FEDERALAWARDS_EXPLAIN", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingstext = TextField(column_name="FINDINGSTEXT", null=True) - findingstext_explain = TextField(column_name="FINDINGSTEXT_EXPLAIN", null=True) - findings_explain = TextField(column_name="FINDINGS_EXPLAIN", null=True) - geninfo = TextField(column_name="GENINFO", null=True) - geninfo_explain = TextField(column_name="GENINFO_EXPLAIN", null=True) - notestosefa = TextField(column_name="NOTESTOSEFA", null=True) - notestosefa_explain = TextField(column_name="NOTESTOSEFA_EXPLAIN", null=True) - other = TextField(column_name="OTHER", null=True) - other_explain = TextField(column_name="OTHER_EXPLAIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_revisions19" - schema = "public" - primary_key = False - - -class CensusRevisions20(BaseModel): - auditinfo = TextField(column_name="AUDITINFO", null=True) - auditinfo_explain = TextField(column_name="AUDITINFO_EXPLAIN", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - cap = TextField(column_name="CAP", null=True) - cap_explain = TextField(column_name="CAP_EXPLAIN", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecrptrevisionid = TextField(column_name="ELECRPTREVISIONID", null=True) - federalawards = TextField(column_name="FEDERALAWARDS", null=True) - federalawards_explain = TextField(column_name="FEDERALAWARDS_EXPLAIN", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingstext = TextField(column_name="FINDINGSTEXT", null=True) - findingstext_explain = TextField(column_name="FINDINGSTEXT_EXPLAIN", null=True) - findings_explain = TextField(column_name="FINDINGS_EXPLAIN", null=True) - geninfo = TextField(column_name="GENINFO", null=True) - geninfo_explain = TextField(column_name="GENINFO_EXPLAIN", null=True) - notestosefa = TextField(column_name="NOTESTOSEFA", null=True) - notestosefa_explain = TextField(column_name="NOTESTOSEFA_EXPLAIN", null=True) - other = TextField(column_name="OTHER", null=True) - other_explain = TextField(column_name="OTHER_EXPLAIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_revisions20" - schema = "public" - primary_key = False - - -class CensusRevisions21(BaseModel): - auditinfo = TextField(column_name="AUDITINFO", null=True) - auditinfo_explain = TextField(column_name="AUDITINFO_EXPLAIN", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - cap = TextField(column_name="CAP", null=True) - cap_explain = TextField(column_name="CAP_EXPLAIN", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecrptrevisionid = TextField(column_name="ELECRPTREVISIONID", null=True) - federalawards = TextField(column_name="FEDERALAWARDS", null=True) - federalawards_explain = TextField(column_name="FEDERALAWARDS_EXPLAIN", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingstext = TextField(column_name="FINDINGSTEXT", null=True) - findingstext_explain = TextField(column_name="FINDINGSTEXT_EXPLAIN", null=True) - findings_explain = TextField(column_name="FINDINGS_EXPLAIN", null=True) - geninfo = TextField(column_name="GENINFO", null=True) - geninfo_explain = TextField(column_name="GENINFO_EXPLAIN", null=True) - notestosefa = TextField(column_name="NOTESTOSEFA", null=True) - notestosefa_explain = TextField(column_name="NOTESTOSEFA_EXPLAIN", null=True) - other = TextField(column_name="OTHER", null=True) - other_explain = TextField(column_name="OTHER_EXPLAIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_revisions21" - schema = "public" - primary_key = False - - -class CensusRevisions22(BaseModel): - auditinfo = TextField(column_name="AUDITINFO", null=True) - auditinfo_explain = TextField(column_name="AUDITINFO_EXPLAIN", null=True) - audityear = TextField(column_name="AUDITYEAR", null=True) - cap = TextField(column_name="CAP", null=True) - cap_explain = TextField(column_name="CAP_EXPLAIN", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - elecrptrevisionid = TextField(column_name="ELECRPTREVISIONID", null=True) - federalawards = TextField(column_name="FEDERALAWARDS", null=True) - federalawards_explain = TextField(column_name="FEDERALAWARDS_EXPLAIN", null=True) - findings = TextField(column_name="FINDINGS", null=True) - findingstext = TextField(column_name="FINDINGSTEXT", null=True) - findingstext_explain = TextField(column_name="FINDINGSTEXT_EXPLAIN", null=True) - findings_explain = TextField(column_name="FINDINGS_EXPLAIN", null=True) - geninfo = TextField(column_name="GENINFO", null=True) - geninfo_explain = TextField(column_name="GENINFO_EXPLAIN", null=True) - notestosefa = TextField(column_name="NOTESTOSEFA", null=True) - notestosefa_explain = TextField(column_name="NOTESTOSEFA_EXPLAIN", null=True) - other = TextField(column_name="OTHER", null=True) - other_explain = TextField(column_name="OTHER_EXPLAIN", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_revisions22" - schema = "public" - primary_key = False - - -class CensusUeis22(BaseModel): - audityear = TextField(column_name="AUDITYEAR", null=True) - dbkey = TextField(column_name="DBKEY", null=True) - uei = TextField(column_name="UEI", null=True) - ueiseqnum = TextField(column_name="UEISEQNUM", null=True) - index = BigIntegerField(index=True, null=True) - - class Meta: - table_name = "census_ueis22" - schema = "public" - primary_key = False diff --git a/backend/census_historical_migration/workbooklib/corrective_action_plan.py b/backend/census_historical_migration/workbooklib/corrective_action_plan.py index dc8fce8ec8..263f2cdb44 100644 --- a/backend/census_historical_migration/workbooklib/corrective_action_plan.py +++ b/backend/census_historical_migration/workbooklib/corrective_action_plan.py @@ -1,15 +1,15 @@ -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, map_simple_columns, generate_dissemination_test_table, set_workbook_uei, ) -from census_historical_migration.base_field_maps import ( +from ..base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.models import ELECCAPTEXT as CapText +from ..workbooklib.templates import sections_to_template_paths +from ..models import ELECCAPTEXT as CapText from audit.fixtures.excel import FORM_SECTIONS diff --git a/backend/census_historical_migration/workbooklib/end_to_end_core.py b/backend/census_historical_migration/workbooklib/end_to_end_core.py index b8f575996f..1c88ee5488 100644 --- a/backend/census_historical_migration/workbooklib/end_to_end_core.py +++ b/backend/census_historical_migration/workbooklib/end_to_end_core.py @@ -1,4 +1,4 @@ -from census_historical_migration.exception_utils import DataMigrationError +from ..exception_utils import DataMigrationError import argparse import logging import sys @@ -10,14 +10,14 @@ from datetime import datetime import traceback -from census_historical_migration.workbooklib.workbook_builder_loader import ( +from ..workbooklib.workbook_builder_loader import ( workbook_builder_loader, ) -from census_historical_migration.sac_general_lib.sac_creator import setup_sac -from census_historical_migration.workbooklib.workbook_section_handlers import ( +from ..sac_general_lib.sac_creator import setup_sac +from ..workbooklib.workbook_section_handlers import ( sections_to_handlers, ) -from census_historical_migration.workbooklib.post_upload_utils import _post_upload_pdf +from ..workbooklib.post_upload_utils import _post_upload_pdf from audit.intake_to_dissemination import IntakeToDissemination from dissemination.models import ( diff --git a/backend/census_historical_migration/workbooklib/excel_creation_utils.py b/backend/census_historical_migration/workbooklib/excel_creation_utils.py index 8a5a0f80fe..866df8dc62 100644 --- a/backend/census_historical_migration/workbooklib/excel_creation_utils.py +++ b/backend/census_historical_migration/workbooklib/excel_creation_utils.py @@ -1,15 +1,14 @@ -from census_historical_migration.transforms.xform_string_to_string import ( +from ..transforms.xform_string_to_string import ( string_to_string, ) -from census_historical_migration.transforms.xform_string_to_int import string_to_int -from census_historical_migration.exception_utils import DataMigrationError -from census_historical_migration.base_field_maps import WorkbookFieldInDissem -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.sac_general_lib.report_id_generator import ( - dbkey_to_report_id, +from ..transforms.xform_string_to_int import string_to_int +from ..exception_utils import DataMigrationError +from ..base_field_maps import WorkbookFieldInDissem +from ..workbooklib.templates import sections_to_template_paths +from ..sac_general_lib.report_id_generator import ( xform_dbkey_to_report_id, ) -from census_historical_migration.models import ( +from ..models import ( ELECAUDITS as Audits, ELECAUDITHEADER as AuditHeader, ) @@ -125,16 +124,6 @@ def get_ranges(mappings, values): return ranges -# FIXME-MSHD: Remove this function once we switch all workbook generators to using census models -def set_uei(Gen, wb, dbkey): - g = Gen.select().where(Gen.dbkey == dbkey).get() - if g.uei: - set_range(wb, "auditee_uei", [g.uei]) - else: - raise DataMigrationError(f"UEI is not set for this audit: {dbkey}") - return g - - def set_workbook_uei(workbook, uei): """Sets the UEI value in the workbook's designated UEI cell""" if not uei: @@ -187,16 +176,14 @@ def get_template_name_for_section(section): raise ValueError(f"Unknown section {section}") -def generate_dissemination_test_table(Gen, api_endpoint, dbkey, mappings, objects): +def generate_dissemination_test_table( + audit_header, api_endpoint, dbkey, mappings, objects +): + """Generates a test table for verifying the API queries results.""" table = {"rows": list(), "singletons": dict()} table["endpoint"] = api_endpoint - table["report_id"] = ( - dbkey_to_report_id(Gen, dbkey) - if not isinstance( - Gen, AuditHeader - ) # FIXME-MSHD: This hack is necessary until we switch all workbook generators to using census models. We may want to get rid of generate_dissemination_test_table at some point (see comment in generate_federal_awards) - else xform_dbkey_to_report_id(Gen, dbkey) - ) + table["report_id"] = xform_dbkey_to_report_id(audit_header, dbkey) + for o in objects: test_obj = {} test_obj["fields"] = [] @@ -222,4 +209,5 @@ def generate_dissemination_test_table(Gen, api_endpoint, dbkey, mappings, object def get_audits(dbkey): + """Returns the Audits instances for the given dbkey.""" return Audits.objects.filter(DBKEY=dbkey).order_by("ID") diff --git a/backend/census_historical_migration/workbooklib/federal_awards.py b/backend/census_historical_migration/workbooklib/federal_awards.py index ca51be6b7a..28c3c7e16e 100644 --- a/backend/census_historical_migration/workbooklib/federal_awards.py +++ b/backend/census_historical_migration/workbooklib/federal_awards.py @@ -1,7 +1,7 @@ -from census_historical_migration.transforms.xform_string_to_string import ( +from ..transforms.xform_string_to_string import ( string_to_string, ) -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, get_audits, get_range_values, @@ -11,14 +11,14 @@ generate_dissemination_test_table, set_range, ) -from census_historical_migration.base_field_maps import ( +from ..base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.templates import sections_to_template_paths +from ..workbooklib.templates import sections_to_template_paths from audit.fixtures.excel import FORM_SECTIONS from config import settings -from census_historical_migration.models import ( +from ..models import ( ELECAUDITS as Audits, ELECPASSTHROUGH as Passthrough, ) diff --git a/backend/census_historical_migration/workbooklib/findings.py b/backend/census_historical_migration/workbooklib/findings.py index 128cb62a3a..948c0e767a 100644 --- a/backend/census_historical_migration/workbooklib/findings.py +++ b/backend/census_historical_migration/workbooklib/findings.py @@ -1,7 +1,7 @@ -from census_historical_migration.transforms.xform_string_to_string import ( +from ..transforms.xform_string_to_string import ( string_to_string, ) -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, get_audits, map_simple_columns, @@ -9,10 +9,10 @@ set_range, set_workbook_uei, ) -from census_historical_migration.base_field_maps import SheetFieldMap -from census_historical_migration.workbooklib.templates import sections_to_template_paths +from ..base_field_maps import SheetFieldMap +from ..workbooklib.templates import sections_to_template_paths from audit.fixtures.excel import FORM_SECTIONS -from census_historical_migration.models import ELECAUDITFINDINGS as Findings +from ..models import ELECAUDITFINDINGS as Findings import openpyxl as pyxl import logging diff --git a/backend/census_historical_migration/workbooklib/findings_text.py b/backend/census_historical_migration/workbooklib/findings_text.py index 420e465c7d..ed0c9e811d 100644 --- a/backend/census_historical_migration/workbooklib/findings_text.py +++ b/backend/census_historical_migration/workbooklib/findings_text.py @@ -1,15 +1,15 @@ -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, map_simple_columns, generate_dissemination_test_table, set_workbook_uei, ) -from census_historical_migration.base_field_maps import ( +from ..base_field_maps import ( SheetFieldMap, WorkbookFieldInDissem, ) -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.models import ELECFINDINGSTEXT as FindingsText +from ..workbooklib.templates import sections_to_template_paths +from ..models import ELECFINDINGSTEXT as FindingsText from audit.fixtures.excel import FORM_SECTIONS import openpyxl as pyxl diff --git a/backend/census_historical_migration/workbooklib/secondary_auditors.py b/backend/census_historical_migration/workbooklib/secondary_auditors.py index 2918b75f90..760a34f255 100644 --- a/backend/census_historical_migration/workbooklib/secondary_auditors.py +++ b/backend/census_historical_migration/workbooklib/secondary_auditors.py @@ -1,13 +1,13 @@ from ..transforms.xform_string_to_string import string_to_string -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_audit_header, map_simple_columns, generate_dissemination_test_table, set_workbook_uei, ) -from census_historical_migration.base_field_maps import SheetFieldMap -from census_historical_migration.workbooklib.templates import sections_to_template_paths -from census_historical_migration.models import ELECCPAS as Caps +from ..base_field_maps import SheetFieldMap +from ..workbooklib.templates import sections_to_template_paths +from ..models import ELECCPAS as Caps from audit.fixtures.excel import FORM_SECTIONS import openpyxl as pyxl diff --git a/backend/census_historical_migration/workbooklib/workbook_builder.py b/backend/census_historical_migration/workbooklib/workbook_builder.py index 631946cda1..9d2bcc9b45 100644 --- a/backend/census_historical_migration/workbooklib/workbook_builder.py +++ b/backend/census_historical_migration/workbooklib/workbook_builder.py @@ -1,7 +1,7 @@ from django.core.files.uploadedfile import SimpleUploadedFile from fs.memoryfs import MemoryFS -from census_historical_migration.workbooklib.excel_creation_utils import ( +from ..workbooklib.excel_creation_utils import ( get_template_name_for_section, ) diff --git a/backend/census_historical_migration/workbooklib/workbook_builder_loader.py b/backend/census_historical_migration/workbooklib/workbook_builder_loader.py index 3c5db80028..07c2bd3a94 100644 --- a/backend/census_historical_migration/workbooklib/workbook_builder_loader.py +++ b/backend/census_historical_migration/workbooklib/workbook_builder_loader.py @@ -1,5 +1,5 @@ -from census_historical_migration.workbooklib.workbook_builder import generate_workbook -from census_historical_migration.workbooklib.post_upload_utils import ( +from ..workbooklib.workbook_builder import generate_workbook +from ..workbooklib.post_upload_utils import ( _post_upload_workbook, ) diff --git a/backend/census_historical_migration/workbooklib/workbook_section_handlers.py b/backend/census_historical_migration/workbooklib/workbook_section_handlers.py index 3b8e4a730c..3c55eb0d3f 100644 --- a/backend/census_historical_migration/workbooklib/workbook_section_handlers.py +++ b/backend/census_historical_migration/workbooklib/workbook_section_handlers.py @@ -1,22 +1,22 @@ from audit.fixtures.excel import FORM_SECTIONS -from census_historical_migration.workbooklib.notes_to_sefa import generate_notes_to_sefa -from census_historical_migration.workbooklib.federal_awards import ( +from ..workbooklib.notes_to_sefa import generate_notes_to_sefa +from ..workbooklib.federal_awards import ( generate_federal_awards, ) -from census_historical_migration.workbooklib.findings import generate_findings -from census_historical_migration.workbooklib.findings_text import generate_findings_text -from census_historical_migration.workbooklib.corrective_action_plan import ( +from ..workbooklib.findings import generate_findings +from ..workbooklib.findings_text import generate_findings_text +from ..workbooklib.corrective_action_plan import ( generate_corrective_action_plan, ) -from census_historical_migration.workbooklib.additional_ueis import ( +from ..workbooklib.additional_ueis import ( generate_additional_ueis, ) -from census_historical_migration.workbooklib.additional_eins import ( +from ..workbooklib.additional_eins import ( generate_additional_eins, ) -from census_historical_migration.workbooklib.secondary_auditors import ( +from ..workbooklib.secondary_auditors import ( generate_secondary_auditors, )