Skip to content

Commit

Permalink
Let ruff cleanup & sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenbeam committed Nov 27, 2024
1 parent 89ac839 commit 8c9b8da
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/nsidc/metgen/aws.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import boto3


KINESIS_PARTITION_KEY = "metgenc-duck"


Expand Down
5 changes: 1 addition & 4 deletions src/nsidc/metgen/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import click

from nsidc.metgen import config
from nsidc.metgen import metgen
from nsidc.metgen import constants

from nsidc.metgen import config, constants, metgen

LOGGER = logging.getLogger("metgenc")

Expand Down
3 changes: 1 addition & 2 deletions src/nsidc/metgen/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import os.path
from pathlib import Path

from nsidc.metgen import aws
from nsidc.metgen import constants
from nsidc.metgen import aws, constants


class ValidationError(Exception):
Expand Down
14 changes: 5 additions & 9 deletions src/nsidc/metgen/metgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@
import dataclasses
import datetime as dt
import hashlib
from importlib.resources import open_text
import json
import jsonschema
import logging
import os.path
import sys
from typing import Callable
import uuid
from importlib.resources import open_text
from pathlib import Path
from string import Template
import uuid
from typing import Callable

import jsonschema
from funcy import all, filter, partial, rcompose, take
from pyfiglet import Figlet
from returns.maybe import Maybe
from rich.prompt import Confirm, Prompt

from nsidc.metgen import aws
from nsidc.metgen import config
from nsidc.metgen import constants
from nsidc.metgen import netcdf_reader

from nsidc.metgen import aws, config, constants, netcdf_reader

# -------------------------------------------------------------------
CONSOLE_FORMAT = "%(message)s"
Expand Down
7 changes: 3 additions & 4 deletions src/nsidc/metgen/netcdf_reader.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import json
import os.path
import xarray as xr
from datetime import timezone
from dateutil.parser import parse

from pyproj import CRS
from pyproj import Transformer
import xarray as xr
from dateutil.parser import parse
from pyproj import CRS, Transformer

from nsidc.metgen import constants

Expand Down
4 changes: 1 addition & 3 deletions tests/test_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
from tempfile import TemporaryFile

import boto3
from moto import mock_aws
import pytest

from moto import mock_aws
from nsidc.metgen import aws


# Unit tests for the 'aws' module functions.
#
# The test boundary is the aws module's interface with the AWS library's boto3
Expand Down
4 changes: 1 addition & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from unittest.mock import patch

from click.testing import CliRunner
import pytest

from click.testing import CliRunner
from nsidc.metgen.cli import cli


# Unit tests for the 'cli' module functions.
#
# The test boundary is the cli module's interface with the metgen module, so in
Expand Down
7 changes: 2 additions & 5 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from configparser import ConfigParser, ExtendedInterpolation
import dataclasses
from configparser import ConfigParser, ExtendedInterpolation
from unittest.mock import patch

import pytest

from nsidc.metgen import config
from nsidc.metgen import constants

from nsidc.metgen import config, constants

# Unit tests for the 'config' module functions.
#
Expand Down
6 changes: 2 additions & 4 deletions tests/test_metgen.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import datetime as dt
from unittest.mock import patch

from funcy import identity, partial
import pytest

from nsidc.metgen import config
from nsidc.metgen import metgen
from funcy import identity, partial
from nsidc.metgen import config, metgen

# Unit tests for the 'metgen' module functions.
#
Expand Down
4 changes: 1 addition & 3 deletions tests/test_netcdf_reader.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import pytest

from nsidc.metgen import constants
from nsidc.metgen import netcdf_reader
from nsidc.metgen import constants, netcdf_reader

# Unit tests for the 'netcdf_reader' module functions.
#
Expand Down

0 comments on commit 8c9b8da

Please sign in to comment.