Skip to content

Releases: arun1729/cog

3.8.2

21 Apr 19:05
8b09a18

Choose a tag to compare

patch: lazy import certifi to stop it from breaking CogDB on pyodide.

3.8.1

21 Apr 15:21
e847922

Choose a tag to compare

  • Introduces graph D3.js based graph visualization system. Adds specific support for rendering interactive graphs in Google Colab and Jupyter notebooks.
  • Refactors the Record class to replace the tombstone field with a format_version byte.
  • Bug fixes.

3.8.0

13 Apr 15:47
3f63dd7

Choose a tag to compare

  • Introduces cloud mode for CogDB. Allows graphs to be persisted to the cloud and accessed from anywhere.
  • New Graph.ls() method to list available graphs.
  • Internal refactor for better code organization and maintainability.

3.7.5

10 Apr 19:11
8053703

Choose a tag to compare

Introduces a CogConfig class to encapsulate configuration settings, effectively preventing the mutation of global state by providing isolated configuration instances for Cog and Graph objects.

3.7.4

09 Mar 20:24
d5bbab6

Choose a tag to compare

Adding support for multiple export formats: Graphs can now be exported to N-Triples (with optional W3C strict formatting), CSV, and TSV formats.

3.7.3

05 Mar 18:59
197ce68

Choose a tag to compare

  • Logging Configuration Removal: Removed the dictConfig() call from Graph.__init__ in cog/torque.py to prevent the library from overwriting the host application's logging setup.
  • Logging Configuration Data Removal: Eliminated the logging_config dictionary from cog/config.py, which previously defined the library's default logging configuration.
  • Logger Namespacing: Standardized all internal loggers by namespacing them under 'cog.' (e.g., cog.torque, cog.database) for better organization and clarity.

3.7.2

27 Feb 22:14
0b1a361

Choose a tag to compare

New features

  • g.vectorize() - Auto-Embedding

Add vector embeddings for your graph with a single call using CogDB's free embedding service.

g.vectorize()                          # embed all nodes
g.vectorize("europa")                  # embed a specific word
g.vectorize(["ocean", "ice", "moon"])  # embed a list of words
  • Auto-Embed on Query

After calling vectorize(), similarity queries automatically embed missing words.

g.vectorize()                                  # set up provider
g.v().k_nearest("new_concept", k=5).all()      # auto-embeds "new_concept"
g.v().sim("ocean", ">", 0.7).all()             # auto-embeds "ocean"

3.7.1

20 Feb 19:57
2a2c5bc

Choose a tag to compare

  • Added .graph() terminal function and path tracking for graph visualization (works with D3.js or vis.js)
    Example
g = Graph("social")
g.put("alice", "follows", "bob")
g.put("bob", "follows", "charlie")
g.put("bob", "status", "active")

g.v("alice").out("follows").out("follows").graph()
{
  "nodes": [
    {"id": "alice"},
    {"id": "bob"},
    {"id": "charlie"}
  ],
  "links": [
    {"source": "alice", "target": "bob", "label": "follows"},
    {"source": "bob", "target": "charlie", "label": "follows"}
  ]
}

3.7.0

14 Feb 15:48
45ef280

Choose a tag to compare

  • New delete() method: Introduced a delete(s, p, o) method for precise removal of individual edges (triples) from the graph.
  • New truncate() method: Added a truncate() method to clear all data from a graph while preserving its structure and making it reusable.
  • Refined drop() method: The drop() method has been redefined: it now serves to delete the entire graph (local) or raises deprecation/not-implemented errors (remote), clarifying its destructive nature and separating it from edge removal.

3.6.6

11 Feb 02:14
396d0e1

Choose a tag to compare

  • Bug Fix: Resolved EOFError occurring when RECORD_SEP (0xFD) byte appeared within marshalled payloads, particularly affecting embeddings, leading to truncated reads on reopen.
  • Length-Aware Record Reading: Replaced the sentinel-scanning __read_until() method with a new __read_record() method that parses a header to determine exact payload length, preventing premature record truncation.
  • Improved Resource Management: Enhanced the close() method in cog/core.py to ensure proper flushing and closing of mmap and file handles, preventing potential data loss or resource leaks.
  • Comprehensive Regression Testing: Introduced two new test files (test/test_eof_error.py and test/test_storage_integration.py) to thoroughly validate the fix and ensure data integrity across various scenarios, including complex data types, large batches, and multiple database reopen cycles.