Skip to content

Commit

Permalink
Merge pull request #214 from pyoceans/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
ocefpaf authored Sep 3, 2024
2 parents f862ce2 + 7dbea90 commit fb7ce1b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ def _check_plot_works(f, *args, **kwargs):


# Basic Plotting.
@pytest.fixture()
@pytest.fixture
def xbt():
"""Load XBT."""
yield ctd.from_edf(data_path.joinpath("XBT.EDF.zip"))
plt.close("all")


@pytest.fixture()
@pytest.fixture
def fsi():
"""Load FSI."""
yield ctd.from_fsi(data_path.joinpath("FSI.txt.gz"), skiprows=9)
plt.close("all")


@pytest.fixture()
@pytest.fixture
def cnv():
"""Load CNV."""
yield ctd.from_cnv(data_path.joinpath("small.cnv.bz2"))
Expand Down
4 changes: 2 additions & 2 deletions tests/test_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import pytest


@pytest.fixture()
@pytest.fixture
def series():
"""Load data series."""
index = np.r_[np.linspace(-5, 10, 20), np.linspace(10, -5, 20)]
return pd.Series(data=np.arange(len(index)), index=index)


@pytest.fixture()
@pytest.fixture
def df():
"""Load data frame."""
index = np.r_[np.linspace(-5, 10, 20), np.linspace(10, -5, 20)]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_processing_real_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
data_path = Path(__file__).parent.joinpath("data")


@pytest.fixture()
@pytest.fixture
def spiked_ctd():
"""Load spiked CTD."""
return ctd.from_cnv(data_path.joinpath("CTD-spiked-unfiltered.cnv.bz2"))


@pytest.fixture()
@pytest.fixture
def filtered_ctd():
"""Load spiked-filtered CTD."""
return ctd.from_cnv(data_path.joinpath("CTD-spiked-filtered.cnv.bz2"))
Expand Down
12 changes: 6 additions & 6 deletions tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ def test_uncompresed():


# Test ctd DataFrame.
@pytest.fixture()
@pytest.fixture
def xbt():
"""Load zip EDF file."""
return ctd.from_edf(data_path.joinpath("XBT.EDF.zip"))


@pytest.fixture()
@pytest.fixture
def fsi():
"""Load gzip FSI file."""
return ctd.from_fsi(data_path.joinpath("FSI.txt.gz"), skiprows=9)


@pytest.fixture()
@pytest.fixture
def cnv():
"""Load bzip2 CNV file."""
return ctd.from_cnv(data_path.joinpath("small.cnv.bz2"))


@pytest.fixture()
@pytest.fixture
def btl():
"""Load uncompressed BTL file."""
return ctd.from_btl(data_path.joinpath("btl", "bottletest.btl"))


@pytest.fixture()
@pytest.fixture
def btl_as_stream():
"""Load stream BTL data."""
with Path.open(
Expand All @@ -74,7 +74,7 @@ def btl_as_stream():
return ctd.from_btl(stream)


@pytest.fixture()
@pytest.fixture
def ros():
"""Load uncompressed ROS file."""
return ctd.rosette_summary(data_path.joinpath("CTD", "g01l03s01m-m2.ros"))
Expand Down

0 comments on commit fb7ce1b

Please sign in to comment.