Application "smw-cindykate"

From SMW CindyKate - Main
Jump to: navigation, search
Lcc logo.png


Application "smw-cindykate" is a Ruby command-line application for managing/refactoring Semantic MediaWikis and plays a vital role in Concept "Controlled, faceted, multilateral, asynchronous, bidirectional synchronisation of multiple SMWs (CFMABS)".

What can you do with this?

  • You can do bulk changes to wikitext structure, e.g. renaming templates, properties, order of template calls, etc. in a probably more versatile way than Extension:Replace_Text because changes are repeatable (idempotent), reusable, reversible, logged and support error recovery (referential integrity, consistency).
  • You can compare wikitext between several SMWs.
  • You can extract, revision manage and inject wikitext from selections of pages (ontologies).
  • You can test domain and task ontologies.

First Step: In a YAML file, you need to register connection and configuration aspects of all SMWs that you want to work with

SMWs that we are working with are referenced and profiled by/in .yml files which are passed to the smw-cindykate command as a parameter -p, like so:

smw-cindykate -p test_profiles.yml
# This is the content of test_profiles.yml

MyCompanyWiki:                                        # <-- This identifier is used throughout the application to refer to this SMW.
  mw_http_script_path_url: http://localhost:20021/m   # <-- This is the full http(s) URL pointing to $wgScriptPath.
  mw_user_name:                                       # <-- These are the MediaWiki user's credentials:
  mw_user_password:                                   #     "
  mw_htaccess_user_name:                              # <-- These are the access credentials if there is HTTP Basic Authentication:
  mw_htaccess_user_password:                          #     "
  mw_root_directory: /var/www/html/m                  # <-- This is the absolute path to $wgScriptPath.
  ssh:                                                # <-- This is the SSH connection data:
    host: localhost                                   #     "
    port: 20090                                       #     "
    user: vagrant                                     #     "
    password: vagrant                                 #     "

This will enable you to refer to SMWs by identifier, e.g. MyCompanyWiki.

Use Cases/Features/Commands

Use Case/Feature Command Comments
Use Case "Programmatically manage SMW pages' content/wikitext and metadata" smw-cindykate content manage These commands require you to flexibly select SMW content/pages from one or several SMWs referenced by identifiers, e.g. MyCompanyWiki or OurEnterpriseWiki.
Use Case "Extract SMW pages to text files" smw-cindykate content extract
Use Case "Compare content between SMWs" smw-cindykate content compare
Use Case "Inject SMW pages from text files" smw-cindykate content inject
Use Case "Automate/simulate user interaction based on Cucumber/Gherkin playbooks/features" smw-cindykate interact



The following pages serve as unit test scripts and corresponding test objects/pages requested from within the RSpec Ruby code by API calls to this MediaWiki. While this mechanism turns these pages into a comfortable documentation about smw-cindykate's functionality, it also makes testing prohibitively slow.

The idea is to compile these pages into a YAML package dumped into smw-cindykate's RSpec testing suite before running them.

Run with rspec --pattern spec/\*\*/\*_spec.rb --format documentation --color --tag '<RSpec Tag>'.

Unit Test Smw factory component logo rspec.png RSpec Tag Description
UnitTest1704261359 add_FIELD_to_TEMPLATE_CALL in multiple template calls of which some already have that field
UnitTest1704261515 add_FIELD_to_TEMPLATE_CALL for NOT replacing an existing field
UnitTest1704261516 add_FIELD_to_TEMPLATE_CALL for replacing an existing field
UnitTest1704261517 add_FIELD_to_TEMPLATE_CALL for multiple template calls
UnitTest1704261519 add_FIELD_to_TEMPLATE_CALL for template call having one existing fields
UnitTest1704261520 add_FIELD_to_TEMPLATE_CALL for template call having no existing fields
UnitTest1704261732 having_FIELD_NAME_in_TEMPLATE_NAME_matching_regexes in multiple template calls of which some already have that field
Test PageTest Category