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 .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v7.1.0
_commit: v7.2.0-4-g738b107
_src_path: gh:eccenca/cmem-plugin-template
author_mail: [email protected]
author_name: eccenca GmbH
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jobs:
run: |
task check:pytest
- name: deptry
run: |
task check:deptry
- name: safety
run: |
task check:safety
Expand Down
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ pytest:
- dist/coverage
- dist/coverage.xml

deptry:
stage: test
script:
- task check:deptry

safety:
stage: test
script:
Expand Down
4 changes: 1 addition & 3 deletions README-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Generate SHACL shapes from an instance data graph.

[![eccenca Corporate Memory][cmem-shield]][cmem-link]


You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line clients with:
This is a plugin for [eccenca](https://eccenca.com) [Corporate Memory](https://documentation.eccenca.com). You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line client like this:

```
cmemc admin workspace python install cmem-plugin-shapes
Expand All @@ -27,4 +26,3 @@ cmemc admin workspace python install cmem-plugin-shapes
[copier]: https://copier.readthedocs.io/
[copier-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json


8 changes: 7 additions & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ tasks:
| head -1 | cut -d " " -f 2 | cut -d "." -f 1-2

poetry:install:
internal: true
desc: Install dependencies managed by Poetry
run: once
deps:
Expand Down Expand Up @@ -110,6 +109,7 @@ tasks:
cmds:
- task: check:ruff
- task: check:mypy
- task: check:deptry
- task: check:safety

check:pytest:
Expand Down Expand Up @@ -159,6 +159,12 @@ tasks:
# ignore 51358 safety - dev dependency only
- poetry run safety check -i 51358

check:deptry:
desc: Complain about unused or missing dependencies
<<: *preparation
cmds:
- poetry run deptry .

check:ruff:
desc: Complain about everything else
<<: *preparation
Expand Down
1,022 changes: 544 additions & 478 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cmem-plugin-shapes"
version = "2.0.2.dev5+3aef0ea.dirty"
version = "0.0.0"
license = "Apache-2.0"
description = "Generate SHACL shapes from an instance data graph."
authors = ["eccenca GmbH <[email protected]>"]
Expand All @@ -17,25 +17,27 @@ homepage = "https://github.com/eccenca/cmem-plugin-shapes"
[tool.poetry.dependencies]# if you need to change python version here, change it also in .python-version
python = "^3.11"
validators = "^0.34.0"
rdflib = "^6.3.2"
rdflib = "^7.1.4"
cmem-cmempy = "^25"

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

[tool.poetry.group.dev.dependencies.cmem-cmemc]
version = "^24.3.0"
version = "^25.3.0"

[tool.poetry.group.dev.dependencies]
genbadge = {extras = ["coverage"], version = "^1.1.1"}
mypy = "^1.14.1"
pip = "^25.0"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
deptry = "^0.23.0"
genbadge = {extras = ["coverage"], version = "^1.1.2"}
mypy = "^1.16.1"
pip = "^25.1.1"
pytest = "^8.4.1"
pytest-cov = "^6.2.1"
pytest-dotenv = "^0.5.2"
pytest-html = "^4.1.1"
pytest-memray = { version = "^1.7.0", markers = "platform_system != 'Windows'" }
ruff = "^0.9.4"
ruff = "^0.12.0"
safety = "^1.10.3"

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions tests/cmemc_command_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import time

import cmem_cmemc
from click.testing import CliRunner, Result
from cmem_cmemc.cli import cli

CLI_RUNNER = CliRunner()

Expand Down Expand Up @@ -39,7 +39,7 @@ def __init__(self, result: Result):
def _run(command: tuple[str, ...] | list[str]) -> AnnotatedResult:
"""Wrap the CliRunner"""
t_start = time.time()
result = CLI_RUNNER.invoke(cmem_cmemc.cli, command)
result = CLI_RUNNER.invoke(cli, command)
t_end = time.time()
annotated_result = AnnotatedResult(result=result)
annotated_result.t_start = t_start
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from cmem.cmempy.dp.proxy.graph import get
from cmem.cmempy.dp.proxy.sparql import get as sparql_get
from cmem.cmempy.dp.proxy.update import post
from cmem_plugin_base.testing import TestExecutionContext
from rdflib import DCTERMS, Graph, URIRef
from rdflib.compare import isomorphic

Expand All @@ -23,7 +24,6 @@
)
from tests import FIXTURE_DIR
from tests.cmemc_command_utils import run, run_without_assertion
from tests.utils import TestExecutionContext

DATETIME_PATTERN = re.compile(
r'^"[1-9][0-9]{3}-[0-1][1-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9]{3}Z"\^\^'
Expand Down
74 changes: 0 additions & 74 deletions tests/utils.py

This file was deleted.