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

[pre-commit.ci] pre-commit autoupdate #330

Merged
merged 2 commits into from
Feb 3, 2025
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
Expand Up @@ -16,6 +16,6 @@ repos:
- id: check-added-large-files
# Code formatting with black
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
2 changes: 1 addition & 1 deletion nowcast/daily_river_flows.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Module for calculating daily river flows
Module for calculating daily river flows
"""

import functools
Expand Down
3 changes: 1 addition & 2 deletions nowcast/figures/publish/surface_current_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


""" Produce surface currents tile figures in both the website themed and un-themed style.
"""
"""Produce surface currents tile figures in both the website themed and un-themed style."""

import datetime

Expand Down
3 changes: 1 addition & 2 deletions nowcast/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""SalishSeaCast utility functions for use by workers.
"""
"""SalishSeaCast utility functions for use by workers."""
import grp
import logging
import logging.handlers
Expand Down
12 changes: 6 additions & 6 deletions nowcast/plots.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
""" script to generate plots for a simulation
Use: python plots.py sim_date mode
Eg: python plots.py 2015-03-06 nowcast generates plots for the
March 6, 2015 nowcast. sim_date corresponds to the date simulated.
plots are stored in a directory mode/run_dat, where run_date is the
date the simulation was run.
"""script to generate plots for a simulation
Use: python plots.py sim_date mode
Eg: python plots.py 2015-03-06 nowcast generates plots for the
March 6, 2015 nowcast. sim_date corresponds to the date simulated.
plots are stored in a directory mode/run_dat, where run_date is the
date the simulation was run.
"""

import datetime
Expand Down
3 changes: 1 addition & 2 deletions nowcast/ssh_sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""SalishSeaCast ssh and sftp client functions.
"""
"""SalishSeaCast ssh and sftp client functions."""
import os

import paramiko
Expand Down
2 changes: 1 addition & 1 deletion nowcast/workers/ping_erddap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""SalishSeaCast worker that creates flag files to tell the ERDDAP server
to reload datasets for which new results have been downloaded.
to reload datasets for which new results have been downloaded.
"""
import logging
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion nowcast/workers/watch_ww3.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Salish Sea nowcast worker that monitors and reports on the progress of a WaveWatch3 run
on the ONC cloud computing facility.
on the ONC cloud computing facility.
"""
import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Fixtures for SalishSeaCast test suite.
"""
"""Fixtures for SalishSeaCast test suite."""
from pathlib import Path
from unittest.mock import patch

Expand Down
3 changes: 1 addition & 2 deletions tests/release_mgmt/test_tag_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast tag_release script.
"""
"""Unit tests for SalishSeaCast tag_release script."""
from unittest.mock import Mock, call, patch

import hglib
Expand Down
3 changes: 1 addition & 2 deletions tests/test_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for analyze module.
"""
"""Unit tests for analyze module."""
import numpy as np
import pytest

Expand Down
3 changes: 1 addition & 2 deletions tests/test_daily_river_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for daily_river_flows module.
"""
"""Unit tests for daily_river_flows module."""
import io
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/test_next_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for nowcast.next_workers module.
"""
"""Unit tests for nowcast.next_workers module."""
import inspect
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/test_residuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast residuals module.
"""
"""Unit tests for SalishSeaCast residuals module."""
from datetime import datetime

import pytest
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_archive_tarball.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast archive_tarball worker.
"""
"""Unit tests for SalishSeaCast archive_tarball worker."""
import argparse
import logging
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_collect_NeahBay_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast collect_NeahBay_ssh worker.
"""
"""Unit tests for SalishSeaCast collect_NeahBay_ssh worker."""
import logging
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_collect_river_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast collect_river_data worker.
"""
"""Unit tests for SalishSeaCast collect_river_data worker."""
import logging
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_collect_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast collect_weather worker.
"""
"""Unit tests for SalishSeaCast collect_weather worker."""
import grp
import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_crop_gribs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit test for SalishSeaCast crop_gribs worker.
"""
"""Unit test for SalishSeaCast crop_gribs worker."""
import grp
import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_download_fvcom_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast download_fvcom_results worker.
"""
"""Unit tests for SalishSeaCast download_fvcom_results worker."""
import shlex
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_download_live_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast download_live_ocean worker.
"""
"""Unit tests for SalishSeaCast download_live_ocean worker."""
import grp
import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_download_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast download_results worker.
"""
"""Unit tests for SalishSeaCast download_results worker."""
import logging
import shlex
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_download_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast download_weather worker.
"""
"""Unit tests for SalishSeaCast download_weather worker."""
import logging
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_download_wwatch3_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast system download_wwatch3_results worker.
"""
"""Unit tests for SalishSeaCast system download_wwatch3_results worker."""
from unittest.mock import Mock, patch

import arrow
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_get_onc_ctd.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast get_onc_ctd worker.
"""
"""Unit tests for SalishSeaCast get_onc_ctd worker."""
import logging
from types import SimpleNamespace

Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_get_onc_ferry.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast get_onc_ferry worker.
"""
"""Unit tests for SalishSeaCast get_onc_ferry worker."""
import logging
from types import SimpleNamespace

Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_get_vfpa_hadcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast get_vfpa_hadcp worker.
"""
"""Unit tests for SalishSeaCast get_vfpa_hadcp worker."""
import logging
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_grib_to_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast grib_to_netcdf worker.
"""
"""Unit tests for SalishSeaCast grib_to_netcdf worker."""
import logging
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_launch_remote_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast launch_remote_worker worker.
"""
"""Unit tests for SalishSeaCast launch_remote_worker worker."""
from types import SimpleNamespace
from unittest.mock import Mock, patch

Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_CHS_currents_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_CHS_currents_file worker.
"""
"""Unit tests for SalishSeaCast make_CHS_currents_file worker."""
import logging
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_averaged_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_averaged_dataset worker.
"""
"""Unit tests for SalishSeaCast make_averaged_dataset worker."""
import logging
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_feeds worker.
"""
"""Unit tests for SalishSeaCast make_feeds worker."""
import datetime
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_forcing_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_forcing_links worker.
"""
"""Unit tests for SalishSeaCast make_forcing_links worker."""
import logging
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_fvcom_rivers_forcing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_fvcom_rivers_forcing worker.
"""
"""Unit tests for SalishSeaCast make_fvcom_rivers_forcing worker."""
from pathlib import Path
from types import SimpleNamespace
from unittest.mock import Mock, patch
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_live_ocean_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_live_ocean_files worker.
"""
"""Unit tests for SalishSeaCast make_live_ocean_files worker."""
import logging
import textwrap
from pathlib import Path
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_plots worker.
"""
"""Unit tests for SalishSeaCast make_plots worker."""
import logging
from pathlib import Path
from types import SimpleNamespace
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_runoff_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_runoff_file worker.
"""
"""Unit tests for SalishSeaCast make_runoff_file worker."""
from pathlib import Path
from types import SimpleNamespace
from unittest.mock import Mock, patch
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_ssh_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_ssh_file worker.
"""
"""Unit tests for SalishSeaCast make_ssh_file worker."""
import logging
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_surface_current_tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_surface_current_tiles worker.
"""
"""Unit tests for SalishSeaCast make_surface_current_tiles worker."""
import logging
from pathlib import Path
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/workers/test_make_turbidity_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
# SPDX-License-Identifier: Apache-2.0


"""Unit tests for SalishSeaCast make_turbidity_file worker.
"""
"""Unit tests for SalishSeaCast make_turbidity_file worker."""
from types import SimpleNamespace
from unittest.mock import Mock, patch

Expand Down
Loading