Semantic MediaWiki: Difference between revisions

From OLPC
Jump to navigation Jump to search
(explain what it is)
(→‎For tests: date to 2008)
 
(80 intermediate revisions by 3 users not shown)
Line 6: Line 6:
Done right we get less duplication, more standardization, and easy information reuse.
Done right we get less duplication, more standardization, and easy information reuse.


[[wikipedia:Semantic Forms]] is another extension that takes advantage of SMW to let users edit template information in a form.
[[mw:Semantic Forms]] is another extension that exploits SMW to let users edit template information in a form.


== Where Semantics are being used ==
== Where Semantics are being used ==
Line 13: Line 13:


=== For tests ===
=== For tests ===
Many tests are using semantic annotations, so we can query for them. See [[Test cases 8.2.0]] and [[Testcase Query Examples]].
Many tests ''in 2008'' used 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 <tt>format=embedded</tt>. To display in some other format, someone has to create Template:Display_query_row_in_a_gray_box and use <tt>format=template | template=Display query row in a gray box</tt>
To display query results so that they look like the test case (green badge), use <tt>format=embedded</tt>. To display in some other format, someone has to create Template:Display_query_row_in_a_gray_box and use <tt>format=template | template=Display query row in a gray box</tt>
Line 20: Line 20:


==== Issues for Test cases ====
==== Issues for Test cases ====
* None of the properties are documented, none of the fields say whether they are optional or not.
* Compare [[Tests/Sugar Control Panel/About Me/Color Change]] and Eben's [[Tests/Home view]], latter uses different terminology: Justification ''(like Feature?)'', Actions ''(like Procedure?'', Verify ''(like Expected results and pass criteria?''
* Compare [[Tests/Sugar Control Panel/About Me/Color Change]] and Eben's [[Tests/Home view]], latter uses different terminology: Justification ''(like Feature?)'', Actions ''(like Procedure?'', Verify ''(like Expected results and pass criteria?''
* [[Property:Build stream]] could usefully have service links to builds, diffs, packages, etc. This requires lowercase names (most URL's use <tt>joyride</tt>, not ''Joyride''). See [[Property:Build stream]] for a discussion.
* [[Property:Build stream]] could usefully have service links to builds, diffs, packages, etc. This requires lowercase names (most URL's use <tt>joyride</tt>, not ''Joyride''). See [[Property:Build stream]] for a discussion.


Maybe an integrated system that manages test cases and test results is better, such as [http://litmus.mozilla.org Mozilla's Litmus]. According to [[Community testing meetings/2008-12-04]], "Adric" was going to set up a demo of this.
===== Structuring Test cases =====

We are using long titles that identify area, e.g. [[Tests/Sugar_Control_Panel/About_Me/Color_Change]].
===== Organizing Test cases=====
We are using long titles with subpages 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.
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.
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.
It might be possible to make a semantic query for test cases "like" Tests/Sugar_*. to only show certain test cases. Or you can ignore semantics and use MediaWiki's [[Special:PrefixIndex]] to list subpages, e.g. <tt><nowiki>{{Special:PrefixIndex/Tests/Sugar}}</nowiki></tt> lists all pages named "Tests/Sugar...":<blockquote>{{Special:PrefixIndex/Tests/Sugar}}</blockquote>
The [[Test]] page uses this technique to show all its subpages. . The downside of this simple hack is it can only list titles, it doesn't show semantic info in the matching pages.


==== Issues for test results ====
==== Issues for test results ====
The form editor lets you add multiple test results to a test case.
[[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 [http://www.mediawiki.org/wiki/Extension:Semantic_Forms#The_one-step_process 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?
So a page like [[Tests/Upgrades/DataIntegrity]] can have ''both'' values for [[Property:PassFail]], and you can't tell in a query which one is associated with a particular build.
To isolate each result, you would have to create a separate page for each combination of test case and build, e.g. ''TR_Build2230/Upgrades/DataIntegrity''. That's a lot of pages to name, although [http://www.mediawiki.org/wiki/Extension:Semantic_Forms#The_one-step_process 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?

Test results are less suitable for a wiki (thousands of them, complex grouping and master-detail relationships, a desire for statistics and graphing, etc.). OLPC testers wrestled with several alternatives to manage test case results (Google docs, Google forms); the best page on the subject is [[Community testing meetings/2008-11-06/Displaying testing metrics in motivating ways]].

===== Test results details =====
[[Form:Test_case]] somehow has adds a [[Template:Test results]] for each test result. There's also [[Form:Test Results]] which brings up a broken editing form and invokes a non-existent [[Template:Test Results]], see [[Try_to_break_2]].

Sj and others figured out how to put a '''+''' button in a query to add a test result, see {{tl|Add-test-result}} used by {{tl|Test-case-query}} in e.g. [[Test cases 8.2.0]].



* 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!
* 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!
** Try it:
*** [[Special:AddPage/Test_Results/Trying_to_break]]
*** {{#formlink:Test_Results|add a result for "Trying to break"|query_string}}


* [[Property:PassFail]] perhaps should be Type:boolean, just Pass true/false.
* [[Property:PassFail]] perhaps should be Type:boolean, just Pass true/false.
Line 40: Line 57:


=== For projects and tasks===
=== 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.
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 ''(what is this?)'' 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.
: As of February 2009 it seems like this didn't catch on. {{tl|Project-summary}} is used more than [[Template:Project]] &mdash; I'm not sure why the former wasn't adapted to set the same semantic properties. There are very few tasks, and none setting properties like [[Property:Skills needed]] or [[Property:Done]]. -- [[User:Skierpage|skierpage]] 01:29, 10 February 2009 (UTC)


=== For deployments ===
=== For deployments ===
Line 48: Line 66:
=== For activities ===
=== 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.
There is currently the [[Template:Activity page]] that is annotates general information about activities. [[Form:Activity]] fills this in. There is also a [[Template:Activity bundle]] that allows for multiple bundle versions so that you can keep track of, for example, the last activity version that works with build 656 separately from the latest version.
: The '''To add another activity version that works with other builds click "add another''' form interface works nicely for editing, but ''doesn't work'' for querying! It just adds more [[Property:Activity version]] and [[Property:Activity bundle]] values to the page &mdash; they ''aren't grouped together in any way except visually''. This is the same underlying issue as adding multiple Test results to a test case, see [[#Issues for test results]]. -- [[User:Skierpage|Skierpage]] 01:08, 14 September 2008 (UTC)


We need to fix the main template so that it will also include a place for the .xo bundle
We need to fix the templates so they can tell the difference betweeen latest version and the versions that work on earlier releases.


There are queries of this in:
You can see an example query page [[Activity_query_examples]]
* [[9.1.0#Lists of candidate activities]] has various lists of activities, some from queries
* [[G1G1 Activity testing#Activity list]] queries for activity pages in the Activities/G1G1 activity group
* [[Activity queries]] has a useful query of all activities, and others
* [[Activity query examples]] has more queries


Adapting activities and their templates to use Semantic Forms would make it easier to
Adapting activities and their templates to use Semantic Forms would make it easier to
Line 58: Line 81:
* show the status of activities in various activity packs
* show the status of activities in various activity packs
* query for things like activities that don't have a translation status.
* query for things like activities that don't have a translation status.

==== Activity update? ====
The XO's [[Software update]] panel (new in release [[8.2.0]]) consults wiki pages like [[Activities]] and [[Activities/Joyride]] to figure out whether a newer version of an activity is available. Perhaps these pages could be generated by querying for the properties of activities, and feeding the results into a template like {{tl|Activity-oneline}} that displays the resulting HTML with the rigorous [[Activity microformat]].

==== Other things to do ====
People want changes but what exactly?
* Unify the [[Olpcboxes|OBX box]] and semantic properties &mdash; more details on [[/Activities]] subpage
* [[Creating an activity]] has buttons to create an Activity summary and an Activity page (both using [[Template:Activity-summary]]), but the first is redundant with semantic info and the second doesn't have semantics and doesn't match the layout of good activity pages like [[Chat]].
* Unify [[Creating an activity]] and the new [[Form:Activity]]?
* Replaces pages like [[Activities/All]] with generated tables of activities?
* Probably get rid of all the little obsolete summary subpages under Projects like [[Projects/Write]]; or generate them. (Asked on [[User_talk:sj]] -- [[User:Skierpage|skierpage]] 01:38, 10 February 2009 (UTC))
* [[Property:Activity group]] obsoletes the [[:Category:Bundled|Bundled]] / [[:Category:Core|Core]] / [[:Category:Extra|Extra]] distinction.


=== For releases ===
=== For releases ===
The [[Releases]] page had duplicated summary information for each release.
Could put the information in [[Releases]] into separate sub-pages.
In September 2008 this info was annotated in each release page (see e.g. [[8.1.0]]), so you could query for it. Some queries:
Then Releases page can just be a query for the information.
* [[Future releases]] queries for [[Property:Status|Status]] NOT "released", i.e. future releases.
Then each ECO can query this information for its release instead of repeating it.
* [[Future releases]] queries for [[Property:Release date|release date]] and/or [[Property:Target date|target date]] showing the information on a timeline.
Seems straightforward, unlike test cases there aren't hundreds of release pages.
* [[Release notes]] queries for [[Property:Status|Status]] "released" sorted by Release_date, i.e. past releases.
* [[What release am I running?]] has a query displaying the [[Property:Build number|build number]] first.

Also see [[Releases-test]] page.

==== ISSUE: Merging release page and "Release notes" ====
As of September 2008, most releases have a page that only contains the semantic info, and a separate Release_notes/xxx page with all the information about the release, for example [[8.1.1]] and [[Release notes/8.1.1]]. This is a hassle for editors who have to maintain two pages and the link between them, and for users who follow links to a build and then have to go to its release notes.

[[User:CScott]] experimented with moving the semantic info for 8.1.0 into [[Release notes/8.1.0]], but that means in a query of e.g. build numbers and firmware versions the "release" appears as Release notes/8.1.0. And it's strange for a page named "Release notes/8.1.0" to make semantic statements like "my ECO is xyz", "my firmware version is nnn", etc.

[[User:Skierpage]] thinks the solution is to have pages named e.g. [[9.1.0]] with the semantic information in a "Standard information" section. Then as release note information becomes available, editors add it to this page in additional sections and categorize the page as [[:Category:Release notes]]. There is no compelling need for release notes to be subpages of "Release notes". There is unlikely to be title conflict between release numbers and existing pages.

[[User:CScott]] also removed past release info from [[Releases]] and put it in [[Release notes]], turning the former into [[Future releases]]. This also shows the distinction between releases and release notes is not useful. As a release page firms up, it gets release note information.

==== Info for each release ====
Here are some properties that releases may have, based on the [[Releases]] page and e-mail message "Re: [sw-eco] q2e11 firmware for 8.1.2 ECO" to devel@laptop.org of 2008-07-15:
* [[Property:Status]]: string, restricted to values like "nascent", "gathering requirements", "released".
* [[Property:Primary maintainer]]: usually someone with a wiki page
* Note the Release Notes wiki page can be derived from the release name, it's always Release_notes/''N.N.N''
* ECO: a release uses the more general [[Property:Is part of]] to link to an ECO's wiki page
* Primary objectives: a release can have multiple [[Property:Has objective]] values.
* [[Property:Lead customer]]: wiki page, can be the country [[Peru]] or the organization [[OLPC_Peru]].
* [[Property:Build number]]
** Build URL: In theory for a released release this can be derived from Build_number, it's always http://download.laptop.org/xo-1/os/official/''NNN''. But to make it easier and future-proof, it's an explicit separate [[Property:Download URL]].
* Schedule: Each release page can have a [[Property:Target date]] if it's still planned and should have a [[Property:Release date]] when its status becomes "released". The release's page may have additional details such as a schedule URL, Created date, or Date documentation posted, these aren't properties.
* a [[Property:firmware]] wiki page like [[OLPC Firmware q2e15]]. ''or is this a property of the build''?
* a [[Property:Release notes]]. Release ''N.NN.N'' 's notes are currently the page <nowiki>[[Release notes/</nowiki>''N.N.N'']] , but as of SMW version 1.2 in September 2008 you can't modify a page property to make a different page link.

===== Future releases vs. released releases =====
A future release has
* <nowiki>[[Build number::999]]</nowiki> &mdash; it doesn't have a known build
* <nowiki>[[Status::</nowiki>''anything but Released'']]
* <nowiki>[[Target date::</nowiki>''some date'']] and no <nowiki>[[Release date]]</nowiki>

A release that's happened has
* <nowiki>[[Build number::</nowiki>''NNN'']]
* <nowiki>[[Status::Released]]</nowiki>
* <nowiki>[[Release date::</nowiki>''some date'']] and no <nowiki>[[Target date]]</nowiki>

==== Release info issues ====
* If Greg wants to re-display additional status information in the queries on the Releases page like "Candidate build is out - Join the test effort!", we could add [[Property:More info]] to release pages and display in queries.
* The [[Releases]] page used to show
** link to release notes
** URL for build directory
** each objective in a bulleted list
: Displaying these in the queries would require creating a query results template.

==== ECOs? ====
Each ECO is associated with a release and has info like:
* Title: string (not always a release)
* Date proposed: date
* Target date: date, sometimes fuzzy like "week of 2008-03-02"
* Trac items: multiple bug numbers (and manual copy of their text)
* Date released
* Priority: "normal", "high", with string
* Champion: usually someone with a wiki page.
* Reviewers: wiki text, often includes "triage team" and/or "Testing: 1 Hour [[Smoke test]]"
* Special testing required: string
* Rollout: "Manufacturing" and "Field"
* Checklist: wiki page for URL, usually ''<ECO page_name>''_Checklist


It's unclear if any of this is worth annotating. Maybe a table of ECOs with their build and firmware, but the release is tied to an ECO, not vice-versa.
: Greg's concern: identify and separate past (definite) releases from future (indefinite, in-planning) releases.


==== Reusing release values ====
==== Reusing release values ====
Line 82: Line 177:


=== For events ===
=== For events ===
All we need to do is put [[Property:Start date]] and [[Property:End date]] on [[:Category:Events|events]], [[:Category:Meetings|meetings]], and [[:Category:Jam|jams]] and we can display upcoming events on a timeline, see e.g. http://semanticweb.org/wiki/Upcoming_events
Annotate [[:Category:Events|events]], [[:Category:Jam|jams]], and [[:Category:Meetings|meetings]] with [Property:Start date]], and then other pages can query to get a list or timeline of future pages. See the queries on [[Jams]] and [[Events#Upcoming events on wiki.laptop.org ]]


Also use [[Property:Cooordinates]] to annotate where an event is.
* Also give events a [[Property:End date]]; this is optional for meetings and jams that are usually one day.
Don't get too excited, displaying multiple events as pushpins on a map requires additional extensions.


* Additional properties appropriate for events are [[Property:Has location city]] and [[Property:Has location country]]
==To Do list==


* Can also use [[Property:Cooordinates]] to annotate where an event is. See, e.g. [[OLPC Switzerland/Meeting October Bern]]. Unfortunately it seems that displaying multiple events as markers on a map requires additional extensions.
===Trivial Fixes ===

;(ie just install something/ fix something that’s already installed)
=== For software features ===
2008-12-12 the [[Feature roadmap/Archive/pre-9.1.0 |static feature roadmap]] was split into subpages, and [[Feature roadmap]] queries these. [[Features-test]] has other sample queries.

Each feature is a subpage of Feature roadmap/ ; each uses [[Template:Feature tracking]] to add semantic properties to itself and display a standard appearance.

[[/Archive]] has original discussion and planning of the feature.

==== TODO ====
* Remove the redundant [[Property:Short name]], you can get "Concept maps" from [[Feature roadmap/Concept maps]] using parser functions:
<nowiki>{{#sub:
{{{1}}} |
{{#if: {{#pos:{{{1}}}|/}} |
{{#expr: {{#pos:{{{1}}}|/}} + 1}} |
{{#pos:{{{1}}}|/}}
}}
}}</nowiki>

* [[Property:Priority]] should be set to something if not explicitly set.
* see if category assignment can be put in a <nowiki><noinclude</nowiki> so that a format=embedded query doesn't get category assignments.
* Make [[9.1.0]] page query for pages with [[Property:Target for 9.1]].
* Add a query to each deployment page showing its requested features (see [[Features-test]])
* Once layout settles down, use a template to display query results, which can:
** Remove "Feature roadmap/" in front of every name.
* ''Decide?'' Add <nowiki>__NOFACTBOX__</nowiki> to feature pages so they don't have a confusing factbox following the table?
* ? Maybe remove the period from [[Property:Target for 9.1]] as it causes weird breakage in queries (have to put a space in front of it.

== Where semantics ''could'' be used ==

=== For translations? ===
The main translation infrastructure on the wiki requires that for every page that has translations you maintain a little subpage linking the different translations together. For example, [[Software components]] has [[Software components/translations]] that lists
<nowiki>{{translationlist | es | it | ja | ko | orig=en }}</nowiki>

As an alternative, the [http://semantic-mediawiki.org Semantic-MediaWiki.org site] uses a [http://semantic-mediawiki.org/wiki/Template:Docu "Docu" template] that queries to find all other pages based off the same master page and displays a translation bar linking to them. The existing [[Template:translation]] could probably be adapted to work with semantics, since the information that this query needs is already in pages, such as:
<nowiki>{{ Translation | lang = de | source = Translating/HowTo | version = 54321 }}</nowiki>
The benefit is no one has to maintain the "Page foo/translations" page, and there's only one template to use, instead of Translation and Translation'''s'''. (The existing [[Template:Translations]] would call this, defaulting to lang=en and source=<nowiki>{{PAGENAME}}</nowiki>.)



=== For content repositories? ===
[[User:Lauren]] and others created lots of pages in [[:Category:Content Repository]] about various online libraries and collections.
These pages have information such as
* Format
* Scope
* Multilingualism
* Quality
which ''could'' be made into semantic annotations for properties with these names, so you could query "Show me the name, url, and formats of all content repositories of topic::''music'' with quality::''high''.

These seems to come from [[Template:Content item]] (maybe there's a "Create content item" link or option somewhere?). However, skierpage looked at a dozen of these pages in September 2008 and in most of them these fields aren't filled out.

==To Do list==


;Semantic google maps
=== Semantic Google maps ===
: Way to embed google maps in wiki with locations of projects/deployments and with links to appropriate wiki pages.
To embed google maps in the wiki with locations of projects/deployments/events and with links to appropriate wiki pages, we need
* Create [[Property:Coordinates]] &mdash; ''done'', pages that use it get a "service links" to Google maps for free (click the (?) button, click the link).<br />Still '''TO DO''':
:: Create a property of [[Type:Geographic coordinate]] and you get "service links" to Google maps for free (see e.g. [http://semantic-mediawiki.org/wiki/Property:Coordinates], click the (?) symbol). However, displaying ''several'' such locations on one Google Map is tricky, you either need the [[mw:Extension:Semantic_Google_Maps|Semantic Google Maps extension]] with SMW version 1.2 and/or the [[mw:Extension:Google_Maps|Google Maps extension]] (see [http://www.peakbagging.co.nz/index.php/Mt_Ruapehu#Google_Map example]) -- [[User:Skierpage|Skierpage]] 10:26, 31 July 2008 (UTC)
* Install http://www.mediawiki.org/wiki/Extension:Semantic_Google_Maps
* Get a Google Maps API key.
* Add Coordinates to [[Form:Deployment]] and [[Template:Deployment]], also to event pages.
* Query for these to show maps of deployments and events
Meanwhile, people have [http://maps.google.com/maps/ms?f=q&hl=en&ie=UTF8&cd=1&om=1&msa=0&msid=114558805698125207804.000440a3d84313e9c1ecd&ll=-18.229351,-47.724609&spn=85.325239,-67.300873&source=embed made their own maps on Google]<br />-- [[User:Skierpage|Skierpage]] 02:55, 1 October 2008 (UTC)


===Easy Fixes ===
===Easy Fixes ===
Line 106: Line 255:
:Make a tag that says this is not semantic stuff
:Make a tag that says this is not semantic stuff
::Ignore semantics in a specific name space
::Ignore semantics in a specific name space
::The wiki already ignores semantic annotations in the Template: namespace. -- [[User:Skierpage|Skierpage]] 03:01, 1 October 2008 (UTC)




;Alt text not working in templates:
;Alt text not working in templates:
:Feature part of [[Tests/Sugar_Control_Panel/About_Me/Color_Change]]
:Feature part of [[Tests/Sugar_Control_Panel/About_Me/Color_Change]]
:: Actually this is hard to fix in SMW. If something is of Type:Page, you can't provide alt text to display in query results instead of the page link, even though it's trivial to do in wiki markup. -- [[User:Skierpage|Skierpage]] 03:01, 1 October 2008 (UTC)


; Add new types
; Add new types
Line 118: Line 269:
:Time duration
:Time duration
:: If you want auto-conversion between e.g. weeks and days and seconds, copy what you want from [http://semanticweb.org/wiki/Type:Time] -- [[User:Skierpage|Skierpage]] 10:42, 31 July 2008 (UTC)
:: If you want auto-conversion between e.g. weeks and days and seconds, copy what you want from [http://semanticweb.org/wiki/Type:Time] -- [[User:Skierpage|Skierpage]] 10:42, 31 July 2008 (UTC)

:User
:User
:: Not sure what this means. If it's links to [[User:skierpage]] then maybe just create Property:User of type:page.
:: Not sure what this means. If it's links to [[User:skierpage]] then maybe just create Property:User of type:page.

:Trac
:Trac bug number
:: 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 [http://semantic-mediawiki.org/wiki/Help:Service_links Service links] and templates to turn the number into a trac URL.
:: This is available as [[Property:Trac bug number]] of type:Number. You should be able to use [http://semantic-mediawiki.org/wiki/Help:Service_links Service links] and templates in query results to get this to display as a link. But numbers appear with a comma for the thousands separator. Could instead make it Type:URL and you use a template to fabricate the URL, but then it would appear as a long URL in query results. It might be possible to write PHP code to create a Type:Trac that displays appropriately, similar to how the <nowiki><trac>4321</trac></nowiki> code displays.

:Image
:Image
:: Just some property of Type:Page (the default), in most cases SMW do the right thing and display the image .
:: Just some property of Type:Page (the default), in most cases SMW do the right thing and display the image .
:Template?



:Template?
;Make the free text box larger.
;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.
;When creating a template, you should be able to create properties in that window as well as use already created properties.
Line 185: Line 337:


[[Category:Semantic MediaWiki]]
[[Category:Semantic MediaWiki]]

== How tos ==

=== Modify or remove a property ===

Summary:
# Edit the template the form fills in
# edit the form
# edit queries that use the property

Here's an example from [[User:Skierpage]] of removing [[Property:Contact person]] from deployment pages.

A human being should have documented the [[Property:Contact person]] page with:
: ''Template:Foo, filled in by Form:Bar, may set this property.''

1. Instead, if you edit a deployment page you can see
{{Deployment
...
|contact person=user:sbuchele

therefore [[Template:Deployment]] sets this property. So I edited the template and removed the table row that sets this property. Changing a template should (and did!) eventually update pages invoking it like [[OLPC_Ghana]]; if you don't want to wait you would Edit & Save each deployment page to get it to happen faster.

2. To modify the form, you could guess it's called [[Form:Deployment]], or use [[Special:Allpages]] to show all pages in the Form: namespace, or look at [[:Category:Deployments]] and see <nowiki>[[Has default form::Form:Deployment]]</nowiki> which makes the "edit with form" tab appear.

I'm not an expert in Semantic Forms, so I just edited [[Form:Deployment]], deleted the "Contact Person" part of it, and it seemed to work.


3. Then, edit queries that show Contact person and delete the
| ?Contact person
line. I did so on the [[Deployments]] page.

Latest revision as of 20:15, 1 February 2013

   This page is part of the Wiki Cleanup Project.   [[ Wiki SEO | Cleanup | Wiki tasks ]]

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

mw:Semantic Forms is another extension that exploits SMW to let users edit template information in a form.

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 in 2008 used 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

  • None of the properties are documented, none of the fields say whether they are optional or not.
  • Compare Tests/Sugar Control Panel/About Me/Color Change and Eben's Tests/Home view, latter uses different terminology: Justification (like Feature?), Actions (like Procedure?, Verify (like Expected results and pass criteria?
  • Property:Build stream could usefully have service links to builds, diffs, packages, etc. This requires lowercase names (most URL's use joyride, not Joyride). See Property:Build stream for a discussion.

Maybe an integrated system that manages test cases and test results is better, such as Mozilla's Litmus. According to Community testing meetings/2008-12-04, "Adric" was going to set up a demo of this.

Organizing Test cases

We are using long titles with subpages 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 make a semantic query for test cases "like" Tests/Sugar_*. to only show certain test cases. Or you can ignore semantics and use MediaWiki's Special:PrefixIndex to list subpages, e.g. {{Special:PrefixIndex/Tests/Sugar}} lists all pages named "Tests/Sugar...":

The Test page uses this technique to show all its subpages. . The downside of this simple hack is it can only list titles, it doesn't show semantic info in the matching pages.

Issues for test results

The form editor lets you add multiple test results to a test case. So a page like Tests/Upgrades/DataIntegrity can have both values for Property:PassFail, and you can't tell in a query which one is associated with a particular build. To isolate each result, you would have to create a separate page for each combination of test case and build, e.g. TR_Build2230/Upgrades/DataIntegrity. 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?

Test results are less suitable for a wiki (thousands of them, complex grouping and master-detail relationships, a desire for statistics and graphing, etc.). OLPC testers wrestled with several alternatives to manage test case results (Google docs, Google forms); the best page on the subject is Community testing meetings/2008-11-06/Displaying testing metrics in motivating ways.

Test results details

Form:Test_case somehow has adds a Template:Test results for each test result. There's also Form:Test Results which brings up a broken editing form and invokes a non-existent Template:Test Results, see Try_to_break_2.

Sj and others figured out how to put a + button in a query to add a test result, see {{Add-test-result}} used by {{Test-case-query}} in e.g. Test cases 8.2.0.


  • 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 (what is this?) 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.

As of February 2009 it seems like this didn't catch on. {{Project-summary}} is used more than Template:Project — I'm not sure why the former wasn't adapted to set the same semantic properties. There are very few tasks, and none setting properties like Property:Skills needed or Property:Done. -- skierpage 01:29, 10 February 2009 (UTC)

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 annotates general information about activities. Form:Activity fills this in. There is also a Template:Activity bundle that allows for multiple bundle versions so that you can keep track of, for example, the last activity version that works with build 656 separately from the latest version.

The To add another activity version that works with other builds click "add another form interface works nicely for editing, but doesn't work for querying! It just adds more Property:Activity version and Property:Activity bundle values to the page — they aren't grouped together in any way except visually. This is the same underlying issue as adding multiple Test results to a test case, see #Issues for test results. -- Skierpage 01:08, 14 September 2008 (UTC)

We need to fix the templates so they can tell the difference betweeen latest version and the versions that work on earlier releases.

There are queries of this in:

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.

Activity update?

The XO's Software update panel (new in release 8.2.0) consults wiki pages like Activities and Activities/Joyride to figure out whether a newer version of an activity is available. Perhaps these pages could be generated by querying for the properties of activities, and feeding the results into a template like {{Activity-oneline}} that displays the resulting HTML with the rigorous Activity microformat.

Other things to do

People want changes but what exactly?

For releases

The Releases page had duplicated summary information for each release. In September 2008 this info was annotated in each release page (see e.g. 8.1.0), so you could query for it. Some queries:

Also see Releases-test page.

ISSUE: Merging release page and "Release notes"

As of September 2008, most releases have a page that only contains the semantic info, and a separate Release_notes/xxx page with all the information about the release, for example 8.1.1 and Release notes/8.1.1. This is a hassle for editors who have to maintain two pages and the link between them, and for users who follow links to a build and then have to go to its release notes.

User:CScott experimented with moving the semantic info for 8.1.0 into Release notes/8.1.0, but that means in a query of e.g. build numbers and firmware versions the "release" appears as Release notes/8.1.0. And it's strange for a page named "Release notes/8.1.0" to make semantic statements like "my ECO is xyz", "my firmware version is nnn", etc.

User:Skierpage thinks the solution is to have pages named e.g. 9.1.0 with the semantic information in a "Standard information" section. Then as release note information becomes available, editors add it to this page in additional sections and categorize the page as Category:Release notes. There is no compelling need for release notes to be subpages of "Release notes". There is unlikely to be title conflict between release numbers and existing pages.

User:CScott also removed past release info from Releases and put it in Release notes, turning the former into Future releases. This also shows the distinction between releases and release notes is not useful. As a release page firms up, it gets release note information.

Info for each release

Here are some properties that releases may have, based on the Releases page and e-mail message "Re: [sw-eco] q2e11 firmware for 8.1.2 ECO" to devel@laptop.org of 2008-07-15:

Future releases vs. released releases

A future release has

  • [[Build number::999]] — it doesn't have a known build
  • [[Status::anything but Released]]
  • [[Target date::some date]] and no [[Release date]]

A release that's happened has

  • [[Build number::NNN]]
  • [[Status::Released]]
  • [[Release date::some date]] and no [[Target date]]

Release info issues

  • If Greg wants to re-display additional status information in the queries on the Releases page like "Candidate build is out - Join the test effort!", we could add Property:More info to release pages and display in queries.
  • The Releases page used to show
    • link to release notes
    • URL for build directory
    • each objective in a bulleted list
Displaying these in the queries would require creating a query results template.

ECOs?

Each ECO is associated with a release and has info like:

  • Title: string (not always a release)
  • Date proposed: date
  • Target date: date, sometimes fuzzy like "week of 2008-03-02"
  • Trac items: multiple bug numbers (and manual copy of their text)
  • Date released
  • Priority: "normal", "high", with string
  • Champion: usually someone with a wiki page.
  • Reviewers: wiki text, often includes "triage team" and/or "Testing: 1 Hour Smoke test"
  • Special testing required: string
  • Rollout: "Manufacturing" and "Field"
  • Checklist: wiki page for URL, usually <ECO page_name>_Checklist

It's unclear if any of this is worth annotating. Maybe a table of ECOs with their build and firmware, but the release is tied to an ECO, not vice-versa.

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

Annotate events, jams, and meetings with [Property:Start date]], and then other pages can query to get a list or timeline of future pages. See the queries on Jams and Events#Upcoming events on wiki.laptop.org

  • Also give events a Property:End date; this is optional for meetings and jams that are usually one day.

For software features

2008-12-12 the static feature roadmap was split into subpages, and Feature roadmap queries these. Features-test has other sample queries.

Each feature is a subpage of Feature roadmap/ ; each uses Template:Feature tracking to add semantic properties to itself and display a standard appearance.

/Archive has original discussion and planning of the feature.

TODO

{{#sub:
  {{{1}}} |
  {{#if: {{#pos:{{{1}}}|/}} |
        {{#expr: {{#pos:{{{1}}}|/}} + 1}} |
        {{#pos:{{{1}}}|/}}
  }}
 }}
  • Property:Priority should be set to something if not explicitly set.
  • see if category assignment can be put in a <noinclude so that a format=embedded query doesn't get category assignments.
  • Make 9.1.0 page query for pages with Property:Target for 9.1.
  • Add a query to each deployment page showing its requested features (see Features-test)
  • Once layout settles down, use a template to display query results, which can:
    • Remove "Feature roadmap/" in front of every name.
  • Decide? Add __NOFACTBOX__ to feature pages so they don't have a confusing factbox following the table?
  • ? Maybe remove the period from Property:Target for 9.1 as it causes weird breakage in queries (have to put a space in front of it.

Where semantics could be used

For translations?

The main translation infrastructure on the wiki requires that for every page that has translations you maintain a little subpage linking the different translations together. For example, Software components has Software components/translations that lists

 {{translationlist | es | it | ja | ko | orig=en }}

As an alternative, the Semantic-MediaWiki.org site uses a "Docu" template that queries to find all other pages based off the same master page and displays a translation bar linking to them. The existing Template:translation could probably be adapted to work with semantics, since the information that this query needs is already in pages, such as:

 {{ Translation | lang = de  | source = Translating/HowTo  | version = 54321 }}

The benefit is no one has to maintain the "Page foo/translations" page, and there's only one template to use, instead of Translation and Translations. (The existing Template:Translations would call this, defaulting to lang=en and source={{PAGENAME}}.)


For content repositories?

User:Lauren and others created lots of pages in Category:Content Repository about various online libraries and collections. These pages have information such as

  • Format
  • Scope
  • Multilingualism
  • Quality

which could be made into semantic annotations for properties with these names, so you could query "Show me the name, url, and formats of all content repositories of topic::music with quality::high.

These seems to come from Template:Content item (maybe there's a "Create content item" link or option somewhere?). However, skierpage looked at a dozen of these pages in September 2008 and in most of them these fields aren't filled out.

To Do list

Semantic Google maps

To embed google maps in the wiki with locations of projects/deployments/events and with links to appropriate wiki pages, we need

Meanwhile, people have made their own maps on Google
-- Skierpage 02:55, 1 October 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
The wiki already ignores semantic annotations in the Template: namespace. -- Skierpage 03:01, 1 October 2008 (UTC)


Alt text not working in templates
Feature part of Tests/Sugar_Control_Panel/About_Me/Color_Change
Actually this is hard to fix in SMW. If something is of Type:Page, you can't provide alt text to display in query results instead of the page link, even though it's trivial to do in wiki markup. -- Skierpage 03:01, 1 October 2008 (UTC)
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 [1] -- 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 bug number
This is available as Property:Trac bug number of type:Number. You should be able to use Service links and templates in query results to get this to display as a link. But numbers appear with a comma for the thousands separator. Could instead make it Type:URL and you use a template to fabricate the URL, but then it would appear as a long URL in query results. It might be possible to write PHP code to create a Type:Trac that displays appropriately, similar to how the <trac>4321</trac> code displays.
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

Use Template:SMW issue to note a problem on any page, it'll show up on the Property:SMW issue page.

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.

How tos

Modify or remove a property

Summary:

  1. Edit the template the form fills in
  2. edit the form
  3. edit queries that use the property

Here's an example from User:Skierpage of removing Property:Contact person from deployment pages.

A human being should have documented the Property:Contact person page with:

Template:Foo, filled in by Form:Bar, may set this property.

1. Instead, if you edit a deployment page you can see

 {{Deployment
 ...
 |contact person=user:sbuchele

therefore Template:Deployment sets this property. So I edited the template and removed the table row that sets this property. Changing a template should (and did!) eventually update pages invoking it like OLPC_Ghana; if you don't want to wait you would Edit & Save each deployment page to get it to happen faster.

2. To modify the form, you could guess it's called Form:Deployment, or use Special:Allpages to show all pages in the Form: namespace, or look at Category:Deployments and see [[Has default form::Form:Deployment]] which makes the "edit with form" tab appear.

I'm not an expert in Semantic Forms, so I just edited Form:Deployment, deleted the "Contact Person" part of it, and it seemed to work.


3. Then, edit queries that show Contact person and delete the

 | ?Contact person

line. I did so on the Deployments page.