Semantic MediaWiki: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Where Semantics are being used: mention two ways to see, add "For events" section)
m (→‎For deployments: update link)
Line 35: Line 35:
=== For deployments ===
=== For deployments ===


All deployments have the [[Template:Deployment|deployment template]] on them. They also have the "edit with form" tab on the main page. This is seen on for example [[OLPC Peru]]. This information is aggregated on the page [[Deployments]], using a semantic query. Also see see queries on [[:Category:Deployments]] and in [[Deployment query examples]].
All deployments have the [[Template:Deployment|deployment template]] on them. They also have the "edit with form" tab on the main page. This is seen on for example [[OLPC Peru]]. This information is aggregated on the page [[Deployments]], using a semantic query. Also see [[Deployment query examples]].


=== For activities ===
=== For activities ===

Revision as of 01:48, 23 August 2008

Where Semantics are being used

You can browse Special:Properties to see properties in use. You can use Special:Allpages to display Form: pages.

For tests

Many tests are using semantic annotations, so we can query for them. See Test cases 8.2.0 and Testcase Query Examples.

To display query results so that they look like the test case (green badge), use format=embedded. To display in some other format, someone has to create Template:Display_query_row_in_a_gray_box and use format=template | template=Display query row in a gray box

Some test results are also using semantic annotations, see TestResults 8.2.0.

Issues for Test cases

Structuring Test cases

We are using long titles that identify area, e.g. Tests/Sugar_Control_Panel/About_Me/Color_Change. Putting the organization in the name ensures test cases will appear in a useful order in generic queries.

Could also/instead use subcategories of Category:Test cases to identify the kind of test, but Semantic Forms has limited capability to assign categories. A query for a category will find things in its subcategories, so it's fine to have a detailed category hierarchy.

It might be possible to query for test cases "like" Tests/Sugar_*. to only show certain test cases.

Issues for test results

Test cases 8.2.0 is one page with many test results on it; so the page winds up having two values for Property:PassFail, "Pass" and "Fail". But to isolate each result, you would have to create a separate page for each combination of test case and build, e.g. TR_Build2230/Sugar Control Panel/Date & Time. That's a lot of pages to name, although Semantic Forms can automatically generate a unique page as you fill in a form]. Is there any reason to have semantics for each test result, when you can simply visit a page with the test results?

  • TODO: figure out a generic way to have a link _Log a test result_ that when clicked goes to Form:Test_result and the wiki editor fills in a form that creates a test result linked to the original page. Then any page with a test on it can be "filled out" with test results that anyone can enter!

For projects and tasks

see Form:Tasks and Form:Project, and their respective template pages Template:Task and Template:Project. We would like to use the Project, and Task forms to track projects, and to some extent replace the project database. The tasks template should be for small open tasks that will then be populated on aggregate pages based on various properties like priority and skill set required.

For deployments

All deployments have the deployment template on them. They also have the "edit with form" tab on the main page. This is seen on for example OLPC Peru. This information is aggregated on the page Deployments, using a semantic query. Also see Deployment query examples.

For activities

There is currently the Template:Activity page that is being used to keep track of general information about activities. In the Form:Activity there is also the template that allows for multiple bundle versions so that you can keep track of the last build that works with 656, even though it may not be the latest build.

We need to fix the main template so that it will also include a place for the .xo bundle

You can see an example query page Activity_query_examples

Adapting activities and their templates to use Semantic Forms would make it easier to

  • maintain the Activities page
  • show the status of activities in various activity packs
  • query for things like activities that don't have a translation status.

For releases

Could put the information in Releases into separate sub-pages. Then Releases page can just be a query for the information. Then each ECO can query this information for its release instead of repeating it. Seems straightforward, unlike test cases there aren't hundreds of release pages.

Greg's concern: identify and separate past (definite) releases from future (indefinite, in-planning) releases.

Reusing release values

wiki.laptop.org uses three methods to display a changing value like The release candidate on multiple pages without having to update each one.

latest release is ==> 13.2.11 || 2020-01-29
current testing stream & release is ==> official & os860
current testing stream & release is ==> {{#ask: Friends in testing/current image stream | ?Current image stream for testing=}} & {{#ask: Friends in testing/current image number | ?Current image number for testing=}}
#show should also work... {{#show: Friends in testing/current image stream ?Current image stream for testing}} & {{#show: Friends in testing/current image number ?Current image number for testing}}
As of 2008-08-07 this last semantic approach is implemented completely the wrong way, these should be generic properties Property:Stream and Property:Build associated with a descriptive page like Testing build or Stable release, not specific properties on specific page names. -- Skierpage 10:27, 12 August 2008 (UTC)

For events

All we need to do is put Property:Start date and Property:End date on events, meetings, and jams and we can display upcoming events on a timeline, see e.g. http://semanticweb.org/wiki/Upcoming_events

Also use Property:Cooordinates to annotate where an event is. Don't get too excited, displaying multiple events as pushpins on a map requires additional extensions.

Motivation

There's a lot of information in wiki.laptop.org. wikipedia:Semantic MediaWiki is an extension that lets you annotate existing wiki text and templates so that you can query and redisplay this information. Done right we get less duplication, more standardization, and easy information reuse.

Here's a simple example: this queries test case pages and displays the stream to which they apply:

{{#ask:

 Test objective::+
 | ?Test objective
 | ?Build stream
 | limit=5
 | default=No articles found with Property:Objective ?

}}

You can get a similar list of pages by browsing Category:Test cases, but then you would have to read each page to find the streams to which it applies.

To Do list

Trivial Fixes (ie just install something/ fix something that’s already installed)

Semantic google maps
Way to embed google maps in wiki with locations of projects/deployments and with links to appropriate wiki pages.
Create a property of Type:Geographic coordinate and you get "service links" to Google maps for free (see e.g. [1], click the (?) symbol). However, displaying several such locations on one Google Map is tricky, you either need the Semantic Google Maps extension with SMW version 1.2 and/or the Google Maps extension (see example) -- Skierpage 10:26, 31 July 2008 (UTC)

Easy Fixes (ie just edit a little bit of code)

Auto generate templates
Make template an activity and edit with form
Move around the <no include> tags
But when empty it should show something
Make a tag that says this is not semantic stuff
Ignore semantics in a specific name space


Alt text not working in templates
Feature part of Tests/Sugar_Control_Panel/About_Me/Color_Change
Add new types
  • It's easy to add a property that has some built-in type (like [[Has type::Text]] and restrict it to certain values and maybe control its format.
  • It's possible to add a new "linear" type that converts between different units , e.g. a Type;Area
  • it's hard to add other kinds of types, it requires writing PHP code.
  • -- Skierpage 10:42, 31 July 2008 (UTC)
Time duration
If you want auto-conversion between e.g. weeks and days and seconds, copy what you want from [2] -- Skierpage 10:42, 31 July 2008 (UTC)
User
Not sure what this means. If it's links to User:skierpage then maybe just create Property:User of type:page.
Trac
This could be done as Property:Ticket, of Type:URL and you use a template to fabricate the URL, or Property:Ticket of Type:Number and you use Service links and templates to turn the number into a trac URL.
Image
Just some property of Type:Page (the default), in most cases SMW do the right thing and display the image .
Template?


Make the free text box larger.


When creating a template, you should be able to create properties in that window as well as use already created properties.


Way to 'prettify' links when used in SMW properties with a "Page" type.
Example: Color Change instead of Tests/Sugar_Control_Panel/About_Me/Color_Change.
See #Suggestions_for_test_cases. Maybe have a "Brief name" property and display that while linking to the full page name. Or, in queries use format=template and in the template use a parser string function to change the title from Tests/Sugar_Control_Panel/About_Me/Color_Change. Or, use categories to identify the hierarchy. You risk collision if the page title is just Color change, so you could have a little "TC" prefix, just TC/Color Change or a pseudo-namespace TC:Color_change


Translating Property names
Nathany on #cc


When making a template add a more organized presentation of properties

Complex fixes (ie require creating a new extension)

Something in between a list of specific allowed values and free text
I want to be able to have the equivalent of an other field
One approach: have two properties like Property:Version and Property:Version_more that you always display together, the first has restricted values, the other is text. Another is to use Type:Page and have pages for the allowed values. So not-allowed values "work", but stand out in red.


Way to automatically email users who maintain pages


Automatically populate data
ex page last updated case
SMW 1.1 can't query on or display such metadata. I think other extensions like DPL can.
Way to pull %translated from pootle
Could have a bot that gets this information and populates wiki pages with it.

Semantic annotations

The wiki has the wikipedia:Semantic MediaWiki extension installed, the thing to do is use it appropriately.

Successful rollout suggestions

  • Deliver benefits early.
    • To a casual editor, SMW is just more markup, more stuff to learn, an ugly factbox on pages, more "Semantic Web 3.0" hype. So find use cases that deliver obvious benefits early
  • Don't create lots of properties and spend time annotating lots of pages until you have use cases for them. A person reading one wiki page after another does not need semantic annotations.
  • It's fine to convert templates to make semantic annotations, since you get this "for free"


wiki.laptop.org issues

Also see Property:SMW issue.

Template conversion

  • Use arraymap to turn lists of things into multiple property assignments.
  • Use Semantic Forms... (not sure about it)
  • Beware, people take advantage of wiki markup to stick all kinds of text inside templates. Maybe have an "fieldname extra info" field for arbitrary text.

Generic names

Should Property:Test objective be a generic name, or specialize it to Property:Test case objective ? skierpage's bias is to use generic names, but document on their property page what templates and pages use them.