Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ruff from 0.7.4 to 0.8.0 in /requirements #2423

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.5
rev: v0.8.0
hooks:
- id: ruff
types_or:
Expand Down
2 changes: 1 addition & 1 deletion experiments/ssl4eo/download_ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def worker(idx: int) -> None:
print(f'Downloaded {count} images in {time.time() - start_time:.3f}s.')
else:
if args.debug:
print('no suitable image for location %d.' % (idx))
print(f'no suitable image for location {idx}.')

# add to existing checked locations
with open(ext_path, 'a') as f:
Expand Down
2 changes: 1 addition & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
'resnet50',
'resnet152',
'scalemae_large_patch16',
'swin_v2_t',
'swin_v2_b',
'swin_v2_t',
'vit_small_patch16_224',
)

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ docs = [
style = [
# mypy 0.900+ required for pyproject.toml support
"mypy>=0.900",
# ruff 0.2+ required for [ruff.lint]
"ruff>=0.2",
# ruff 0.8+ required for removal of ANN101, ANN102
"ruff>=0.8",
]
tests = [
# nbmake 1.3.3+ required for variable mocking
Expand Down Expand Up @@ -298,7 +298,7 @@ skip-magic-trailing-comma = true

[tool.ruff.lint]
extend-select = ["ANN", "D", "I", "RUF", "UP"]
ignore = ["ANN101", "ANN102", "ANN401"]
ignore = ["ANN401"]

[tool.ruff.lint.per-file-ignores]
"docs/**" = ["ANN", "D"]
Expand Down
2 changes: 1 addition & 1 deletion requirements/style.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# style
mypy==1.13.0
ruff==0.7.4
ruff==0.8.0
56 changes: 26 additions & 30 deletions torchgeo/datamodules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,67 +55,63 @@
from .xview import XView2DataModule

__all__ = (
# GeoDataset
'AgriFieldNetDataModule',
'ChesapeakeCVPRDataModule',
'IOBenchDataModule',
'L7IrishDataModule',
'L8BiomeDataModule',
'NAIPChesapeakeDataModule',
'Sentinel2CDLDataModule',
'Sentinel2EuroCropsDataModule',
'Sentinel2NCCMDataModule',
'Sentinel2SouthAmericaSoybeanDataModule',
'SouthAfricaCropTypeDataModule',
# NonGeoDataset
'BaseDataModule',
'BigEarthNetDataModule',
'CaFFeDataModule',
'COWCCountingDataModule',
'CaBuArDataModule',
'CaFFeDataModule',
'ChaBuDDataModule',
'COWCCountingDataModule',
'ChesapeakeCVPRDataModule',
'DeepGlobeLandCoverDataModule',
'DigitalTyphoonDataModule',
'ETCI2021DataModule',
'EuroSAT100DataModule',
'EuroSATDataModule',
'EuroSATSpatialDataModule',
'EuroSAT100DataModule',
'FAIR1MDataModule',
'FieldsOfTheWorldDataModule',
'FireRiskDataModule',
'GeoNRWDataModule',
'GID15DataModule',
'GeoDataModule',
'GeoNRWDataModule',
'IOBenchDataModule',
'InriaAerialImageLabelingDataModule',
'LandCoverAIDataModule',
'LandCoverAI100DataModule',
'L7IrishDataModule',
'L8BiomeDataModule',
'LEVIRCDDataModule',
'LEVIRCDPlusDataModule',
'LandCoverAI100DataModule',
'LandCoverAIDataModule',
'LoveDADataModule',
'MisconfigurationException',
'NAIPChesapeakeDataModule',
'NASAMarineDebrisDataModule',
'NonGeoDataModule',
'OSCDDataModule',
'Potsdam2DDataModule',
'QuakeSetDataModule',
'RESISC45DataModule',
'SeasonalContrastS2DataModule',
'SEN12MSDataModule',
'SKIPPDDataModule',
'So2SatDataModule',
'SpaceNetBaseDataModule',
'SpaceNet1DataModule',
'SpaceNet6DataModule',
'SSL4EOLBenchmarkDataModule',
'SSL4EOLDataModule',
'SSL4EOS12DataModule',
'SeasonalContrastS2DataModule',
'Sentinel2CDLDataModule',
'Sentinel2EuroCropsDataModule',
'Sentinel2NCCMDataModule',
'Sentinel2SouthAmericaSoybeanDataModule',
'So2SatDataModule',
'SouthAfricaCropTypeDataModule',
'SpaceNet1DataModule',
'SpaceNet6DataModule',
'SpaceNetBaseDataModule',
'SustainBenchCropYieldDataModule',
'TropicalCycloneDataModule',
'UCMercedDataModule',
'USAVarsDataModule',
'Vaihingen2DDataModule',
'VHR10DataModule',
'Vaihingen2DDataModule',
'XView2DataModule',
# Base classes
'BaseDataModule',
'GeoDataModule',
'NonGeoDataModule',
# Utilities
'MisconfigurationException',
)
152 changes: 73 additions & 79 deletions torchgeo/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,34 +147,84 @@
from .zuericrop import ZueriCrop

__all__ = (
# GeoDataset
'ADVANCE',
'CDL',
'COWC',
'DFC2022',
'ETCI2021',
'EUDEM',
'FAIR1M',
'GBIF',
'GID15',
'LEVIRCD',
'NAIP',
'NCCM',
'NLCD',
'OSCD',
'PASTIS',
'PRISMA',
'RESISC45',
'SEN12MS',
'SKIPPD',
'SSL4EO',
'SSL4EOL',
'SSL4EOS12',
'VHR10',
'AbovegroundLiveWoodyBiomassDensity',
'AgriFieldNet',
'Airphen',
'AsterGDEM',
'BeninSmallHolderCashews',
'BigEarthNet',
'BioMassters',
'BoundingBox',
'CMSGlobalMangroveCanopy',
'COWCCounting',
'COWCDetection',
'CV4AKenyaCropType',
'CaBuAr',
'CaFFe',
'CanadianBuildingFootprints',
'CDL',
'ChaBuD',
'Chesapeake',
'ChesapeakeCVPR',
'ChesapeakeDC',
'ChesapeakeDE',
'ChesapeakeMD',
'ChesapeakeNY',
'ChesapeakePA',
'ChesapeakeVA',
'ChesapeakeWV',
'ChesapeakeCVPR',
'CMSGlobalMangroveCanopy',
'CloudCoverDetection',
'CropHarvest',
'DatasetNotFoundError',
'DeepGlobeLandCover',
'DependencyNotFoundError',
'DigitalTyphoon',
'EDDMapS',
'EnviroAtlas',
'Esri2020',
'EuroCrops',
'EUDEM',
'GBIF',
'EuroSAT',
'EuroSAT100',
'EuroSATSpatial',
'FieldsOfTheWorld',
'FireRisk',
'ForestDamage',
'GeoDataset',
'GeoNRW',
'GlobBiomass',
'IDTReeS',
'INaturalist',
'IOBench',
'InriaAerialImageLabeling',
'IntersectionDataset',
'L7Irish',
'L8Biome',
'LEVIRCDBase',
'LEVIRCDPlus',
'LandCoverAI',
'LandCoverAI100',
'LandCoverAIBase',
'LandCoverAIGeo',
'Landsat',
Expand All @@ -188,70 +238,32 @@
'Landsat7',
'Landsat8',
'Landsat9',
'NAIP',
'NCCM',
'NLCD',
'OpenBuildings',
'PRISMA',
'Sentinel',
'Sentinel1',
'Sentinel2',
'SouthAfricaCropType',
'SouthAmericaSoybean',
# NonGeoDataset
'ADVANCE',
'BeninSmallHolderCashews',
'BigEarthNet',
'BioMassters',
'CaBuAr',
'CaFFe',
'ChaBuD',
'CloudCoverDetection',
'COWC',
'COWCCounting',
'COWCDetection',
'CV4AKenyaCropType',
'DeepGlobeLandCover',
'DFC2022',
'DigitalTyphoon',
'EnviroAtlas',
'ETCI2021',
'EuroSAT',
'EuroSATSpatial',
'EuroSAT100',
'FAIR1M',
'FieldsOfTheWorld',
'FireRisk',
'ForestDamage',
'GeoNRW',
'GID15',
'IDTReeS',
'InriaAerialImageLabeling',
'LandCoverAI',
'LandCoverAI100',
'LEVIRCD',
'LEVIRCDBase',
'LEVIRCDPlus',
'LoveDA',
'MMEarth',
'MapInWild',
'MillionAID',
'MMEarth',
'NASAMarineDebris',
'OSCD',
'PASTIS',
'NonGeoClassificationDataset',
'NonGeoDataset',
'OpenBuildings',
'PatternNet',
'Potsdam2D',
'QuakeSet',
'RESISC45',
'RGBBandsMissingError',
'RasterDataset',
'ReforesTree',
'RwandaFieldBoundary',
'SSL4EOLBenchmark',
'SatlasPretrain',
'SeasonalContrastS2',
'SeasoNet',
'SEN12MS',
'SKIPPD',
'SeasonalContrastS2',
'Sentinel',
'Sentinel1',
'Sentinel2',
'SkyScript',
'So2Sat',
'SouthAfricaCropType',
'SouthAmericaSoybean',
'SpaceNet',
'SpaceNet1',
'SpaceNet2',
Expand All @@ -261,41 +273,23 @@
'SpaceNet6',
'SpaceNet7',
'SpaceNet8',
'SSL4EO',
'SSL4EOLBenchmark',
'SSL4EOL',
'SSL4EOS12',
'SustainBenchCropYield',
'TropicalCyclone',
'UCMerced',
'USAVars',
'UnionDataset',
'Vaihingen2D',
'VHR10',
'VectorDataset',
'WesternUSALiveFuelMoisture',
'XView2',
'ZueriCrop',
# Base classes
'GeoDataset',
'IntersectionDataset',
'NonGeoClassificationDataset',
'NonGeoDataset',
'RasterDataset',
'UnionDataset',
'VectorDataset',
# Utilities
'BoundingBox',
'concat_samples',
'merge_samples',
'stack_samples',
'unbind_samples',
# Splits
'random_bbox_assignment',
'random_bbox_splitting',
'random_grid_cell_assignment',
'roi_split',
'stack_samples',
'time_series_split',
# Errors
'DatasetNotFoundError',
'DependencyNotFoundError',
'RGBBandsMissingError',
'unbind_samples',
)
Loading