shacl2code 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shacl2code-0.0.3 → shacl2code-0.0.4}/.github/workflows/publish.yaml +9 -8
- {shacl2code-0.0.3 → shacl2code-0.0.4}/.github/workflows/test.yaml +1 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/PKG-INFO +1 -1
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/__init__.py +1 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/main.py +9 -0
- shacl2code-0.0.4/src/shacl2code/version.py +1 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/test_cli.py +15 -0
- shacl2code-0.0.3/src/shacl2code/version.py +0 -1
- {shacl2code-0.0.3 → shacl2code-0.0.4}/.gitignore +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/LICENSE +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/README.md +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/conftest.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/pyproject.toml +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/__main__.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/const.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/lang/__init__.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/lang/common.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/lang/lang.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/lang/python.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/lang/raw.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/model.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/templates/python.j2 +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/src/shacl2code/templates/raw.j2 +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/data/spdx3-model.jsonld +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/expect/python/spdx3.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/expect/raw/spdx3.txt +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/test_python.py +0 -0
- {shacl2code-0.0.3 → shacl2code-0.0.4}/tests/test_raw.py +0 -0
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Upload Python Package
|
|
3
3
|
on:
|
|
4
|
-
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
5
7
|
|
|
6
8
|
jobs:
|
|
9
|
+
test:
|
|
10
|
+
uses: ./.github/workflows/test.yaml
|
|
11
|
+
|
|
7
12
|
deploy:
|
|
13
|
+
needs:
|
|
14
|
+
- test
|
|
15
|
+
|
|
8
16
|
runs-on: ubuntu-latest
|
|
9
17
|
permissions:
|
|
10
18
|
id-token: write
|
|
@@ -25,12 +33,5 @@ jobs:
|
|
|
25
33
|
- name: Build package
|
|
26
34
|
run: python -m build
|
|
27
35
|
|
|
28
|
-
- name: Publish distribution to Test PyPI
|
|
29
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
30
|
-
with:
|
|
31
|
-
repository-url: https://test.pypi.org/legacy/
|
|
32
|
-
skip-existing: true
|
|
33
|
-
|
|
34
36
|
- name: Publish distribution to PyPI
|
|
35
|
-
if: startsWith(github.ref, 'refs/tags')
|
|
36
37
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -40,6 +40,12 @@ def main():
|
|
|
40
40
|
else:
|
|
41
41
|
print(f"{k:{width}} - {v.HELP}")
|
|
42
42
|
|
|
43
|
+
return 0
|
|
44
|
+
|
|
45
|
+
def handle_version(args):
|
|
46
|
+
print(VERSION)
|
|
47
|
+
return 0
|
|
48
|
+
|
|
43
49
|
parser = argparse.ArgumentParser(
|
|
44
50
|
description=f"Convert JSON-LD model to python. Version {VERSION}"
|
|
45
51
|
)
|
|
@@ -79,6 +85,9 @@ def main():
|
|
|
79
85
|
)
|
|
80
86
|
list_parser.set_defaults(func=handle_list)
|
|
81
87
|
|
|
88
|
+
version_parser = command_subparser.add_parser("version", help="Show version")
|
|
89
|
+
version_parser.set_defaults(func=handle_version)
|
|
90
|
+
|
|
82
91
|
args = parser.parse_args()
|
|
83
92
|
|
|
84
93
|
return args.func(args)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.0.4"
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import subprocess
|
|
7
7
|
|
|
8
8
|
from shacl2code.lang import LANGUAGES
|
|
9
|
+
from shacl2code import VERSION
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def test_shacl2code_exists():
|
|
@@ -27,3 +28,17 @@ def test_lang_list():
|
|
|
27
28
|
)
|
|
28
29
|
|
|
29
30
|
assert sorted(p.stdout.splitlines()) == sorted(LANGUAGES.keys())
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_version():
|
|
34
|
+
"""
|
|
35
|
+
Tests that the version subcommand works
|
|
36
|
+
"""
|
|
37
|
+
p = subprocess.run(
|
|
38
|
+
["shacl2code", "version"],
|
|
39
|
+
check=True,
|
|
40
|
+
stdout=subprocess.PIPE,
|
|
41
|
+
encoding="utf-8",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
assert p.stdout.rstrip() == VERSION
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.0.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|