Skip to content

Commit 7bd3ea8

Browse files
davenquinngithub-actions[bot]
authored andcommitted
Format code and sort imports
1 parent c630760 commit 7bd3ea8

File tree

16 files changed

+113
-62
lines changed

16 files changed

+113
-62
lines changed

py-modules/cli/macrostrat/cli/commands/rebuild_scripts/lookup_strat_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from psycopg2.sql import Identifier
44
from rich.console import Console
5-
from rich.progress import track, Progress
5+
from rich.progress import Progress, track
66

77
from macrostrat.core.exc import MacrostratError
88

py-modules/cli/macrostrat/cli/commands/rebuild_scripts/lookup_unit_attrs_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from .lookup_units import copy_table_into_place
2-
from ..base import Base
1+
from pathlib import Path
32

43
from macrostrat.core.database import get_database
5-
from pathlib import Path
4+
5+
from ..base import Base
6+
from .lookup_units import copy_table_into_place
67

78
here = Path(__file__).parent
89

py-modules/cli/macrostrat/cli/commands/rebuild_scripts/lookup_unit_intervals.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
from ..base import Base
2-
from macrostrat.core.database import get_database
31
from pathlib import Path
4-
from .lookup_units import update_intervals, copy_table_into_place
2+
53
from psycopg2.sql import Identifier
64

5+
from macrostrat.core.database import get_database
6+
7+
from ..base import Base
8+
from .lookup_units import copy_table_into_place, update_intervals
9+
710
here = Path(__file__).parent
811

912

py-modules/cli/macrostrat/cli/commands/rebuild_scripts/lookup_units.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
from ..base import Base
2-
from ...database import get_db
31
from pathlib import Path
2+
43
from psycopg2.sql import Identifier
54

5+
from ...database import get_db
6+
from ..base import Base
7+
68
here = Path(__file__).parent
79

810

py-modules/cli/macrostrat/cli/database/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
from typing import Any, Callable, Iterable
55

66
import typer
7+
from psycopg2.sql import Identifier
78
from pydantic import BaseModel
89
from rich import print
910
from sqlalchemy import make_url, text
10-
from psycopg2.sql import Identifier
1111
from typer import Argument, Option
1212

1313
from macrostrat.core import MacrostratSubsystem, app
@@ -20,10 +20,10 @@
2020
from macrostrat.utils.shell import run
2121

2222
from ._legacy import get_db
23+
from .sequences import reset_sequences
2324

2425
# NOTE: right now, this is quite implicit.
2526
from .utils import engine_for_db_name, setup_postgrest_access
26-
from .sequences import reset_sequences
2727

2828
log = get_logger(__name__)
2929

py-modules/cli/macrostrat/cli/database/sequences.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
from rich import print
2-
from psycopg2.sql import Identifier
31
import re
2+
3+
from psycopg2.sql import Identifier
4+
from rich import print
5+
46
from macrostrat.database import Database
57

68

py-modules/cli/macrostrat/cli/entrypoint.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
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.core import app
1211
from macrostrat.core.exc import MacrostratError
1312
from macrostrat.core.main import env_text, set_app_state
13+
from macrostrat.utils.shell import run
14+
1415
from .database import db_app, db_subsystem
1516
from .schema_management import schema_app
1617
from .subsystems.dev import dev_app
@@ -274,6 +275,7 @@ def update_weaver(db):
274275

275276
try:
276277
from macrostrat.column_ingestion import app as column_app
278+
277279
main.add_typer(
278280
column_app,
279281
name="columns",
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
from pathlib import Path
22

3-
from typer import Typer, Argument
3+
from typer import Argument, Typer
44

55
app = Typer(
66
no_args_is_help=True,
77
help="Column ingestion subsystem for Macrostrat",
88
)
99

10+
1011
@app.command(name="ingest")
11-
def ingest_columns(data_file: Path = Argument(..., help="Path to the data file to ingest")):
12+
def ingest_columns(
13+
data_file: Path = Argument(..., help="Path to the data file to ingest")
14+
):
1215
"""Ingest columns tabular data."""
1316
from .ingest import ingest_columns_from_file
1417

1518
ingest_columns_from_file(data_file)
16-
17-
18-
19-
20-
21-
22-
23-

py-modules/column-ingestion/macrostrat/column_ingestion/columns.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
from datetime import datetime
33

44
import polars as pl
5-
from macrostrat.database import Database
65
from sqlalchemy.dialects.postgresql import insert
76

7+
from macrostrat.database import Database
8+
89
from .database import get_macrostrat_table
910
from .units import Unit
1011

py-modules/column-ingestion/macrostrat/column_ingestion/database.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import re
22
from typing import Optional
33

4-
from macrostrat.core.database import get_database
54
from pydantic import BaseModel
65

6+
from macrostrat.core.database import get_database
7+
78

89
class ProjectIdentifier(BaseModel):
910
id: Optional[int] = None

0 commit comments

Comments
 (0)