Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic versioning substitution and plugin requirement #74

Merged
merged 2 commits into from
Feb 5, 2025
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
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}"
)