Description
We have decided to allow certain predefined ZObjects (created for T390559) to make use of several user-defined types (as types of their keys). For this to work well, these user-defined types, and some of their related support functions, need to be available for testing, in CI and in local environments. To make them available, we need to do the following steps for each of the ZObjects listed below.
- Get the JSON content for its entire Z2 from Wikifunctions.org
- Remove all labels, aliases, and descriptions except those in English
- Using the original ZID, commit & merge the resulting slenderized JSON, as <ZID>.json, in function-schemata/data/definitions
- Natural number
- JS converter from Natural number
- Python converter from Natural number
- JS converter to Natural number
- Python converter to natural number
- equality of natural numbers
- Whichever implementation is currently listed first in the function's Z8K4
- Rational number
- Python converter from Rational number
- JavaScript convert from Rational Number
- Python Fraction to Rational number
- JavaScript convert to Rational Number
- same Rational number
- Whichever implementation is currently listed first in the function's Z8K4
- Integer
- JS converter from Integer
- Python converter from Integer
- Python int to Integer
- BigInt to Integer
- same Integer
- Whichever implementation is currently listed first in the function's Z8K4
- Gregorian calendar date
- Python converter from Gregorian calendar date
- JavaScript converter from Gregorian calendar year
- Python converter to Gregorian calendar date
- JavaScript converter to Gregorian calendar date
- Same Gregorian calendar date
- Whichever implementation is currently listed first in the function's Z8K4
Nested types (Added 2 June 2025):
The above 4 types are directly referenced by the new predefined types created for T390559.
Below are some nested types - user-space types that are referenced by the four types above. It's not entirely clear at present whether they need to be added. If the following referenced types are not present, will some tests break? Do we even know without trying it? (From the orchestrator perspective, we should know more after coding tests for T391216.) Also, if we include these types, should we include their converters and equality functions (if any)?
- Rational number uses:
- Sign (Z16659)
- Gregorian calendar date uses:
- Gregorian year (Z20159), which uses
- Gregorian era (Z17813)
- Day of Roman year (Z20342), which uses
- Gregorian calendar month (Z16098)
- Gregorian year (Z20159), which uses
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist