Skip to content

Commit

Permalink
Merge pull request #7 from Telicent-io/enhancement/owl2shacl
Browse files Browse the repository at this point in the history
feat: Make modules importable when installed through pip
  • Loading branch information
gnikolov95 authored Oct 17, 2023
2 parents c53b095 + 5681cd0 commit d596b81
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
uses: py-actions/flake8@v2
with:
max-line-length: "120"
path: "src"
path: "shacltool"
- name: FLAKE8 lint test files
uses: py-actions/flake8@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: py-actions/flake8@v2
with:
max-line-length: "120"
path: "src"
path: "shacltool"
- name: flake8 lint test code
uses: py-actions/flake8@v2
with:
Expand Down
1 change: 0 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies = [
dev = ["pytest", "flake8", "pre-commit"]

[tool.setuptools.dynamic]
readme = { file = ["src/README.adoc", "introduction.md", "4dOntologyIntro.md", "ies.md"] }
readme = { file = ["shacltool/README.adoc", "introduction.md", "4dOntologyIntro.md", "ies.md"] }

[tool.flake8]
max-line-length = 120
Expand All @@ -47,7 +47,7 @@ max-line-length = 120
Repository = "https://github.com/Telicent-io/shacl-tool"

[project.scripts]
owl2shacl = "src.owl2Shacl:main"
owl2shacl = "shacltool.owl2Shacl:main"

[tool.commitizen]
name = "cz_conventional_commits"
Expand All @@ -74,6 +74,7 @@ universal = true
[tool.setuptools]
include-package-data = false


[tool.setuptools.packages.find]
include = ["src*"]
include = ["shacltool*"]
exclude = ["docs*", "test*"]
File renamed without changes.
5 changes: 5 additions & 0 deletions shacltool/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import absolute_import

from shacltool import owl2shacl

__all__ = ['owl2shacl',]
File renamed without changes.
Empty file removed src/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion test/test_owl2shacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from pathlib import Path
from rdflib.compare import isomorphic
from src.owl2Shacl import create_shacl, rdf_validate
from shacltool.owl2shacl import create_shacl, rdf_validate
from rdflib import Graph, SH, BNode, RDF, XSD, Literal, Namespace, OWL, RDFS
from rdflib.term import URIRef

Expand Down

0 comments on commit d596b81

Please sign in to comment.