From 370230ae93e6100729b6707fbcb7d4fdf28cb59c Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Sun, 24 Feb 2019 15:57:16 +0530 Subject: [PATCH 01/14] Update gitignore to include Pipenv generated files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7bbc71c..cbd5a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,5 @@ ENV/ # mypy .mypy_cache/ +Pipfile +Pipfile.lock From 3947783a4cd47e1ba1f5d04ce0415a03040a6e14 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Mon, 25 Feb 2019 20:25:01 +0530 Subject: [PATCH 02/14] Update repo to use hydra_python_core module --- .gitignore | 2 ++ hydra_agent/hydra_graph.py | 7 +++---- hydra_agent/querying_mechanism.py | 2 +- requirements.txt | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index cbd5a6d..e6cc223 100644 --- a/.gitignore +++ b/.gitignore @@ -99,5 +99,7 @@ ENV/ # mypy .mypy_cache/ + +# pipenv generated filespip Pipfile Pipfile.lock diff --git a/hydra_agent/hydra_graph.py b/hydra_agent/hydra_graph.py index 1d380a0..48fca99 100644 --- a/hydra_agent/hydra_graph.py +++ b/hydra_agent/hydra_graph.py @@ -2,8 +2,7 @@ from redisgraph import Graph, Node import urllib.request import json -from hydrus.hydraspec import doc_maker -import hydrus +from hydra_python_core import doc_maker from graphviz import Digraph from hydra_agent.classes_objects import ClassEndpoints,RequestError from hydra_agent.collections_endpoint import CollectionEndpoints @@ -21,12 +20,12 @@ def get_apistructure(self,entrypoint_node, api_doc): for support_property in api_doc.entrypoint.entrypoint.supportedProperty: if isinstance( support_property, - hydrus.hydraspec.doc_writer.EntryPointClass): + doc_writer.EntryPointClass): self.class_endpoints[support_property.name] = support_property.id_ if isinstance( support_property, - hydrus.hydraspec.doc_writer.EntryPointCollection): + doc_writer.EntryPointCollection): self.collection_endpoints[support_property.name] = support_property.id_ if len(self.class_endpoints.keys())>0: diff --git a/hydra_agent/querying_mechanism.py b/hydra_agent/querying_mechanism.py index 7ebd87d..4e72fb7 100644 --- a/hydra_agent/querying_mechanism.py +++ b/hydra_agent/querying_mechanism.py @@ -4,7 +4,7 @@ from hydra_agent.hydra_graph import InitialGraph import urllib.request import json -from hydrus.hydraspec import doc_maker +from hydra_python_core import doc_maker from urllib.error import URLError, HTTPError from hydra_agent.collections_endpoint import CollectionEndpoints from hydra_agent.classes_objects import ClassEndpoints,RequestError diff --git a/requirements.txt b/requirements.txt index 8352a8b..cbe02a9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ httplib2 redis redisgraph graphviz --e git+https://github.com/HTTP-APIs/hydrus.git#egg=hydrus +-e git+https://github.com/HTTP-APIs/hydra-python-core.git#egg=hydra_python_core From 27f796f2dada944a841144c607a995444a279365 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Mon, 25 Feb 2019 20:36:23 +0530 Subject: [PATCH 03/14] Update CI test config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4da93f6..96c381d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ python: - "3.6-dev" # 3.6 development branch - "3.7-dev" install: - - pip install -e git+https://github.com/HTTP-APIs/hydrus#egg=hydrus + - pip install -e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra_python_core - pip install -e . script: python -m unittest discover From db7ed356f47011489db2bdaec09a93a2b5b3c85d Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Sat, 2 Mar 2019 15:15:56 +0530 Subject: [PATCH 04/14] Add missing import --- hydra_agent/hydra_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra_agent/hydra_graph.py b/hydra_agent/hydra_graph.py index 48fca99..756c9fb 100644 --- a/hydra_agent/hydra_graph.py +++ b/hydra_agent/hydra_graph.py @@ -2,7 +2,7 @@ from redisgraph import Graph, Node import urllib.request import json -from hydra_python_core import doc_maker +from hydra_python_core import doc_maker, doc_writer from graphviz import Digraph from hydra_agent.classes_objects import ClassEndpoints,RequestError from hydra_agent.collections_endpoint import CollectionEndpoints From bf3e397ca3705fa3abe95b11ea169e352a4a263b Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 20:27:28 +0100 Subject: [PATCH 05/14] Fixing requirements Inserting Hydra Core and Open Parser since Hydrus ported Hydraspec --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 8352a8b..8e9df84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,6 @@ httplib2 redis redisgraph graphviz +-e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra-python-core +-e git+https://github.com/HTTP-APIs/hydra-openapi-parser#egg=hydra-openapi-parser -e git+https://github.com/HTTP-APIs/hydrus.git#egg=hydrus From a1f74ba621c0a2bfeab5b19b45c303189e39c786 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 20:54:35 +0100 Subject: [PATCH 06/14] Porting hydraspec to hydra_python_Core --- hydra_agent/hydra_graph.py | 6 +++--- hydra_agent/querying_mechanism.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hydra_agent/hydra_graph.py b/hydra_agent/hydra_graph.py index 1d380a0..8fe8f9d 100644 --- a/hydra_agent/hydra_graph.py +++ b/hydra_agent/hydra_graph.py @@ -2,7 +2,7 @@ from redisgraph import Graph, Node import urllib.request import json -from hydrus.hydraspec import doc_maker +from hydra_python_core import doc_maker import hydrus from graphviz import Digraph from hydra_agent.classes_objects import ClassEndpoints,RequestError @@ -21,12 +21,12 @@ def get_apistructure(self,entrypoint_node, api_doc): for support_property in api_doc.entrypoint.entrypoint.supportedProperty: if isinstance( support_property, - hydrus.hydraspec.doc_writer.EntryPointClass): + hydra_python_core.doc_writer.EntryPointClass): self.class_endpoints[support_property.name] = support_property.id_ if isinstance( support_property, - hydrus.hydraspec.doc_writer.EntryPointCollection): + hydra_python_core.doc_writer.EntryPointCollection): self.collection_endpoints[support_property.name] = support_property.id_ if len(self.class_endpoints.keys())>0: diff --git a/hydra_agent/querying_mechanism.py b/hydra_agent/querying_mechanism.py index 7ebd87d..4e72fb7 100644 --- a/hydra_agent/querying_mechanism.py +++ b/hydra_agent/querying_mechanism.py @@ -4,7 +4,7 @@ from hydra_agent.hydra_graph import InitialGraph import urllib.request import json -from hydrus.hydraspec import doc_maker +from hydra_python_core import doc_maker from urllib.error import URLError, HTTPError from hydra_agent.collections_endpoint import CollectionEndpoints from hydra_agent.classes_objects import ClassEndpoints,RequestError From 9cd8c187e5bccb6002928c7268a1df339ee32c0b Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 22:10:02 +0100 Subject: [PATCH 07/14] Fixing typos in import --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8e9df84..d6eb501 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ httplib2 redis redisgraph graphviz --e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra-python-core --e git+https://github.com/HTTP-APIs/hydra-openapi-parser#egg=hydra-openapi-parser +-e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra_python_core +-e git+https://github.com/HTTP-APIs/hydra-openapi-parser#egg=hydra_openapi_parser -e git+https://github.com/HTTP-APIs/hydrus.git#egg=hydrus From c7a7aba46b968ba64d3105f8c9933c275e795169 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 22:12:43 +0100 Subject: [PATCH 08/14] Adding import hydra_python_core Adding import to hydra_python_core after hydraspec porting --- hydra_agent/hydra_graph.py | 1 + hydra_agent/querying_mechanism.py | 1 + 2 files changed, 2 insertions(+) diff --git a/hydra_agent/hydra_graph.py b/hydra_agent/hydra_graph.py index 8fe8f9d..ea76663 100644 --- a/hydra_agent/hydra_graph.py +++ b/hydra_agent/hydra_graph.py @@ -2,6 +2,7 @@ from redisgraph import Graph, Node import urllib.request import json +import hydra_python_core from hydra_python_core import doc_maker import hydrus from graphviz import Digraph diff --git a/hydra_agent/querying_mechanism.py b/hydra_agent/querying_mechanism.py index 4e72fb7..309019c 100644 --- a/hydra_agent/querying_mechanism.py +++ b/hydra_agent/querying_mechanism.py @@ -4,6 +4,7 @@ from hydra_agent.hydra_graph import InitialGraph import urllib.request import json +import hydra_python_core from hydra_python_core import doc_maker from urllib.error import URLError, HTTPError from hydra_agent.collections_endpoint import CollectionEndpoints From 6b959579a4b1863ca5a63c9723237a441ec35df4 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 22:13:39 +0100 Subject: [PATCH 09/14] Adding some virtualenv folders and build packages --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 7bbc71c..ff36226 100644 --- a/.gitignore +++ b/.gitignore @@ -86,6 +86,9 @@ celerybeat-schedule .venv venv/ ENV/ +share +include +bin # Spyder project settings .spyderproject @@ -99,3 +102,6 @@ ENV/ # mypy .mypy_cache/ + +#build packages +src \ No newline at end of file From c76022375a0fafc14e86cf960a24c77ad930b6b1 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 22:15:43 +0100 Subject: [PATCH 10/14] Setting Redis version as 2 because of breaking change in Redis 3 Backwards incompatibility from Redis 2 to Redis 3, which now only accepts values as bytes, strings or numbers --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d6eb501..2b9df3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ rdflib rdflib-jsonld uritemplate httplib2 -redis +redis==2.10.6 redisgraph graphviz -e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra_python_core From 29808b3cc260f6b97143ea652a1ee2ae94ff1154 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 22:51:11 +0100 Subject: [PATCH 11/14] Changing test due to hydraspec port to hydra_python_core Changing this test slightly so the "requirements.txt" consists of everything needed to run and it won't fail because of the requirements in the current hydrus master branch. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4da93f6..43e0911 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ python: - "3.6-dev" # 3.6 development branch - "3.7-dev" install: - - pip install -e git+https://github.com/HTTP-APIs/hydrus#egg=hydrus - - pip install -e . + - pip install -r requirements.txt script: python -m unittest discover From d7a4348f4dc34da2152b8c07fb22f3e4c43c1e42 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sat, 2 Mar 2019 23:38:17 +0100 Subject: [PATCH 12/14] Removed completely the dependency of hydrus The goal of Porting the doc writer was so that the agent supposed to depend only on hydra_python_core which is now possible. --- hydra_agent/hydra_graph.py | 1 - requirements.txt | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hydra_agent/hydra_graph.py b/hydra_agent/hydra_graph.py index ea76663..d2fad2d 100644 --- a/hydra_agent/hydra_graph.py +++ b/hydra_agent/hydra_graph.py @@ -4,7 +4,6 @@ import json import hydra_python_core from hydra_python_core import doc_maker -import hydrus from graphviz import Digraph from hydra_agent.classes_objects import ClassEndpoints,RequestError from hydra_agent.collections_endpoint import CollectionEndpoints diff --git a/requirements.txt b/requirements.txt index 2b9df3c..f5a7327 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,4 @@ httplib2 redis==2.10.6 redisgraph graphviz --e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra_python_core --e git+https://github.com/HTTP-APIs/hydra-openapi-parser#egg=hydra_openapi_parser --e git+https://github.com/HTTP-APIs/hydrus.git#egg=hydrus +-e git+https://github.com/HTTP-APIs/hydra-python-core#egg=hydra_python_core \ No newline at end of file From cc35df257a2b55cd7ea4c576aab407c9d3a7be37 Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sun, 3 Mar 2019 10:46:39 +0100 Subject: [PATCH 13/14] Updating gitignore to add virtualenv and built packages dirs --- .gitignore | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e6cc223..3a6eebc 100644 --- a/.gitignore +++ b/.gitignore @@ -86,6 +86,13 @@ celerybeat-schedule .venv venv/ ENV/ +share +include +bin + +# pipenv generated filespip +Pipfile +Pipfile.lock # Spyder project settings .spyderproject @@ -100,6 +107,5 @@ ENV/ # mypy .mypy_cache/ -# pipenv generated filespip -Pipfile -Pipfile.lock +#build packages +src From fb18d313360701e77debc2b4f9620a5d4f745a8b Mon Sep 17 00:00:00 2001 From: Gustavo Morais Date: Sun, 3 Mar 2019 10:52:45 +0100 Subject: [PATCH 14/14] Setting Redis version as 2 because of breaking change in Redis 3 Backwards incompatibility from Redis 2 to Redis 3, which now only accepts values as bytes, strings or numbers --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cbe02a9..7f0c180 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ rdflib rdflib-jsonld uritemplate httplib2 -redis +redis==2.10.6 redisgraph graphviz -e git+https://github.com/HTTP-APIs/hydra-python-core.git#egg=hydra_python_core