Skip to content
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 .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:


- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
args:
Expand All @@ -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"]
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ctd/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ctd/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -53,7 +51,6 @@ tag_regex = "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
[tool.ruff]
target-version = "py39"
line-length = 80

lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
Expand Down