mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-05 20:54:18 -07:00
Issue 105: Configure and run black
and other pre-commit hooks (clean branch) (#1962)
* Configure and run `black` and other pre-commit hooks Co-authored-by: matt bowen <matthew.r.bowen@omb.eop.gov>
This commit is contained in:
parent
baa34ec038
commit
6e6223cd5e
162 changed files with 716 additions and 602 deletions
|
@ -1,8 +1,8 @@
|
|||
import pandas as pd
|
||||
import pytest
|
||||
from data_pipeline.config import settings
|
||||
from data_pipeline.score.field_names import GEOID_TRACT_FIELD
|
||||
from data_pipeline.etl.score import constants
|
||||
from data_pipeline.score.field_names import GEOID_TRACT_FIELD
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
# flake8: noqa: W0613,W0611,F811
|
||||
from dataclasses import dataclass
|
||||
|
||||
import pytest
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.utils import get_module_logger
|
||||
from data_pipeline.score.score_narwhal import ScoreNarwhal
|
||||
from data_pipeline.utils import get_module_logger
|
||||
|
||||
from .fixtures import final_score_df # pylint: disable=unused-import
|
||||
|
||||
logger = get_module_logger(__name__)
|
||||
|
|
|
@ -2,36 +2,35 @@
|
|||
# pylint: disable=unused-import,too-many-arguments
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
import pytest
|
||||
import pandas as pd
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from data_pipeline.etl.score import constants
|
||||
from data_pipeline.etl.score.constants import TILES_ISLAND_AREA_FIPS_CODES
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.score.field_names import GEOID_TRACT_FIELD
|
||||
from data_pipeline.etl.score.constants import TILES_ISLAND_AREA_FIPS_CODES
|
||||
from .fixtures import (
|
||||
final_score_df,
|
||||
ejscreen_df,
|
||||
hud_housing_df,
|
||||
census_acs_df,
|
||||
cdc_places_df,
|
||||
census_acs_median_incomes_df,
|
||||
cdc_life_expectancy_df,
|
||||
doe_energy_burden_df,
|
||||
national_risk_index_df,
|
||||
dot_travel_disadvantage_df,
|
||||
fsf_fire_df,
|
||||
nature_deprived_df,
|
||||
eamlis_df,
|
||||
fuds_df,
|
||||
geocorr_urban_rural_df,
|
||||
census_decennial_df,
|
||||
census_2010_df,
|
||||
hrs_df,
|
||||
national_tract_df,
|
||||
tribal_overlap,
|
||||
)
|
||||
|
||||
from .fixtures import cdc_life_expectancy_df # noqa
|
||||
from .fixtures import cdc_places_df # noqa
|
||||
from .fixtures import census_2010_df # noqa
|
||||
from .fixtures import census_acs_df # noqa
|
||||
from .fixtures import census_acs_median_incomes_df # noqa
|
||||
from .fixtures import census_decennial_df # noqa
|
||||
from .fixtures import doe_energy_burden_df # noqa
|
||||
from .fixtures import dot_travel_disadvantage_df # noqa
|
||||
from .fixtures import eamlis_df # noqa
|
||||
from .fixtures import ejscreen_df # noqa
|
||||
from .fixtures import final_score_df # noqa
|
||||
from .fixtures import fsf_fire_df # noqa
|
||||
from .fixtures import fuds_df # noqa
|
||||
from .fixtures import geocorr_urban_rural_df # noqa
|
||||
from .fixtures import hrs_df # noqa
|
||||
from .fixtures import hud_housing_df # noqa
|
||||
from .fixtures import national_risk_index_df # noqa
|
||||
from .fixtures import national_tract_df # noqa
|
||||
from .fixtures import nature_deprived_df # noqa
|
||||
from .fixtures import tribal_overlap # noqa
|
||||
|
||||
pytestmark = pytest.mark.smoketest
|
||||
UNMATCHED_TRACT_THRESHOLD = 1000
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# pylint: disable=protected-access
|
||||
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from data_pipeline.config import settings
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.etl.score.etl_score import ScoreETL
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.utils import get_module_logger
|
||||
|
||||
logger = get_module_logger(__name__)
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
# flake8: noqa: W0613,W0611,F811
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
import pandas as pd
|
||||
|
||||
import geopandas as gpd
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from data_pipeline.config import settings
|
||||
from data_pipeline.etl.score import constants
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.etl.score.constants import THRESHOLD_COUNT_TO_SHOW_FIELD_NAME
|
||||
from data_pipeline.etl.score.constants import TILES_SCORE_COLUMNS
|
||||
from data_pipeline.etl.score.constants import (
|
||||
TILES_SCORE_COLUMNS,
|
||||
THRESHOLD_COUNT_TO_SHOW_FIELD_NAME,
|
||||
USER_INTERFACE_EXPERIENCE_FIELD_NAME,
|
||||
)
|
||||
from data_pipeline.score import field_names
|
||||
|
||||
from .fixtures import final_score_df # pylint: disable=unused-import
|
||||
|
||||
pytestmark = pytest.mark.smoketest
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# pylint: disable=protected-access
|
||||
# flake8: noqa=F841
|
||||
from contextlib import contextmanager
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
from functools import partial
|
||||
from contextlib import contextmanager
|
||||
|
||||
import pytest
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from data_pipeline.etl.sources.geo_utils import get_tract_geojson
|
||||
from data_pipeline.score import field_names
|
||||
from data_pipeline.score.utils import (
|
||||
calculate_tract_adjacency_scores as original_calculate_tract_adjacency_score,
|
||||
)
|
||||
from data_pipeline.etl.sources.geo_utils import get_tract_geojson
|
||||
from data_pipeline.score import field_names
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue