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

update template #3

Merged
merged 1 commit into from
Jun 14, 2024
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
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Changes here will be overwritten by Copier
_commit: v6.1.0
_commit: v6.3.1
_src_path: gh:eccenca/cmem-plugin-template
author_mail: [email protected]
author_name: eccenca GmbH
github_page: https://github.com/eccenca/cmem-plugin-uuid
project_description: Create universally unique identifiers (UUIDs) versions 1, 3,
4, 5, 6, 7 and 8 in transformations.
project_slug: uuid
pypi: true
pypi: false

4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ tasks:
<<: *preparation
cmds:
# ignore 51358 safety - dev dependency only
# ignore 67599 pip - dev dependency only
- poetry run safety check -i 51358 -i 67599
# ignore 70612 jinja2 - dev dependency only
- poetry run safety check -i 51358 -i 70612

check:ruff:
desc: Complain about everything else
Expand Down
3 changes: 2 additions & 1 deletion cmem_plugin_uuid/transform/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""UUID transform plugin module"""

import re
import uuid
from collections.abc import Sequence
Expand Down Expand Up @@ -396,7 +397,7 @@ def uuid_validate(self, test_uuid: uuid.UUID, uuid_string: str) -> None:
f"the proposed updates"
)

def convert_uuid(self, uuid_string: str) -> str: # noqa: PLR0912 C901
def convert_uuid(self, uuid_string: str) -> str: # noqa: C901
"""Convert UUID string"""
if self.from_ == "uuid_hex":
try:
Expand Down
261 changes: 148 additions & 113 deletions poetry.lock

Large diffs are not rendered by default.

27 changes: 20 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ homepage = "https://github.com/eccenca/cmem-plugin-uuid"
[tool.poetry.dependencies]
# if you need to change python version here, change it also in .python-version
python = "^3.11"
uuid6 = ">=2023.5.2"
uuid6 = "^2024.1.12"

[tool.poetry.dependencies.cmem-plugin-base]
version = "^4.3.0"
version = "^4.5.0"
allow-prereleases = false

[tool.poetry.group.dev.dependencies]
genbadge = {extras = ["coverage"], version = "^1.1.1"}
mypy = "^1.2.0"
pip = ">=23.3" # Avoid safety issue 62044 for pip less than 23.3
pytest = "^7.3.1"
mypy = "^1.10.0"
pip = "^24"
pytest = "^7.4.4"
pytest-cov = "^4.1.0"
pytest-dotenv = "^0.5.2"
pytest-memray = { version = "^1.5.0", markers = "platform_system != 'Windows'" }
ruff = "^0.1.5"
pytest-html = "^4.1.1"
pytest-memray = { version = "^1.6.0", markers = "platform_system != 'Windows'" }
ruff = "^0.4.4"
safety = "^1.10.3"

[build-system]
Expand All @@ -52,6 +53,18 @@ ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = ""

[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]

[tool.ruff]
line-length = 100
target-version = "py311"
Expand Down
1 change: 1 addition & 0 deletions tests/test_uuid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plugin tests."""

import uuid
from hashlib import md5, sha1

Expand Down
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Testing utilities."""

import os
from typing import ClassVar

Expand Down
Loading