Skip to content

Commit

Permalink
imports: format import order
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTorres committed Mar 27, 2024
1 parent d99d522 commit 072923f
Show file tree
Hide file tree
Showing 19 changed files with 130 additions and 80 deletions.
26 changes: 15 additions & 11 deletions em_stitch/lens_correction/lens_correction_solver.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import glob
import json
import logging
import os
import warnings

import cv2
import numpy as np

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from .schemas import LensCorrectionSchema
from ..utils.generate_EM_tilespecs_from_metafile import \
GenerateEMTileSpecsModule
from ..utils.generate_EM_tilespecs_from_metafile import (
GenerateEMTileSpecsModule)
from ..utils import utils as common_utils
from .mesh_and_solve_transform import MeshAndSolveTransform
from . import utils
from bigfeta import jsongz
import logging
import os
import glob
import json
import numpy as np
import renderapi
import cv2
import warnings

warnings.simplefilter(action='ignore', category=FutureWarning)

logger = logging.getLogger(__name__)
Expand Down
24 changes: 14 additions & 10 deletions em_stitch/lens_correction/mesh_and_solve_transform.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import copy
import datetime
import logging
import os

from six.moves import urllib

import cv2
import numpy as np
import triangle
import scipy.optimize
from scipy.spatial import Delaunay
import scipy.sparse as sparse
from scipy.sparse import csr_matrix
from scipy.sparse.linalg import factorized
import renderapi
import copy
import os
import datetime
import cv2
from six.moves import urllib
from scipy.spatial import Delaunay
import triangle

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from .schemas import MeshLensCorrectionSchema
from .utils import remove_weighted_matches
from bigfeta import jsongz
import logging

try:
# pandas unique is faster than numpy, use where appropriate
Expand Down
7 changes: 5 additions & 2 deletions em_stitch/lens_correction/schemas.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import warnings

from marshmallow.warnings import ChangedInMarshmallow3Warning
import marshmallow as mm

from argschema import ArgSchema
from argschema.schemas import DefaultSchema
from argschema.fields import (
Boolean, InputDir, InputFile, Float, List,
Int, OutputDir, Nested, Str, Dict)
Boolean, InputDir, InputFile, Float, List,
Int, OutputDir, Nested, Str, Dict)

warnings.simplefilter(
action='ignore',
category=ChangedInMarshmallow3Warning)
Expand Down
12 changes: 7 additions & 5 deletions em_stitch/lens_correction/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import numpy as np
import cv2
import renderapi
import time
from scipy import ndimage
import logging
from ..utils import utils as common_utils

import cv2
import numpy as np
from scipy import ndimage

import renderapi

from ..utils import utils as common_utils

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion em_stitch/montage/meta_to_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
'''

import argparse
from enum import IntEnum
import glob
import json
import os
import sys
from enum import IntEnum


# Position codes in metafile
Expand Down
16 changes: 9 additions & 7 deletions em_stitch/montage/montage_solver.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import glob
import json
import os

from argschema import ArgSchemaParser
from bigfeta import jsongz
import bigfeta.bigfeta as bfa
import renderapi

from em_stitch.montage import meta_to_collection
from em_stitch.montage.schemas import MontageSolverSchema
from em_stitch.utils.generate_EM_tilespecs_from_metafile import \
GenerateEMTileSpecsModule
from em_stitch.utils.generate_EM_tilespecs_from_metafile import (
GenerateEMTileSpecsModule)
from em_stitch.utils.utils import pointmatch_filter, get_z_from_metafile
from bigfeta import jsongz
import bigfeta.bigfeta as bfa
import json
import os
import glob

dname = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
Expand Down
8 changes: 6 additions & 2 deletions em_stitch/montage/schemas.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import os
import warnings

from marshmallow.warnings import ChangedInMarshmallow3Warning
import marshmallow as mm

from argschema import ArgSchema
from argschema.fields import (
Boolean, InputDir, InputFile, Float, OutputDir, List, Str, Dict)
import os
Boolean, InputDir, InputFile, Float,
OutputDir, List, Str, Dict)

warnings.simplefilter(
action='ignore',
category=ChangedInMarshmallow3Warning)
Expand Down
20 changes: 12 additions & 8 deletions em_stitch/plots/lens_quiver_plots.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import renderapi
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import json
import numpy as np
import datetime
import glob
import json
import os
import re
import warnings
import datetime
from em_stitch.utils.utils import src_from_xy
from em_stitch.plots.schemas import LensQuiverSchema

from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import numpy as np

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from em_stitch.utils.utils import src_from_xy
from em_stitch.plots.schemas import LensQuiverSchema

warnings.simplefilter(action='ignore', category=FutureWarning)

example = {
Expand Down
11 changes: 7 additions & 4 deletions em_stitch/plots/montage_plots.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import json
import os

from matplotlib.backends.backend_pdf import PdfPages
from argschema import ArgSchemaParser
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import renderapi
import numpy as np
import json

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from em_stitch.plots.schemas import MontagePlotsSchema
import os

example = {
"collection_path": "/data/em-131fs3/lctest/T4.2019.04.29b/001738/0/collection.json.gz",
Expand Down
4 changes: 2 additions & 2 deletions em_stitch/plots/schemas.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from argschema import ArgSchema
from argschema.fields import (
InputDir, InputFile, Str, List, Boolean, Int,
OutputFile, Float)
InputDir, InputFile, Str, List, Boolean, Int,
OutputFile, Float)


class LensQuiverSchema(ArgSchema):
Expand Down
15 changes: 9 additions & 6 deletions em_stitch/plots/view_matches.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import logging
import os

import cv2
import numpy as np
import logging
from em_stitch.lens_correction.utils import maps_from_tform
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi
import cv2

from em_stitch.plots.schemas import ViewMatchesSchema
from argschema import ArgSchemaParser
from em_stitch.lens_correction.utils import maps_from_tform

logger = logging.getLogger()

Expand Down
11 changes: 7 additions & 4 deletions em_stitch/utils/generate_EM_tilespecs_from_metafile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import renderapi
import os
import json
import numpy
import os
import pathlib
from bigfeta import jsongz

import numpy

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from .schemas import GenerateEMTileSpecsParameters

# this is a modification of https://github.com/AllenInstitute/
Expand Down
7 changes: 5 additions & 2 deletions em_stitch/utils/schemas.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import warnings

from marshmallow.warnings import ChangedInMarshmallow3Warning

from argschema import ArgSchema
from argschema.fields import (
InputDir, InputFile, Float,
Int, OutputFile, Str, Boolean)
InputDir, InputFile, Float,
Int, OutputFile, Str, Boolean)

warnings.simplefilter(
action='ignore',
category=ChangedInMarshmallow3Warning)
Expand Down
6 changes: 4 additions & 2 deletions em_stitch/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np
import cv2
import json

import cv2
import numpy as np

import renderapi


Expand Down
5 changes: 4 additions & 1 deletion em_stitch/viz/schemas.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import warnings

from marshmallow.warnings import ChangedInMarshmallow3Warning

from argschema import ArgSchema
from argschema.schemas import DefaultSchema
from argschema.fields import (
Nested, Int, Str, Boolean, List)
Nested, Int, Str, Boolean, List)

warnings.simplefilter(
action='ignore',
category=ChangedInMarshmallow3Warning)
Expand Down
11 changes: 7 additions & 4 deletions em_stitch/viz/set_permissions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from argschema import ArgSchemaParser
from .schemas import SetPermissionsSchema
import logging
import os

import subprocess
import sys
import os
import logging

from argschema import ArgSchemaParser

from .schemas import SetPermissionsSchema

logger = logging.getLogger(__name__)

Expand Down
6 changes: 4 additions & 2 deletions em_stitch/viz/set_update_upload.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import logging
import os

from argschema import ArgSchemaParser

from em_stitch.viz.schemas import SetUpdateUploadSchema
from em_stitch.viz.set_permissions import SetPermissions
from em_stitch.viz.update_urls import UpdateUrls
from em_stitch.viz.upload_to_render import UploadToRender
import os
import logging

logger = logging.getLogger(__name__)

Expand Down
11 changes: 7 additions & 4 deletions em_stitch/viz/update_urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import logging
import os
import pathlib
import shutil

from six.moves import urllib
import pathlib
from bigfeta import jsongz

from argschema import ArgSchemaParser
from .schemas import UpdateUrlSchema
from bigfeta import jsongz
import renderapi
import logging

from .schemas import UpdateUrlSchema

logger = logging.getLogger(__name__)

Expand Down
8 changes: 5 additions & 3 deletions em_stitch/viz/upload_to_render.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import logging
import os

from argschema import ArgSchemaParser
from bigfeta import jsongz
import renderapi

from .schemas import UploadToRenderSchema
from bigfeta import jsongz
import os
import logging

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 072923f

Please sign in to comment.