Skip to content

fix: correct ProductDocsRetrieval topic configuration in documentation and project template#42

Merged
virginia-delos merged 1 commit intomainfrom
22-bug-incorrect-topic-configuration-in-productdocsretrieval-documentation-example
Mar 12, 2026
Merged

fix: correct ProductDocsRetrieval topic configuration in documentation and project template#42
virginia-delos merged 1 commit intomainfrom
22-bug-incorrect-topic-configuration-in-productdocsretrieval-documentation-example

Conversation

@n1colasf
Copy link
Member

Description

Fixes incorrect usage of a plain string for the topic attribute in ProductDocsRetrieval examples. The topic field requires a BaseTopic subclass reference, not a string literal like "product_docs". All documentation examples and the startproject template have been updated accordingly.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update

Related Issues

Fixes #22

Changes Made

  • Updated docs/getting-started.md: replace topic = "product_docs" with topic = ProductDocsTopic and add the corresponding import
  • Updated docs/agents-tools.md: same fix across two code examples and one additional example using KnowledgeBaseTopic; updated the attribute table to reflect type[BaseTopic] as the correct type
  • Updated cogsol/management/commands/startproject.py: fix the generated data/retrievals.py template to use ProductDocsTopic and include the commented import hint
  • Added tests/test_content_commands.py: new test class TestStartprojectCommand covering project structure creation, correct topic class reference in the template, presence of the import hint, and failure on non-empty directories

Testing Done

  • Unit tests pass locally
  • Added new tests for new functionality
  • Tested manually

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@n1colasf n1colasf self-assigned this Mar 11, 2026
@n1colasf n1colasf added the bug Something isn't working label Mar 11, 2026
@virginia-delos virginia-delos merged commit fb2af75 into main Mar 12, 2026
13 checks passed
@n1colasf n1colasf deleted the 22-bug-incorrect-topic-configuration-in-productdocsretrieval-documentation-example branch March 12, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Incorrect topic configuration in ProductDocsRetrieval documentation example

2 participants