Skip to content

Commit 55022ce

Browse files
authored
Fix dynamic versioning substitution and plugin requirement (#74)
* fix dynamic versioning substitution and plugin req * update linting checks
1 parent 5be78c7 commit 55022ce

File tree

4 files changed

+51
-42
lines changed

4 files changed

+51
-42
lines changed

.pre-commit-config.yaml

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,77 @@
33
default_language_version:
44
python: python3.11
55
repos:
6-
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
77
rev: v5.0.0
88
hooks:
9-
- id: trailing-whitespace
10-
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
1111
exclude: |
1212
(?x)^(
1313
.*\.svg
1414
)$
15-
- id: check-yaml
16-
- id: check-added-large-files
17-
- id: detect-private-key
18-
- repo: https://github.com/python-poetry/poetry
19-
rev: "1.8.0"
15+
- id: check-yaml
16+
- id: check-added-large-files
17+
- id: detect-private-key
18+
- repo: https://github.com/python-poetry/poetry
19+
rev: "2.0.1"
2020
hooks:
21-
- id: poetry-check
22-
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "2.4.3"
21+
- id: poetry-check
22+
- repo: https://github.com/tox-dev/pyproject-fmt
23+
rev: "v2.5.0"
2424
hooks:
25-
- id: pyproject-fmt
26-
- repo: https://github.com/codespell-project/codespell
27-
rev: v2.3.0
25+
- id: pyproject-fmt
26+
- repo: https://github.com/codespell-project/codespell
27+
rev: v2.4.1
2828
hooks:
29-
- id: codespell
29+
- id: codespell
3030
exclude: |
3131
(?x)^(
3232
.*\.lock |
3333
.*\.json |
3434
.*\.ipynb |
3535
.*\.cppipe
3636
)$
37-
- repo: https://github.com/executablebooks/mdformat
37+
- repo: https://github.com/executablebooks/mdformat
3838
rev: 0.7.18
3939
hooks:
40-
- id: mdformat
40+
- id: mdformat
4141
additional_dependencies:
42-
- mdformat-gfm
43-
- repo: https://github.com/citation-file-format/cffconvert
42+
- mdformat-gfm
43+
- repo: https://github.com/citation-file-format/cffconvert
4444
rev: b6045d78aac9e02b039703b030588d54d53262ac
4545
hooks:
46-
- id: validate-cff
47-
- repo: https://github.com/adrienverge/yamllint
46+
- id: validate-cff
47+
- repo: https://github.com/adrienverge/yamllint
4848
rev: v1.35.1
4949
hooks:
50-
- id: yamllint
51-
- repo: https://github.com/rhysd/actionlint
52-
rev: v1.7.3
50+
- id: yamllint
51+
exclude: pre-commit-config.yaml
52+
- repo: https://github.com/rhysd/actionlint
53+
rev: v1.7.7
5354
hooks:
54-
- id: actionlint
55-
- repo: https://github.com/astral-sh/ruff-pre-commit
56-
rev: "v0.7.0"
55+
- id: actionlint
56+
- repo: https://github.com/astral-sh/ruff-pre-commit
57+
rev: "v0.9.4"
5758
hooks:
58-
- id: ruff-format
59-
- id: ruff
60-
- repo: local
59+
- id: ruff-format
60+
- id: ruff
61+
- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
62+
rev: v0.6.0
6163
hooks:
62-
- id: code-cov-gen
64+
- id: pre-commit-update
65+
args: ["--keep", "mdformat", "--keep", "pre-commit-update", "--keep", "cffconvert"]
66+
- repo: local
67+
hooks:
68+
- id: code-cov-gen
6369
name: Generate code coverage
6470
language: system
6571
entry: poetry run coverage run -m pytest
6672
pass_filenames: false
6773
always_run: true
68-
- repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
74+
- repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
6975
rev: 0.1.1
7076
hooks:
71-
- id: coverage-xml
72-
- id: coverage-badge
77+
- id: coverage-xml
78+
- id: coverage-badge
7379
args: ["-o", "media/coverage-badge.svg"]

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing
22

3-
Please see our [contributing](https://WayScience.github.io/CytoDataFrame/main/contributing) documentation for more details on contributions, development, and testing.
3+
Please see our [contributing](docs/src/contributing.md) documentation for more details on contributions, development, and testing.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ license = "BSD-3-Clause"
1111
readme = "README.md"
1212
packages = [ { include = "cytodataframe", from = "src" } ]
1313

14+
[tool.poetry.requires-plugins]
15+
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = [ "plugin" ] }
16+
1417
[tool.poetry.dependencies]
1518
python = ">=3.9,<3.13"
1619
# used for data management
@@ -73,7 +76,7 @@ style = "pep440"
7376
vcs = "git"
7477

7578
[tool.poetry-dynamic-versioning.substitution]
76-
files = [ "src/CytoDataFrame/__init__.py" ]
79+
files = [ "src/cytodataframe/__init__.py" ]
7780

7881
# defines various development tasks
7982

tests/test_image.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def test_draw_outline_on_image_from_outline(
109109
if expected_non_black_mask:
110110
assert np.any(non_black_mask), "Expected a non-black outline but got none."
111111
else:
112-
assert not np.any(
113-
non_black_mask
114-
), "Expected no outline but got a non-black area."
112+
assert not np.any(non_black_mask), (
113+
"Expected no outline but got a non-black area."
114+
)
115115

116116

117117
@pytest.mark.parametrize(
@@ -220,6 +220,6 @@ def test_adjust_with_adaptive_histogram_equalization(
220220
# Test if the function processes the image and
221221
# returns a result with the expected shape
222222
result = adjust_with_adaptive_histogram_equalization(input_image)
223-
assert (
224-
result.shape == expected_shape
225-
), f"Expected shape {expected_shape}, but got {result.shape}"
223+
assert result.shape == expected_shape, (
224+
f"Expected shape {expected_shape}, but got {result.shape}"
225+
)

0 commit comments

Comments
 (0)