diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index e60abe7..9b41c27 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -26,7 +26,7 @@ jobs: persist-credentials: false - name: Setup Micromamba Python - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 + uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 with: environment-name: TEST init-shell: bash diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9744f86..5d75116 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: persist-credentials: false - name: Setup Micromamba Python ${{ matrix.python-version }} - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7 + uses: mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0 with: environment-name: TEST init-shell: bash diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2b6a8c1..6710cea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell args: @@ -39,7 +39,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.4 + rev: v0.15.9 hooks: - id: ruff args: ["--fix", "--show-fixes"] @@ -62,12 +62,12 @@ repos: - id: nb-strip-paths - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.16.2 + rev: v2.21.0 hooks: - id: pyproject-fmt - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.22.0 + rev: v1.23.1 hooks: - id: zizmor diff --git a/ctd/plotting.py b/ctd/plotting.py index 0558e1e..226a4b1 100644 --- a/ctd/plotting.py +++ b/ctd/plotting.py @@ -44,11 +44,11 @@ def plot_cast( ylabel = getattr(df.index, "name", None) if isinstance(df, pd.DataFrame): - labels = label if label else df.columns + labels = label or df.columns for k, (_col, series) in enumerate(df.items()): ax.plot(series, series.index, label=labels[k]) elif isinstance(df, pd.Series): - label = label if label else str(df.name) + label = label or str(df.name) ax.plot(df.values, df.index, label=label, **kwargs) ax.set_ylabel(ylabel) diff --git a/ctd/read.py b/ctd/read.py index 9b1d47b..a9c213e 100644 --- a/ctd/read.py +++ b/ctd/read.py @@ -204,7 +204,7 @@ def _parse_seabird(lines: list, ftype: str) -> dict: # noqa: C901, PLR0912, PLR names.append("Statistic") metadata.update( { - "name": fname if fname else "unknown", + "name": fname or "unknown", "header": "\n".join(header), "config": "\n".join(config), "names": _remane_duplicate_columns(names), diff --git a/pyproject.toml b/pyproject.toml index ca50a0d..ca002bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,12 +38,10 @@ include-package-data = true license-files = [ "LICENSE.txt", ] - -[tool.setuptools.dynamic] -dependencies = { file = [ +dynamic.dependencies = { file = [ "requirements.txt", ] } -readme = { file = "README.md", content-type = "text/markdown" } +dynamic.readme = { file = "README.md", content-type = "text/markdown" } [tool.setuptools_scm] write_to = "ctd/_version.py" @@ -53,7 +51,6 @@ tag_regex = "^(?Pv)?(?P[^\\+]+)(?P.*)?$" [tool.ruff] target-version = "py39" line-length = 80 - lint.select = [ "A", # flake8-builtins "B", # flake8-bugbear