Homeโ†’Knowledge base modules

๐Ÿงช Testing Your Nobel Prize KB Module

Testing involves three main stages: local testing, local node testing, and hosted node testing.

Testing Stages

After making changes to your KB module, testing involves the following steps:

๐Ÿ–ฅ๏ธ Local Testing Without Node

You can run the module directly using:

Sample output for querying:

You can modify the inputs_dict in run.py usage implementation section to test different operations:

After testing, iterate on your module and commit your changes as needed.

๐ŸŒ Testing on Local or Hosted Node

Prerequisites for Local Node

  1. Set up your local Naptha Node and Hub:
  2. Configure the Naptha SDK:

Publishing to GitHub

  1. Add a version tag:
  1. Verify your deployment.json configuration. Make sure it includes all required fields necessary for a kb module:
  1. Register on Naptha Hub:
  1. Verify module registration:

Once your module is published, you can test all KB operations:

Basic Operations

Initialize the KB:

List the first 10 entries:

Data Management

Add a new laureate:

Query the KB:

Cleanup Operations

Delete a specific entry:

Delete the entire KB:

Test each operation in sequence to verify your KB's full functionality.

Ready to enhance your KB module? Let's move on to the next lesson!