Skip to content

Commit

Permalink
Fix dynamic versioning substitution and plugin requirement (#74)
Browse files Browse the repository at this point in the history
* fix dynamic versioning substitution and plugin req

* update linting checks
  • Loading branch information
d33bs authored Feb 5, 2025
1 parent 5be78c7 commit 55022ce
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 42 deletions.
74 changes: 40 additions & 34 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,77 @@
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: |
(?x)^(
.*\.svg
)$
- id: check-yaml
- id: check-added-large-files
- id: detect-private-key
- repo: https://github.com/python-poetry/poetry
rev: "1.8.0"
- id: check-yaml
- id: check-added-large-files
- id: detect-private-key
- repo: https://github.com/python-poetry/poetry
rev: "2.0.1"
hooks:
- id: poetry-check
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.4.3"
- id: poetry-check
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
- id: pyproject-fmt
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
- id: codespell
exclude: |
(?x)^(
.*\.lock |
.*\.json |
.*\.ipynb |
.*\.cppipe
)$
- repo: https://github.com/executablebooks/mdformat
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.18
hooks:
- id: mdformat
- id: mdformat
additional_dependencies:
- mdformat-gfm
- repo: https://github.com/citation-file-format/cffconvert
- mdformat-gfm
- repo: https://github.com/citation-file-format/cffconvert
rev: b6045d78aac9e02b039703b030588d54d53262ac
hooks:
- id: validate-cff
- repo: https://github.com/adrienverge/yamllint
- id: validate-cff
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
- id: yamllint
exclude: pre-commit-config.yaml
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.0"
- id: actionlint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.4"
hooks:
- id: ruff-format
- id: ruff
- repo: local
- id: ruff-format
- id: ruff
- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update
rev: v0.6.0
hooks:
- id: code-cov-gen
- id: pre-commit-update
args: ["--keep", "mdformat", "--keep", "pre-commit-update", "--keep", "cffconvert"]
- repo: local
hooks:
- id: code-cov-gen
name: Generate code coverage
language: system
entry: poetry run coverage run -m pytest
pass_filenames: false
always_run: true
- repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
- repo: https://github.com/Weird-Sheep-Labs/coverage-pre-commit
rev: 0.1.1
hooks:
- id: coverage-xml
- id: coverage-badge
- id: coverage-xml
- id: coverage-badge
args: ["-o", "media/coverage-badge.svg"]
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

Please see our [contributing](https://WayScience.github.io/CytoDataFrame/main/contributing) documentation for more details on contributions, development, and testing.
Please see our [contributing](docs/src/contributing.md) documentation for more details on contributions, development, and testing.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ license = "BSD-3-Clause"
readme = "README.md"
packages = [ { include = "cytodataframe", from = "src" } ]

[tool.poetry.requires-plugins]
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = [ "plugin" ] }

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
# used for data management
Expand Down Expand Up @@ -73,7 +76,7 @@ style = "pep440"
vcs = "git"

[tool.poetry-dynamic-versioning.substitution]
files = [ "src/CytoDataFrame/__init__.py" ]
files = [ "src/cytodataframe/__init__.py" ]

# defines various development tasks

Expand Down
12 changes: 6 additions & 6 deletions tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def test_draw_outline_on_image_from_outline(
if expected_non_black_mask:
assert np.any(non_black_mask), "Expected a non-black outline but got none."
else:
assert not np.any(
non_black_mask
), "Expected no outline but got a non-black area."
assert not np.any(non_black_mask), (
"Expected no outline but got a non-black area."
)


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

0 comments on commit 55022ce

Please sign in to comment.