-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from linkml/rename
Rename
- Loading branch information
Showing
37 changed files
with
117 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from linkml_dataops.query import * | ||
from linkml_dataops.changer import * |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from linkml_dataops.changer.object_changer import ObjectChanger | ||
from linkml_dataops.changer.jsonpatch_changer import JsonPatchChanger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
linkml_runtime_api/changer/object_changer.py → linkml_dataops/changer/object_changer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from linkml_dataops.generators.apigenerator import ApiGenerator | ||
from linkml_dataops.generators.pyapigenerator import PythonApiGenerator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from linkml_dataops.query.object_queryengine import ObjectQueryEngine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[metadata] | ||
name = linkml_runtime_api | ||
url = https://github.com/biolink/linkml-runtime-api | ||
author = Harold Solbrig | ||
author-email = [email protected] | ||
summary = LinkML Runtime Environment API | ||
description = Runtime Environment API for the Linked Open Data Modeling Language | ||
home-page = http://linkml.github.io/linkml-runtime-api | ||
name = linkml_dataops | ||
url = https://github.com/biolink/linkml-dataops | ||
author = Chris Mungall | ||
author-email = [email protected] | ||
summary = LinkML Data Operations API | ||
description = Data Operations API for the Linked Open Data Modeling Language | ||
home-page = http://github.com/linkml/linkml-dataops | ||
license = CC0 1.0 Universal | ||
python-requires = >=3.7 | ||
classifiers = | ||
|
@@ -30,11 +30,11 @@ keywords = | |
|
||
[files] | ||
packages = | ||
linkml_runtime_api | ||
linkml_dataops | ||
|
||
[entry_points] | ||
console_scripts = | ||
gen-api-datamodel = linkml_runtime_api.generators.apigenerator:cli | ||
gen-crud-datamodel = linkml_runtime_api.generators.apigenerator:cli | ||
gen-python-api = linkml_runtime_api.generators.pyapigenerator:cli | ||
linkml-apply = linkml_runtime_api.changer.jsonpatch_changer:cli | ||
gen-api-datamodel = linkml_dataops.generators.apigenerator:cli | ||
gen-crud-datamodel = linkml_dataops.generators.apigenerator:cli | ||
gen-python-api = linkml_dataops.generators.pyapigenerator:cli | ||
linkml-apply = linkml_dataops.changer.jsonpatch_changer:cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import os | ||
import sys | ||
import unittest | ||
import logging | ||
from ruamel.yaml import YAML | ||
|
||
from jsonpatch import JsonPatch | ||
|
||
from linkml_dataops.diffs.yaml_patch import YAMLPatch | ||
|
||
inp = """\ | ||
# example | ||
name: | ||
# details | ||
family: Smith # very common | ||
given: Alice # one of the siblings | ||
""" | ||
|
||
yaml_patch = YAMLPatch() | ||
|
||
class YamlPatchTestCase(unittest.TestCase): | ||
""" | ||
Tests yaml patching | ||
""" | ||
|
||
def test_patch(self): | ||
""" | ||
test patch works, preserving comments | ||
""" | ||
patch = JsonPatch([ | ||
{'op': 'add', 'path': '/foo', 'value': {'bar': 'baz'}}, | ||
{'op': 'remove', 'path': '/name/family'} | ||
]) | ||
nu = yaml_patch.patchs(inp, patch) | ||
assert '# example' in nu | ||
assert '# details' in nu | ||
assert '# one of the siblings' in nu | ||
yaml=YAML() | ||
obj = yaml.load(nu) | ||
self.assertEqual(obj, {"name": {"given": "Alice"}, | ||
"foo": {"bar": "baz"}}) | ||
|
||
|
||
|
||
|
||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |