Skip to content

Commit

Permalink
0.4.x series (#67)
Browse files Browse the repository at this point in the history
* 0.4.x series

* bump to 0.5.0 series

* change poetry setup

* rolled back poetry setup

* latest version

* use pip install

* updated poetry files from scratch

* anchor poetry to 1.3.2

---------

Co-authored-by: Harshad <[email protected]>
Co-authored-by: Harshad Hegde <[email protected]>
  • Loading branch information
3 people committed May 10, 2023
1 parent 92319fe commit 8510245
Show file tree
Hide file tree
Showing 11 changed files with 927 additions and 1,582 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-push-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1.3
run: pip install poetry==1.3.2

#----------------------------------------------
# install your root project, if required
Expand Down
6 changes: 3 additions & 3 deletions kgcl_rdflib/apply/kgcl_2_sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
NodeObsoletion, NodeRename,
NodeShallowing, NodeUnobsoletion,
PlaceUnder, PredicateChange,
RemovedNodeFromSubset, RemoveUnder)
RemoveNodeFromSubset, RemoveUnder)

CURIE_PATTERN = re.compile(r"^(\w+):(\S+)$")
SPARQL_COMMAND = str
Expand Down Expand Up @@ -175,7 +175,7 @@ def convert(kgcl_instance: Change) -> SPARQL_COMMAND:
if isinstance(kgcl_instance, PredicateChange):
return change_predicate(kgcl_instance)

if isinstance(kgcl_instance, RemovedNodeFromSubset):
if isinstance(kgcl_instance, RemoveNodeFromSubset):
if is_id(kgcl_instance.about_node) and is_id(kgcl_instance.subset):
return remove_node_from_subset(kgcl_instance)

Expand Down Expand Up @@ -272,7 +272,7 @@ def node_move(kgcl_instance: NodeMove) -> SPARQL_COMMAND:
return update__query


def remove_node_from_subset(kgcl_instance: RemovedNodeFromSubset) -> SPARQL_COMMAND:
def remove_node_from_subset(kgcl_instance: RemoveNodeFromSubset) -> SPARQL_COMMAND:
"""Return SPARQL query to remove node from subset."""
about = kgcl_instance.about_node
subset = kgcl_instance.subset
Expand Down
6 changes: 3 additions & 3 deletions kgcl_rdflib/render_kgcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
NodeDeletion, NodeMove, NodeObsoletion,
NodeRename, NodeShallowing,
NodeUnobsoletion, PredicateChange,
RemovedNodeFromSubset)
RemoveNodeFromSubset)


def render(kgcl_instance):
Expand Down Expand Up @@ -220,10 +220,10 @@ def render(kgcl_instance):
# + "Subset=" + kgclInstance.in_subset + ", " \
# + "About Node" + kgclInstance.about_node + ")"

if type(kgcl_instance) is RemovedNodeFromSubset:
if type(kgcl_instance) is RemoveNodeFromSubset:
render = (
render
+ "RemovedNodeFromSubset("
+ "RemoveNodeFromSubset("
+ "ID="
+ kgcl_instance.id
+ ", "
Expand Down
2,327 changes: 909 additions & 1,418 deletions poetry.lock

Large diffs are not rendered by default.

24 changes: 11 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
[tool.poetry]
name = "kgcl-rdflib"
version = "0.2.0"
description = "Schema fro the KGCL project."
description = "Schema for the KGCL project."
authors = [
"Christian Kindermann <[email protected]>",
"Chris Mungall <[email protected]>",
"Harshad Hegde <[email protected]>"
]
license = "MIT"
readme = "README.md"

packages = [{include = "kgcl_rdflib"}]

[tool.poetry.dependencies]
python = "^3.8"
linkml-runtime = "^1.1.24"
lark = "^1.1.2"
kgcl-schema = "^0.3.0"

[tool.poetry.dev-dependencies]
linkml = "^1.2.15"
mkdocs-material = "^8.2.8"
pytest = "^7.1.2"
linkml-runtime = ">=1.1.24"
kgcl-schema = ">=0.5.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
mkdocs-material = "^9.1.11"
pytest = "^7.3.1"

[tool.poetry.scripts]
kgcl-diff = "kgcl.kgcl_diff:cli"
Expand All @@ -33,3 +27,7 @@ kgcl-parse = "kgcl.grammar.parser:cli"

[tool.poetry.extras]
docs = ["linkml", "mkdocs-material"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
26 changes: 0 additions & 26 deletions tests/test_grammar/test_parse.py

This file was deleted.

Empty file removed tests/test_model/__init__.py
Empty file.
27 changes: 0 additions & 27 deletions tests/test_model/test_change_model.py

This file was deleted.

56 changes: 0 additions & 56 deletions tests/test_model/test_conversion.py

This file was deleted.

19 changes: 0 additions & 19 deletions tests/test_model/test_introspect.py

This file was deleted.

16 changes: 0 additions & 16 deletions tests/test_model/test_ontology_model.py

This file was deleted.

0 comments on commit 8510245

Please sign in to comment.