Skip to content

Commit 1d04acc

Browse files
authored
Add info and ok endpoint and refactor code (#360)
* Add info endpoint Fixes #358 * Add ok endpoint too * Try to please linter * Woops, of course assert is not a function but a keyword * ok does not require authentication * Fix typo * Remove code duplication by eliminating get_documents_by_type It had the exact same implementation as get_documents except that it added an extra argument. * FIx linting errors * Replace all validate_graph_type calls with proper types Checking string constants each time is in my opinion not good. We should use proper types for this like the GraphType enum. I also made sure it is backwards compatible. Calling the functions the old way will work fine. * Remove unused function _ref_extract was not called anywhere inside the codebase and no docs even mention it. The tests don't call it as well. * Add GraphType to higher level export * Add class_frame test This test case was not covered * Fix type hint * Use GraphType enum for good type checking * import Schema It was used for type hinting but not imported * Remove schema import again to prevent circular import
1 parent fdb9a73 commit 1d04acc

File tree

8 files changed

+171
-118
lines changed

8 files changed

+171
-118
lines changed

terminusdb_client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .client import Patch, Client # noqa
1+
from .client import GraphType, Patch, Client # noqa
22
from .woqldataframe import woqlDataframe as WOQLDataFrame # noqa
33
from .woqlquery import WOQLQuery # noqa
44
from .woqlschema import * # noqa

0 commit comments

Comments
 (0)