algoux-standard-ranklist-utils
Python utilities for Standard Ranklist (srk).
Supported srk versions: >=0.3.0 <0.4.0.
Install
pip install algoux-standard-ranklist-utils
Usage Sample
from standard_ranklist_utils import diagnose_ranklist, format_time_duration, patch_ranklist, resolve_text, sort_rows
format_time_duration([1.5, "h"], "min") # 90
resolve_text({"fallback": "English", "zh-CN": "中文"}, ["zh-CN"]) # 中文
sort_rows(ranklist["rows"], ranklist.get("sorter", {}).get("config"))
diagnostics = diagnose_ranklist(ranklist)
patched = patch_ranklist(ranklist, {"type": "srk-patch", "version": 1, "operations": []})
Utilities
formatters
format_time_duration: Convert an srkTimeDurationbetweenms,s,min,h, andd.pre_zero_fill: Left-pad a number with zeroes for fixed-width display.sec_to_time_str: Format elapsed seconds as a ranklist time string such as1:02:03or1D 1:02:03.number_to_alphabet: Convert a zero-based problem index to an alphabetic alias such asA,Z, orAA.alphabet_to_number: Convert an alphabetic problem alias back to a zero-based index.
resolvers
resolve_text: Resolve plain or i18n srk text using explicit language preferences and fallback text.resolve_contributor: Parse a contributor string intoname, optionalemail, and optionalurl.resolve_color: Normalize an srk color value to a CSS color string.resolve_theme_color: Expand a single color or theme color object into explicit light and dark colors.resolve_style: Resolve text/background style colors and auto-pick readable text color when needed.resolve_user_markers: Resolve a user's marker IDs to marker definitions from the ranklist config.
ranklist
sort_rows: Sort rows by ICPC solved count descending and penalty time ascending, with optional ranking-time precision.regenerate_ranklist_by_solutions: Rebuild rows, scores, sorting, and problem statistics from solution tetrads.regenerate_rows_by_incremental_solutions: Apply incremental solution tetrads to existing rows and re-sort them.convert_to_static_ranklist: Add precomputed per-series rank values and segment indexes to each row.
CCPC26 display layout
get_ccpc26_problem_layout(ranklist): Compute the revealed/hidden original problem indexes from a complete current SRK 0.3.14 CCPC26 snapshot. ReturnsNonewithout the standard ICPC CCPC26 configuration.get_ccpc26_row_problem_order(statuses, layout): Return the revealed prefix followed by hidden accepted, attempted, and untouched problems, using accepted/latest-submission times and stable original-index ties.CCPC26ProblemLayout: ExportedTypedDictwithrevealedProblemIndexesandhiddenProblemIndexeslists.
from standard_ranklist_utils import get_ccpc26_problem_layout, get_ccpc26_row_problem_order
layout = get_ccpc26_problem_layout(ranklist)
if layout is not None:
for row in ranklist["rows"]:
indexes = get_ccpc26_row_problem_order(row["statuses"], layout)
# Use these original indexes to render each row without rearranging its data.
The helpers are pure: they neither mutate the input nor retain reveal history. The application controls whether CCPC26 is active and when freeze timing restores ordinary display; compute the layout before filtering rows for display. Count and ratio thresholds use OR, have no implicit 50/0.2 defaults, and honor official-only, denominator and rounding options. An empty threshold object reveals nothing; a configured zero threshold is applied literally. See the cross-language display contract for time precedence and missing-time behavior.
diagnostics and patch
diagnose_ranklist: Inspect SRK completeness/correctness and return structured issues plus repair suggestions.patch_ranklist: Apply a puresrk-patchobject to a deep-copied ranklist.create_ranklist_patch_from_diagnostics: Convert diagnostic suggestions into an applicablesrk-patch.
Metadata
Release files for algoux-standard-ranklist-utils 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| algoux_standard_ranklist_utils-0.3.4.tar.gz | 38.1 kB | With provenance | Details for algoux_standard_ranklist_utils-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| algoux_standard_ranklist_utils-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for algoux_standard_ranklist_utils-0.3.4-py3-none-any.whl |
Total release size: 69.8 kB
Release files / algoux_standard_ranklist_utils-0.3.4.tar.gz
| Download URL | algoux_standard_ranklist_utils-0.3.4.tar.gz |
|---|---|
| Size | 38.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eabcbf2fb346ad0949999939905eeb863312ffe8ccbb3e9faf496f72526d028e
|
|
BLAKE2b-256 checksum How to use checksums |
d0262bdc61e2278d1f43e27180bda222328b9319255d7fe5d347abdb35e9f81f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / algoux_standard_ranklist_utils-0.3.4-py3-none-any.whl
| Download URL | algoux_standard_ranklist_utils-0.3.4-py3-none-any.whl |
|---|---|
| Size | 31.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9221769b6ae6bc30c92e5a2898357d55ebc53ebc87fc8a33979a70f345f5717a
|
|
BLAKE2b-256 checksum How to use checksums |
214faa08e3da20f941756160e87113733bae82dd2316f35dfaad6b6f77134127
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for algoux-standard-ranklist-utils 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for algoux_standard_ranklist_utils-0.3.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.