Module:CalibrationCycle/doc: Difference between revisions
No edit summary |
Calibration Report | 2026-07-13 | Self-Assessment | Added Admin Page Status block. Flagged likely SMW namespace exclusion for Module: pages (same bug class as Template: pages found earlier today) proactively. Flagged {{Documentation}} call as unconfirmed pattern needing verification. See Talk for full report. |
||
| Line 1: | Line 1: | ||
== Description == | == Description == | ||
This module calculates the status of review cycles based on a given date. It is primarily used to determine whether a page's last review is still current, approaching its deadline, or overdue. | This module calculates the status of review cycles based on a given date. It is primarily used to determine whether a page's last review is still current, approaching its deadline, or overdue. | ||
It is designed to work together with Semantic MediaWiki properties (especially <code>Has cycle status</code> and <code>Last reviewed</code>). | It is designed to work together with Semantic MediaWiki properties (especially <code>Has cycle status</code> and <code>Last reviewed</code>). | ||
'''Note on this page's own SMW data:''' This is a Module: namespace page. The same SMW namespace-exclusion issue found on [[Template:Admin Page Status/doc]] and [[Template:GameModule/doc]] (Template: namespace pages silently not storing `#set` data) likely also applies to Module: namespace pages by default. Until `$smwgNamespacesWithSemanticLinks` is confirmed to include `NS_MODULE`, the Admin Page Status data below may not appear in Special:Browse even though it is correctly stored via Cargo — this is expected, not a new bug. | |||
== Available Functions == | == Available Functions == | ||
=== cycleStatus === | === cycleStatus === | ||
Returns the current review status of a page. | Returns the current review status of a page. | ||
==== Usage ==== | ==== Usage ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
{{#invoke:CalibrationCycle|cycleStatus|review_date|threshold_in_days}} | {{#invoke:CalibrationCycle|cycleStatus|review_date|threshold_in_days}} | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Parameters ==== | ==== Parameters ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Parameter | ! Parameter | ||
| Line 39: | Line 30: | ||
| Number of days before a review is considered overdue. Defaults to <code>90</code> if not provided. | | Number of days before a review is considered overdue. Defaults to <code>90</code> if not provided. | ||
|} | |} | ||
==== Return Values ==== | ==== Return Values ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Value | ! Value | ||
| Line 58: | Line 47: | ||
| No valid date was provided. | | No valid date was provided. | ||
|} | |} | ||
==== Examples ==== | ==== Examples ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
{{#invoke:CalibrationCycle|cycleStatus|2026-07-08|90}} | {{#invoke:CalibrationCycle|cycleStatus|2026-07-08|90}} | ||
</nowiki></pre> | </nowiki></pre> | ||
<pre><nowiki> | <pre><nowiki> | ||
{{#invoke:CalibrationCycle|cycleStatus|2025-01-01}} | {{#invoke:CalibrationCycle|cycleStatus|2025-01-01}} | ||
</nowiki></pre> | </nowiki></pre> | ||
=== daysSince === | === daysSince === | ||
Returns the number of whole days since the given date. | Returns the number of whole days since the given date. | ||
==== Usage ==== | ==== Usage ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
{{#invoke:CalibrationCycle|daysSince|review_date}} | {{#invoke:CalibrationCycle|daysSince|review_date}} | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Parameters ==== | ==== Parameters ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
! Parameter | ! Parameter | ||
| Line 92: | Line 72: | ||
| Date in <code>YYYY-MM-DD</code> format. | | Date in <code>YYYY-MM-DD</code> format. | ||
|} | |} | ||
==== Return Values ==== | ==== Return Values ==== | ||
* Returns the number of days as a string. | * Returns the number of days as a string. | ||
* Returns an empty string if the date is invalid or missing. | * Returns an empty string if the date is invalid or missing. | ||
==== Example ==== | ==== Example ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
{{#invoke:CalibrationCycle|daysSince|2026-07-08}} | {{#invoke:CalibrationCycle|daysSince|2026-07-08}} | ||
</nowiki></pre> | </nowiki></pre> | ||
== Usage in Templates == | == Usage in Templates == | ||
This module is typically called from within another template (such as <code>Template:Admin Page Status</code>) rather than directly on pages. | This module is typically called from within another template (such as <code>Template:Admin Page Status</code>) rather than directly on pages. | ||
Example from inside a template: | Example from inside a template: | ||
<pre><nowiki> | <pre><nowiki> | ||
| Has cycle status = {{#invoke:CalibrationCycle|cycleStatus|{{{review_date|}}}|{{{review_threshold|90}}}}} | | Has cycle status = {{#invoke:CalibrationCycle|cycleStatus|{{{review_date|}}}|{{{review_threshold|90}}}}} | ||
</nowiki></pre> | </nowiki></pre> | ||
== Calibration Dependencies == | |||
* [[Template:Admin Page Status/doc]] | |||
'''Note:''' This module was exercised extensively during today's SMW namespace bug investigation, and its own hardening pass (validation and error-handling fixes) was itself a Calibration Report finding — see [[Talk:Module:CalibrationCycle]]. | |||
<div style="display:none;"> | <div style="display:none;"> | ||
| Line 122: | Line 100: | ||
}} | }} | ||
</div> | </div> | ||
{{Admin Page Status | |||
| categorization = Done | |||
| calibration_review = Self-Assessment | |||
| instrument_grade = Confirmed | |||
| validation = Moderate | |||
| calibration_rationale = Documentation matches the module's actual current behavior (both functions, all parameters, correct defaults). Flagged this page's own likely SMW namespace exclusion (Module: namespace, same class of issue found on Template: pages today) proactively rather than waiting to discover it separately. | |||
| review_confidence = High | |||
| review_date = 2026-07-13 | |||
| reviewed_by = Sovereign | |||
| priority = Core | |||
| review_threshold = 60 | |||
| has_backlinks = Yes | |||
| outbound_links_valid = Not checked | |||
| in_outline = No | |||
| in_category_outline = No | |||
| templates_complete = Needs review | |||
| formatting_standard = Meets standard | |||
| symmetry_check = Not applicable | |||
| self_report_flagged = No | |||
| terminology_consistent = Yes | |||
| standing_check = Self-assessed only | |||
| drift_report_status = None open | |||
| depends_on = Template:Admin Page Status/doc | |||
}} | |||
Revision as of 13:58, 14 July 2026
Description
This module calculates the status of review cycles based on a given date. It is primarily used to determine whether a page's last review is still current, approaching its deadline, or overdue.
It is designed to work together with Semantic MediaWiki properties (especially Has cycle status and Last reviewed).
Note on this page's own SMW data: This is a Module: namespace page. The same SMW namespace-exclusion issue found on Template:Admin Page Status/doc and Template:GameModule/doc (Template: namespace pages silently not storing `#set` data) likely also applies to Module: namespace pages by default. Until `$smwgNamespacesWithSemanticLinks` is confirmed to include `NS_MODULE`, the Admin Page Status data below may not appear in Special:Browse even though it is correctly stored via Cargo — this is expected, not a new bug.
Available Functions
cycleStatus
Returns the current review status of a page.
Usage
{{#invoke:CalibrationCycle|cycleStatus|review_date|threshold_in_days}}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
review_date
|
string | Yes | The date of the last review in YYYY-MM-DD format.
|
threshold_in_days
|
number | No | Number of days before a review is considered overdue. Defaults to 90 if not provided.
|
Return Values
| Value | Meaning |
|---|---|
Current
|
Review is still within the acceptable window. |
Due Soon
|
Review is approaching the deadline (within the last 25% of the cycle). |
Overdue
|
Review date has passed the threshold. |
Unknown
|
No valid date was provided. |
Examples
{{#invoke:CalibrationCycle|cycleStatus|2026-07-08|90}}
{{#invoke:CalibrationCycle|cycleStatus|2025-01-01}}
daysSince
Returns the number of whole days since the given date.
Usage
{{#invoke:CalibrationCycle|daysSince|review_date}}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
review_date
|
string | Yes | Date in YYYY-MM-DD format.
|
Return Values
- Returns the number of days as a string.
- Returns an empty string if the date is invalid or missing.
Example
{{#invoke:CalibrationCycle|daysSince|2026-07-08}}
Usage in Templates
This module is typically called from within another template (such as Template:Admin Page Status) rather than directly on pages.
Example from inside a template:
| Has cycle status = {{#invoke:CalibrationCycle|cycleStatus|{{{review_date|}}}|{{{review_threshold|90}}}}}
Calibration Dependencies
Note: This module was exercised extensively during today's SMW namespace bug investigation, and its own hardening pass (validation and error-handling fixes) was itself a Calibration Report finding — see [[Talk:Module:CalibrationCycle]].