Skip to content

Commit

Permalink
Merge pull request #127 from simonsobs/dev
Browse files Browse the repository at this point in the history
Sort nextline package imports as first party
  • Loading branch information
TaiSakuma authored Sep 25, 2024
2 parents 612f562 + f11c50b commit a858082
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ignore = [
max-complexity = 20

[tool.ruff.lint.isort]
known-first-party = ["nextline_test_utils"]
known-first-party = ["nextline", "nextlinegraphql", "nextline_test_utils"]

[tool.coverage.run]
branch = true
Expand Down
3 changes: 2 additions & 1 deletion src/nextline_rdb/init.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from logging import getLogger
from typing import Optional

from nextline import Nextline
from sqlalchemy import func, select
from sqlalchemy.orm import selectinload

from nextline import Nextline

from .db import DB
from .models import CurrentScript, Run

Expand Down
1 change: 1 addition & 0 deletions src/nextline_rdb/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from apluggy import asynccontextmanager
from dynaconf import Dynaconf, Validator

from nextlinegraphql.hook import spec

from . import write
Expand Down
1 change: 0 additions & 1 deletion src/nextline_rdb/write/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__all__ = ['register']

from nextline import Nextline

from nextline_rdb.db import DB

from .write_prompt_table import WritePromptTable
Expand Down
4 changes: 2 additions & 2 deletions src/nextline_rdb/write/write_prompt_table.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from nextline.events import OnEndPrompt, OnStartPrompt
from nextline.plugin.spec import hookimpl
from sqlalchemy import select
from sqlalchemy.orm import selectinload

from nextline.events import OnEndPrompt, OnStartPrompt
from nextline.plugin.spec import hookimpl
from nextline_rdb.db import DB
from nextline_rdb.models import Prompt, Run, Trace, TraceCall
from nextline_rdb.utils import until_scalar_one
Expand Down
4 changes: 2 additions & 2 deletions src/nextline_rdb/write/write_run_table.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from datetime import timezone
from logging import getLogger

from nextline.events import OnEndRun, OnStartRun
from nextline.plugin.spec import hookimpl
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import selectinload

from nextline.events import OnEndRun, OnStartRun
from nextline.plugin.spec import hookimpl
from nextline_rdb.db import DB
from nextline_rdb.models import CurrentScript, Run, Script
from nextline_rdb.utils import until_scalar_one
Expand Down
4 changes: 2 additions & 2 deletions src/nextline_rdb/write/write_script_table.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from nextline.plugin.spec import Context, hookimpl
from nextline.spawned import RunArg
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import selectinload

from nextline.plugin.spec import Context, hookimpl
from nextline.spawned import RunArg
from nextline_rdb.db import DB
from nextline_rdb.models import CurrentScript, Script

Expand Down
4 changes: 2 additions & 2 deletions src/nextline_rdb/write/write_stdout_table.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nextline.events import OnWriteStdout
from nextline.plugin.spec import hookimpl
from sqlalchemy import select

from nextline.events import OnWriteStdout
from nextline.plugin.spec import hookimpl
from nextline_rdb.db import DB
from nextline_rdb.models import Run, Stdout, Trace
from nextline_rdb.utils import until_scalar_one
Expand Down
6 changes: 3 additions & 3 deletions src/nextline_rdb/write/write_trace_call_table.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from nextline.events import OnEndTraceCall, OnStartTraceCall
from nextline.plugin.spec import hookimpl
from nextline.types import TraceNo
from sqlalchemy import select
from sqlalchemy.orm import selectinload

from nextline.events import OnEndTraceCall, OnStartTraceCall
from nextline.plugin.spec import hookimpl
from nextline.types import TraceNo
from nextline_rdb.db import DB
from nextline_rdb.models import Run, Trace, TraceCall
from nextline_rdb.utils import until_scalar_one
Expand Down
4 changes: 2 additions & 2 deletions src/nextline_rdb/write/write_trace_table.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from datetime import timezone

from sqlalchemy import select

from nextline.events import OnEndRun, OnEndTrace, OnStartTrace
from nextline.plugin.spec import hookimpl
from nextline.types import TraceNo
from sqlalchemy import select

from nextline_rdb.db import DB
from nextline_rdb.models import Run, Trace
from nextline_rdb.utils import until_scalar_one
Expand Down
2 changes: 1 addition & 1 deletion tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from hypothesis import given
from nextline import Nextline

from nextline import Nextline
from nextline_rdb.db import DB
from nextline_rdb.init import initialize_nextline
from nextline_rdb.models import Run
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import pytest
import tomli
import tomli_w
from nextlinegraphql import create_app
from nextlinegraphql.plugins.ctrl.graphql import MUTATE_RUN_AND_CONTINUE
from nextlinegraphql.plugins.graphql.test import TestClient, gql_request
from pytest import mark

from nextline_rdb.db import DB
from nextline_rdb.models.strategies import st_model_run_list
from nextlinegraphql import create_app
from nextlinegraphql.plugins.ctrl.graphql import MUTATE_RUN_AND_CONTINUE
from nextlinegraphql.plugins.graphql.test import TestClient, gql_request

from .schema.graphql import QUERY_RDB_CONNECTIONS

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_until.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
from hypothesis import given
from hypothesis import strategies as st
from nextline.utils import aiterable

from nextline.utils import aiterable
from nextline_rdb.utils import UntilNotNoneTimeout, until_not_none


Expand Down
2 changes: 1 addition & 1 deletion tests/write/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from apluggy import PluginManager
from hypothesis import Phase, given, settings

from nextline import Nextline
from nextline.events import (
OnEndPrompt,
Expand All @@ -28,7 +29,6 @@
TraceCallNo,
TraceNo,
)

from nextline_rdb.db import DB
from nextline_rdb.models import (
CurrentScript,
Expand Down

0 comments on commit a858082

Please sign in to comment.