Wikidata:Property proposal/Archive/40

This page is an archive. Please do not modify it. Use the current page, even to continue an old discussion.

Properties for other property constraints

Properties to formalize property constraints that are currently enforced by KrBot using constraint templates, namely (set as of Nov 2014):

Originally proposed

These properties are currently in Wikidata:Property_proposal/Pending/4#Metadata properties, originating from Wikidata:Project_chat/Archive/2013/10#Property_Metadata:

  • Constraint type
  • Property used for constraint
  • Item used for constraint
  • Format used for constraint

Now constraints templates have many different functionality. Some questions:

  1. How to represent parameters mandatory, exceptions, group property?
  2. How to represent both {{Constraint:Range|min=1900|max=2000}}, {{Constraint:Range|min=1900|max=now}}?
  3. How to represent human readable description of constraint?
  4. How to represent constraint icon?
  5. How to represent link to corresponding section in constraint report?
  6. How to represent link to AutoList for {{Constraint:Item}}?
  7. How to validate the parameters? Constraints for constraints?
  8. Can WD core process long lists like on Property talk:P225?
  9. How to represent comments for constraints?

Ivan A. Krestinin (talk) 10:40, 17 November 2014 (UTC)

I see this way to represent current constraint system using properties:

taxon rank (P105)
<constraint (new property)> [Type constraint (new item)]
qualifier: <class (new property)> [taxonomic rank (Q427626)]
qualifier: <relation (new property)> [instance]
qualifier: <constraint status (new property)> [mandatory]
<constraint (new property)> [Item constraint (new item)]
qualifier: <property (new property)> [parent taxon (P171)]
qualifier: <known exception (new property)> [virus (Q808)]
discussion

I think this can be simplified:

<constraint (new property)> [Type constraint (new item)]
qualifier:(instance of (P31):taxonomic rank (Q427626))
qualifier: <constraint status (new property)> [mandatory]
qualifier: <has property (new property)> [parent taxon (P171)]
qualifier: <known exception (new property)> [virus (Q808)]

Properties needed to implement this idea:

.

Property Type Currently presented by Existing candidate?
constraint Item template name property constraint (P2302)
constraint status Item "mandatory" property constraint status (P2316)
known exception Item "exceptions" property exception to constraint (P2303)
group by Property "group property" property group by (P2304)
pattern String "pattern" property of {{Constraint:Format}} format as a regular expression (P1793)
item Item "values" property of {{Constraint:One of}},
"item" property of {{Constraint:Item}},
"item" property of {{Constraint:Target required claim}},
part of "list" property of {{Constraint:Conflicts with}}
item of property constraint (P2305)
property Property "property" property of {{Constraint:Inverse}},
"property" property of {{Constraint:Item}},
"property" property of {{Constraint:Target required claim}},
part of "list" property of {{Constraint:Conflicts with}}
property (P2306)
namespace String "namespace" property of {{Constraint:Commons link}} namespace (P2307)
class Item "class" property of {{Constraint:Type}},
"class" property of {{Constraint:Value type}}
class (P2308)
relation Item "relation" property of {{Constraint:Type}},
"relation" property of {{Constraint:Value type}}
relation (P2309)
min date Point in time "min" property of {{Constraint:Range}},
"min" property of {{Constraint:Diff within range}}
minimum date (property constraint) (P2310)
max date Point in time "max" property of {{Constraint:Range}},
"max" property of {{Constraint:Diff within range}}
{maximum date (property constraint) (P2311)
min quantity Quantity "min" property of {{Constraint:Range}},
"min" property of {{Constraint:Diff within range}}
maximum value (P2312)
max quantity Quantity "max" property of {{Constraint:Range}},
"max" property of {{Constraint:Diff within range}}
minimum value (P2313)
comment Monolingual text comments in wikicode comment (DEPRECATED) (P2315)

And we need template or gadget that will represent this technical records in human-readable form similar to current constraint templates or better. — Ivan A. Krestinin (talk) 22:24, 3 December 2014 (UTC)

The preceeding post by Krestinin refers to Point in time but in this bug task it is taken for granted that the meaning of time is different from the documented version; it can hold a date in any calendar. This means the so-called time is a string, not a number, so comparisons such as min or max cannot be made. Since it could be any calendar, it can't be converted to a number. Also, since the allowed range could be very large, even if one knew which calendar the date was in, it could be hard to find an algorithm that would convert it to a number correctly. Jc3s5h (talk) 19:46, 19 February 2015 (UTC)
Usually min or max time contains date with year precession. Usually limits are in 1600-2000 range. So this issue is not very actual for proposed task. See current usage of Range and Diff within range constraints. More interesting question is how to specify "now" as max value. — Ivan A. Krestinin (talk) 20:29, 19 February 2015 (UTC)
Lunar or solar years ? Thanks, GerardM (talk) 11:11, 20 February 2015 (UTC)

Properties to be implemented for realising Ivans proposal and migrating constraints

We are implementing constraint checks for the constraints that are used in the property talk pages. At first, the results should be displayed on a special page (it is ready to go, but currently under code review), and later, the violations should be displayed when you visit an items page. To do this, we need the constraints to be defined as statements on properties. Ivans proposal preserves the structur of the constraints, so it would be great to stick with it. The following properties are needed for it. During the time those new properties are discussed and implemented, we are planning to write a bot to migrate the constraints from the talk pages to those new properties. The "constraint" property is a "real" property, all the other suggested properties should be used as qualifiers.

Migration question: are you working on module for human-readable presentation of the constraints? (something like Module:Property documentation in part of formatter URL (P1630), subject item of this property (P1629) displaying) — Ivan A. Krestinin (talk) 16:24, 7 March 2015 (UTC)
@Ivan A. Krestinin, Jonas.keutel: Re "do not implement until we are ready to migrate" Can we have an update and target date, please? I plan to mark these items as   On hold until we are ready to use them. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:25, 24 March 2015 (UTC)

constraint

Descriptionproperty indicating that a constraint follow (see above for detailed explanation).
Data typeItem
Allowed valuesNew items like "xyz constraint" (see overview page here)
Exampledate of birth (P569): constraint ==> single value constraint
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion
  •   Support including all qualifiers below. --- Jura 14:13, 7 March 2015 (UTC)
    •   Comment the labels of qualifiers that are meant to be used for constraint only should probably include "property constraint" or at least "constraint". --- Jura 11:02, 21 March 2015 (UTC)
  •   Support including all qualifiers below. --- Anjeve 10:30, 16 March 2015 (UTC)
  •   Support --Pasleim (talk) 15:24, 23 March 2015 (UTC)
  •   Support for all, to get this working. --Succu (talk) 20:07, 9 May 2015 (UTC)
  •   Comment: Even if we don't implement the entire set of properties for now, I think it would be good if we could query for single value constraints. I'd go ahead and create this property, even if the constraint reports keep running on the templates. --- Jura 02:12, 7 November 2015 (UTC)

constraint status

DescriptionProperty representing the mandatory statement from current constraint usage (see above for detailed explanation).
Data typeitem or string-invalid datatype (not in Module:i18n/datatype)
Allowed valuesMandatory (as item or string)
Exampleconstraint status ==> mandatory
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion
I think boolean would have been a better datatype, but we don't have that one. What datatype is best to use string or item? We don't have an item for mandatory at the moment. Mbch331 (talk) 19:32, 16 November 2015 (UTC)
Used Item as stated in the table. Mbch331 (talk) 20:35, 16 November 2015 (UTC)

known exception

DescriptionProperty representing the exception statement from current constraint usage (see above for detailed explanation).
Data typeItem
Allowed valuesnearly every item
Exampleknown exception ==> Q1234
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

group by

   Done: group by (P2304) (Talk and documentation)
DescriptionProperty representing the group by/group property statement from current constraint usage (see above for detailed explanation).
Data typeProperty
Allowed valuesNearly every property
Examplegroup by ==> P123
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion
Ivan A. Krestinin "See above for detailed explanation". Where? I couldn't find this explanation. Is this property the same as "sub-property of"?Filceolaire (talk) 00:50, 21 March 2015 (UTC)
Not "sub-property of". Please see "group property" of {{Constraint}}. — Ivan A. Krestinin (talk) 05:21, 21 March 2015 (UTC)

item

DescriptionProperty representing the item statement from current constraint usage (see above for detailed explanation).
Data typeItem
Allowed valuesnearly every item
Exampleitem ==> Q1234
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

property

   Done: property (P2306) (Talk and documentation)
DescriptionProperty representing the property statement from current constraint usage (see above for detailed explanation).
Data typeProperty
Allowed valuesnearly every property
Exampleproperty==> P123
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

namespace

   Done: namespace (P2307) (Talk and documentation)
DescriptionProperty representing the namespace statement from current constraint usage (see above for detailed explanation).
Data typeString
Allowed valuesFile, Category
Examplenamespace ==> File
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

class

   Done: class (P2308) (Talk and documentation)
DescriptionProperty representing the class statement from current constraint usage (see above for detailed explanation).
Data typeItem
Allowed valuesnearly every item
Exampleclass ==> Q1234
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

relation

   Done: relation (P2309) (Talk and documentation)
DescriptionProperty representing the relation statement from current constraint usage (see above for detailed explanation).
Data typeItem
Allowed valuesInstance, Subclass
Examplerelation ==> Instance (Qxyz)
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

min date

DescriptionProperty representing the min statement from current constraint usage (see above for detailed explanation).
Data typePoint in time
Allowed valuesevery time value, now (how to represent that?)
Examplemin date ==> 01.01.1970
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

max date

DescriptionProperty representing the max statement from current constraint usage (see above for detailed explanation).
Data typePoint in time
Allowed valuesevery time value, now (how to represent that?)
Examplemax date ==> 01.01.1970
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

min quantity

   Done: minimum value (P2313) (Talk and documentation)
DescriptionProperty representing the min statement from current constraint usage (see above for detailed explanation).
Data typeNumber (not available yet)
Allowed valuesevery number
Examplemin quantity ==> 0
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

max quantity

   Done: maximum value (P2312) (Talk and documentation)
DescriptionProperty representing the max statement from current constraint usage (see above for detailed explanation).
Data typeNumber (not available yet)
Allowed valuesevery number
Examplemax quantity ==> 200000
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion

comment

DescriptionProperty enabling users to add comments in wikicode (see above for detailed explanation).
Data typeMonolingual text
Allowed valuesevery string
Examplestring ==> [explanation of usage/meaning of this constraint]
Robot and gadget jobsMigrate constraints from property talk pages.
Proposed byIvan A. Krestinin, Jonas.keutel (talk)

Please support or comment, but do not implement until we are ready to migrate. Jonas.keutel (talk) 12:59, 7 March 2015 (UTC)

Discussion
  •   Comment maybe this should be a monolingual string. --- Jura 14:15, 7 March 2015 (UTC)
  • Should be multilingual string since we would like wikidata users to come up with translations in every language. As we don't have that datatype it could be monolingual text datatype for now. Please change the datatype from string. Filceolaire (talk) 00:55, 21 March 2015 (UTC)
Changed. — Ivan A. Krestinin (talk) 05:22, 21 March 2015 (UTC)
  Comment -- See also Wikidata:Property_proposal/Archive/44#property_usage. LaddΩ chat ;) 02:52, 26 January 2016 (UTC)