Skip to content

Commit 13a2c36

Browse files
davenquinngithub-actions[bot]
authored andcommitted
Format code and sort imports
1 parent f87ab3d commit 13a2c36

File tree

13 files changed

+36
-30
lines changed

13 files changed

+36
-30
lines changed

cli/macrostrat/cli/entrypoint.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
from pathlib import Path
33

44
import typer
5-
from macrostrat.app_frame import CommandBase
6-
from macrostrat.utils.shell import run
75
from rich import print
86
from rich.traceback import install
97
from typer import Argument, Typer
108

9+
from macrostrat.app_frame import CommandBase
1110
from macrostrat.cli.database.rockd.cli import cli as rockd_cli
1211
from macrostrat.cli.database.rockd.db_subsystem import rockd_subsystem
1312
from macrostrat.core import app
1413
from macrostrat.core.exc import MacrostratError
1514
from macrostrat.core.main import env_text, set_app_state
15+
from macrostrat.utils.shell import run
16+
1617
from .database import db_app, db_subsystem
1718
from .subsystems.dev import dev_app
1819
from .subsystems.macrostrat_api import MacrostratAPISubsystem

cli/macrostrat/cli/subsystems/sgp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typer import Typer
66

77
from macrostrat.cli.database import get_db
8+
89
from .match import log_matches, match_sgp_data_cmd
910
from .migrations import *
1011
from .paleogeography import compute_paleo_positions

cli/macrostrat/cli/subsystems/sgp/match/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pathlib import Path
77

88
from geopandas import sjoin
9-
from macrostrat.database import Database
109
from pandas import DataFrame, isna, read_sql
1110
from pydantic import BaseModel
1211
from rich.live import Live
@@ -17,15 +16,17 @@
1716

1817
from macrostrat.cli.database import get_db
1918
from macrostrat.core.console import err_console as console
19+
from macrostrat.database import Database
2020
from macrostrat.match_utils import (
2121
MatchType,
22+
create_ignore_list,
2223
format_names,
23-
standardize_names,
2424
get_columns_data_frame,
2525
get_match_types,
2626
get_matched_unit,
27-
create_ignore_list,
27+
standardize_names,
2828
)
29+
2930
from ..utils import get_sgp_db, get_sgp_samples, stored_procedure, write_to_file
3031

3132
here = Path(__file__).parent

cli/macrostrat/cli/subsystems/test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
from pathlib import Path
77

8-
from macrostrat.utils import working_directory
98
from pytest import main
109
from typer import Context, Typer
1110

1211
from macrostrat.core.config import settings
12+
from macrostrat.utils import working_directory
1313

1414
cli = Typer(
1515
short_help="Macrostrat tests",

core/macrostrat/core/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
from os import environ
22
from pathlib import Path
3-
from sys import exit, argv
3+
from sys import argv, exit
44

55
import toml
66
from dynaconf import Dynaconf
7+
from rich.console import Console
8+
from typer import Context, Option, get_app_dir
9+
710
from macrostrat.app_frame import (
811
Application,
12+
ControlCommand,
913
Subsystem,
1014
SubsystemManager,
11-
ControlCommand,
1215
)
1316
from macrostrat.app_frame.control_command import CommandBase
1417
from macrostrat.utils import get_logger
15-
from rich.console import Console
16-
from typer import get_app_dir, Context, Option
1718

1819
from .console import console_theme
1920
from .exc import MacrostratError

py-modules/match-utils/macrostrat/match_utils/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
from contextvars import ContextVar
22

33
from geopandas import GeoDataFrame
4-
from macrostrat.database import Database
54
from pandas import isna, read_sql
65
from pydantic import BaseModel
76
from sqlalchemy.sql import text
87

9-
from .models import MatchType, MatchComparison, MatchResult
8+
from macrostrat.database import Database
9+
10+
from .models import MatchComparison, MatchResult, MatchType
1011
from .strat_names import (
11-
format_name,
1212
clean_strat_name,
1313
clean_strat_name_text,
1414
create_ignore_list,
15+
format_name,
1516
)
1617
from .utils import stored_procedure
1718

py-modules/match-utils/macrostrat/match_utils/test_clean_strat_name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pytest import fixture
22

3-
from .strat_names import clean_strat_name, StratRank, create_ignore_list
3+
from .strat_names import StratRank, clean_strat_name, create_ignore_list
44

55

66
@fixture(scope="module", autouse=True)

py-modules/match-utils/macrostrat/match_utils/test_match_strat_names.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
from pytest import mark
1010

1111
from . import (
12-
get_matched_unit,
13-
standardize_names,
14-
get_columns_for_location,
1512
ensure_single,
16-
get_column_units,
1713
get_all_matched_units,
14+
get_column_units,
15+
get_columns_for_location,
16+
get_matched_unit,
17+
standardize_names,
1818
)
1919
from .models import MatchResult
2020

21-
2221
# xy == -109.905/35.951
2322
# strat name candidate Navajo
2423
# expected match Navajo Sandstone, unit_id 14999, col_id 490, strat_name_id 3361

py-modules/match-utils/macrostrat/match_utils/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pathlib import Path
2+
23
from sqlalchemy.sql import text
34

45
_query_cache = {}

services/api-v3/api/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
import dotenv
44
import uvicorn
5+
from api.routes.dev_routes.convert import convert_router
56
from fastapi import FastAPI
67
from fastapi.middleware.cors import CORSMiddleware
78

8-
from api.routes.dev_routes.convert import convert_router
9-
109
dotenv.load_dotenv()
1110

1211
import api.routes.security
1312
from api.database import connect_engine, dispose_engine
13+
from api.match import router as match_router
1414
from api.routes.ingest import router as ingest_router
1515
from api.routes.object import router as object_router
1616
from api.routes.sources import router as sources_router
17-
from api.match import router as match_router
1817

1918

2019
@asynccontextmanager

0 commit comments

Comments
 (0)