Skip to content

Commit

Permalink
Force isort to sort local import correctly
Browse files Browse the repository at this point in the history
Also run isort on all the files to get them to match this setting.
  • Loading branch information
parejkoj committed Sep 12, 2024
1 parent d429dd6 commit 026770a
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 25 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.isort]
profile = "black"
line_length = 110
known_first_party = ["lsst"]

[tool.black]
line_length = 110
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/drp/tasks/assemble_cell_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
)


import numpy as np

import lsst.afw.image as afwImage
import lsst.afw.math as afwMath
import lsst.geom as geom
import numpy as np
from lsst.cell_coadds import (
CellIdentifiers,
CoaddUnits,
Expand Down
3 changes: 2 additions & 1 deletion python/lsst/drp/tasks/assemble_chi2_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@

import logging

import numpy as np

import lsst.afw.image as afwImage
import lsst.afw.math as afwMath
import lsst.afw.table as afwTable
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.pipe.base.connectionTypes as cT
import numpy as np
from lsst.afw.detection import Psf
from lsst.meas.algorithms import SourceDetectionTask
from lsst.meas.base import SkyMapIdGeneratorConfig
Expand Down
7 changes: 4 additions & 3 deletions python/lsst/drp/tasks/assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
import logging
import warnings

import lsstDebug
import numpy
from deprecated.sphinx import deprecated

import lsst.afw.geom as afwGeom
import lsst.afw.image as afwImage
import lsst.afw.math as afwMath
Expand All @@ -44,9 +48,6 @@
import lsst.pex.exceptions as pexExceptions
import lsst.pipe.base as pipeBase
import lsst.utils as utils
import lsstDebug
import numpy
from deprecated.sphinx import deprecated
from lsst.meas.algorithms import AccumulatorMeanStack, MaskStreaksTask, ScaleVarianceTask, SourceDetectionTask
from lsst.pipe.tasks.coaddBase import CoaddBaseTask, makeSkyInfo, reorderAndPadList, subBBoxIter
from lsst.pipe.tasks.healSparseMapping import HealSparseInputMapTask
Expand Down
5 changes: 3 additions & 2 deletions python/lsst/drp/tasks/dcr_assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

from math import ceil

import numpy as np
from scipy import ndimage

import lsst.afw.image as afwImage
import lsst.afw.table as afwTable
import lsst.coadd.utils as coaddUtils
Expand All @@ -31,13 +34,11 @@
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.utils as utils
import numpy as np
from lsst.ip.diffim.dcrModel import DcrModel, applyDcr, calculateDcr
from lsst.meas.base import SingleFrameMeasurementTask
from lsst.pipe.tasks.coaddBase import makeSkyInfo, subBBoxIter
from lsst.pipe.tasks.measurePsf import MeasurePsfTask
from lsst.utils.timer import timeMethod
from scipy import ndimage

from .assemble_coadd import (
AssembleCoaddConnections,
Expand Down
11 changes: 6 additions & 5 deletions python/lsst/drp/tasks/gbdesAstrometricFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@
import astropy.time
import astropy.units as u
import astshim
import numpy as np
import wcsfit
import yaml
from sklearn.cluster import AgglomerativeClustering
from smatch.matcher import Matcher

import lsst.afw.geom as afwgeom
import lsst.afw.table
import lsst.geom
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.sphgeom
import numpy as np
import wcsfit
import yaml
from lsst.meas.algorithms import (
LoadReferenceObjectsConfig,
ReferenceObjectLoader,
ReferenceSourceSelectorTask,
)
from lsst.meas.algorithms.sourceSelector import sourceSelectorRegistry
from sklearn.cluster import AgglomerativeClustering
from smatch.matcher import Matcher

__all__ = [
"calculate_apparent_motion",
Expand Down
1 change: 1 addition & 0 deletions python/lsst/drp/tasks/update_visit_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from typing import Any

import astropy.table

import lsst.pipe.base.connectionTypes as cT
from lsst.afw.geom import SkyWcs
from lsst.afw.image import ExposureSummaryStats
Expand Down
9 changes: 5 additions & 4 deletions tests/assemble_coadd_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
This is not intended to test accessing data with the Butler and instead uses
mock Butler data references to pass in the simulated data.
"""
import lsst.afw.geom as afwGeom
import lsst.afw.image as afwImage
import lsst.geom as geom
import lsst.pipe.base as pipeBase
import numpy as np
from astro_metadata_translator import makeObservationInfo
from astropy import units as u
from astropy.coordinates import Angle, EarthLocation, SkyCoord
from astropy.time import Time

import lsst.afw.geom as afwGeom
import lsst.afw.image as afwImage
import lsst.geom as geom
import lsst.pipe.base as pipeBase
from lsst.afw.cameraGeom.testUtils import DetectorWrapper
from lsst.cell_coadds.test_utils import generate_data_id
from lsst.geom import arcseconds, degrees
Expand Down
5 changes: 3 additions & 2 deletions tests/test_assemble_cell_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
import unittest
from typing import TYPE_CHECKING, Iterable

import lsst.pipe.base as pipeBase
import lsst.utils.tests
import numpy as np
from assemble_coadd_test_utils import MockCoaddTestData, makeMockSkyInfo

import lsst.pipe.base as pipeBase
import lsst.utils.tests
from lsst.drp.tasks.assemble_cell_coadd import AssembleCellCoaddConfig, AssembleCellCoaddTask

if TYPE_CHECKING:
Expand Down
5 changes: 3 additions & 2 deletions tests/test_assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
"""
import unittest

import lsst.pipe.base as pipeBase
import lsst.utils.tests
import numpy as np
from assemble_coadd_test_utils import MockCoaddTestData, makeMockSkyInfo

import lsst.pipe.base as pipeBase
import lsst.utils.tests
from lsst.drp.tasks.assemble_coadd import (
AssembleCoaddConfig,
AssembleCoaddTask,
Expand Down
11 changes: 6 additions & 5 deletions tests/test_gbdesAstrometricFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
import astropy.table
import astropy.time
import astropy.units as u
import lsst.afw.geom as afwgeom
import lsst.afw.table as afwTable
import lsst.geom
import lsst.utils
import numpy as np
import pandas as pd
import wcsfit
import yaml
from astropy.coordinates import Distance, SkyCoord
from smatch.matcher import Matcher

import lsst.afw.geom as afwgeom
import lsst.afw.table as afwTable
import lsst.geom
import lsst.utils
from lsst import sphgeom
from lsst.daf.base import PropertyList
from lsst.drp.tasks.gbdesAstrometricFit import (
Expand All @@ -47,7 +49,6 @@
from lsst.meas.algorithms import ReferenceObjectLoader
from lsst.meas.algorithms.testUtils import MockRefcatDataId
from lsst.pipe.base import InMemoryDatasetHandle
from smatch.matcher import Matcher

TESTDIR = os.path.abspath(os.path.dirname(__file__))

Expand Down

0 comments on commit 026770a

Please sign in to comment.