From 8e802ae964e51b8c710b1a11e35a1568370892fa Mon Sep 17 00:00:00 2001 From: Pavel Kunyavskiy Date: Sun, 23 Nov 2025 12:05:29 +0100 Subject: [PATCH 1/3] Introduce custom fields in organizations. Also support some clics fields as explicit ones. --- schemas/advanced.schema.json | 108 +- .../converter/export/clics/ClicsExporter.kt | 10 +- src/cds/core/api/core.api | 54 +- .../org/icpclive/cds/api/OrganizationInfo.kt | 6 + .../tunning/OverrideOrganisationTemplate.kt | 20 +- .../cds/tunning/OverrideOrganizations.kt | 27 +- .../icpclive/cds/plugins/clics/ClicsModel.kt | 13 +- .../loaders/goldenData/clics202003.txt | 590 ++++- .../loaders/goldenData/clics202207.txt | 2167 ++++++++++++++++- .../icpclive/clics/objects/Organization.kt | 2 +- src/frontend/generated/api.ts | 5 + 11 files changed, 2775 insertions(+), 227 deletions(-) diff --git a/schemas/advanced.schema.json b/schemas/advanced.schema.json index e66697f8b..8e2fc2c66 100644 --- a/schemas/advanced.schema.json +++ b/schemas/advanced.schema.json @@ -801,6 +801,21 @@ } ] }, + "kotlin.collections.LinkedHashMap?": { + "oneOf": [ + { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + { + "type": "null" + } + ] + }, "overrideOrganisationTemplate": { "type": "object", "properties": { @@ -820,8 +835,29 @@ "logo": { "$ref": "#/$defs/ListOrSingleElement?" }, - "extraLogo": { + "extraLogos": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "country": { + "type": "string" + }, + "countryFlag": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "extraCountryFlags": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "countrySubdivision": { + "type": "string" + }, + "countrySubdivisionFlag": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "extraCountrySubdivisionFlags": { "$ref": "#/$defs/ListOrSingleElement?" + }, + "customFields": { + "$ref": "#/$defs/kotlin.collections.LinkedHashMap?" } }, "additionalProperties": false, @@ -830,20 +866,7 @@ ], "title": "overrideOrganisationTemplate" }, - "kotlin.collections.ArrayList?": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/$defs/org.icpclive.cds.api.MediaType>" - } - }, - { - "type": "null" - } - ] - }, - "org.icpclive.cds.tunning.OverrideOrganizations.Override": { + "org.icpclive.cds.tunning.OverrideOrganizations.Override": { "type": "object", "properties": { "displayName": { @@ -855,8 +878,29 @@ "logo": { "$ref": "#/$defs/ListOrSingleElement?" }, - "extraLogo": { - "$ref": "#/$defs/kotlin.collections.ArrayList?" + "extraLogos": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "country": { + "type": "string" + }, + "countryFlag": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "extraCountryFlags": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "countrySubdivision": { + "type": "string" + }, + "countrySubdivisionFlag": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "extraCountrySubdivisionFlags": { + "$ref": "#/$defs/ListOrSingleElement?" + }, + "customFields": { + "$ref": "#/$defs/kotlin.collections.LinkedHashMap?" } }, "additionalProperties": false, @@ -866,7 +910,7 @@ "type": "object", "patternProperties": { ".*": { - "$ref": "#/$defs/org.icpclive.cds.tunning.OverrideOrganizations.Override" + "$ref": "#/$defs/org.icpclive.cds.tunning.OverrideOrganizations.Override" } } }, @@ -1181,21 +1225,6 @@ } ] }, - "kotlin.collections.LinkedHashMap?": { - "oneOf": [ - { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - { - "type": "null" - } - ] - }, "kotlin.collections.LinkedHashMap?": { "oneOf": [ { @@ -1238,6 +1267,19 @@ } ] }, + "kotlin.collections.ArrayList?": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/$defs/org.icpclive.cds.api.MediaType>" + } + }, + { + "type": "null" + } + ] + }, "overrideTeamTemplate": { "type": "object", "properties": { diff --git a/src/cds-converter/src/main/kotlin/org/icpclive/converter/export/clics/ClicsExporter.kt b/src/cds-converter/src/main/kotlin/org/icpclive/converter/export/clics/ClicsExporter.kt index 51413d30b..a323b90b2 100644 --- a/src/cds-converter/src/main/kotlin/org/icpclive/converter/export/clics/ClicsExporter.kt +++ b/src/cds-converter/src/main/kotlin/org/icpclive/converter/export/clics/ClicsExporter.kt @@ -61,7 +61,14 @@ private fun OrganizationInfo.toClicsOrg() = Organization( id = id.sanitizedValue, name = displayName, formalName = fullName, - logo = logo.mapNotNull { it.toClicsMedia() } + logo = logo.mapNotNull { it.toClicsMedia() }, + country = country, + countryFlag = countryFlag.mapNotNull { it.toClicsMedia() }, + countrySubdivision = countrySubdivision, + countrySubdivisionFlag = countrySubdivisionFlag.mapNotNull { it.toClicsMedia() }, + icpcId = customFields["icpc_id"], + twitterAccount = customFields["clicsTwitterAccount"], + twitterHashtag = customFields["clicsTwitterHashtag"], ) private fun LanguageInfo.toClicsLang() = Language( @@ -94,6 +101,7 @@ private fun MediaType.toClicsMedia(): File? { private fun TeamInfo.toClicsTeam() = Team( id = id.sanitizedValue, label = customFields["label"] ?: id.sanitizedValue, + icpcId = customFields["icpc_id"], name = fullName, displayName = displayName, hidden = isHidden, diff --git a/src/cds/core/api/core.api b/src/cds/core/api/core.api index 7cd7d8731..90c645933 100644 --- a/src/cds/core/api/core.api +++ b/src/cds/core/api/core.api @@ -1436,14 +1436,25 @@ public final class org/icpclive/cds/api/OrganizationId$Companion { public final class org/icpclive/cds/api/OrganizationInfo { public static final field Companion Lorg/icpclive/cds/api/OrganizationInfo$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-3boEdwU ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/util/List; - public final fun copy-cFNa2AE (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lorg/icpclive/cds/api/OrganizationInfo; - public static synthetic fun copy-cFNa2AE$default (Lorg/icpclive/cds/api/OrganizationInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lorg/icpclive/cds/api/OrganizationInfo; + public final fun component5 ()Ljava/lang/String; + public final fun component6 ()Ljava/util/List; + public final fun component7 ()Ljava/lang/String; + public final fun component8 ()Ljava/util/List; + public final fun component9 ()Ljava/util/Map; + public final fun copy-n-emvVY (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;)Lorg/icpclive/cds/api/OrganizationInfo; + public static synthetic fun copy-n-emvVY$default (Lorg/icpclive/cds/api/OrganizationInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lorg/icpclive/cds/api/OrganizationInfo; public fun equals (Ljava/lang/Object;)Z + public final fun getCountry ()Ljava/lang/String; + public final fun getCountryFlag ()Ljava/util/List; + public final fun getCountrySubdivision ()Ljava/lang/String; + public final fun getCountrySubdivisionFlag ()Ljava/util/List; + public final fun getCustomFields ()Ljava/util/Map; public final fun getDisplayName ()Ljava/lang/String; public final fun getFullName ()Ljava/lang/String; public final fun getId-3boEdwU ()Ljava/lang/String; @@ -2561,19 +2572,33 @@ public final class org/icpclive/cds/tunning/OverrideGroups$Override$Companion { public final class org/icpclive/cds/tunning/OverrideOrganisationTemplate : org/icpclive/cds/tunning/Desugarable, org/icpclive/cds/tunning/TuningRule { public static final field Companion Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate$Companion; public fun ()V - public fun (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)V - public synthetic fun (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V + public synthetic fun (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/util/Map; + public final fun component10 ()Ljava/util/List; + public final fun component11 ()Ljava/util/List; + public final fun component12 ()Ljava/util/Map; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ljava/util/List; public final fun component5 ()Ljava/util/List; - public final fun copy (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate; - public static synthetic fun copy$default (Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate; + public final fun component6 ()Ljava/lang/String; + public final fun component7 ()Ljava/util/List; + public final fun component8 ()Ljava/util/List; + public final fun component9 ()Ljava/lang/String; + public final fun copy (Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;)Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate; + public static synthetic fun copy$default (Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lorg/icpclive/cds/tunning/OverrideOrganisationTemplate; public fun desugar (Lorg/icpclive/cds/api/ContestInfo;)Lorg/icpclive/cds/tunning/TuningRule; public fun equals (Ljava/lang/Object;)Z + public final fun getCountry ()Ljava/lang/String; + public final fun getCountryFlag ()Ljava/util/List; + public final fun getCountrySubdivision ()Ljava/lang/String; + public final fun getCountrySubdivisionFlag ()Ljava/util/List; + public final fun getCustomFields ()Ljava/util/Map; public final fun getDisplayName ()Ljava/lang/String; - public final fun getExtraLogo ()Ljava/util/List; + public final fun getExtraCountryFlags ()Ljava/util/List; + public final fun getExtraCountrySubdivisionFlags ()Ljava/util/List; + public final fun getExtraLogos ()Ljava/util/List; public final fun getFullName ()Ljava/lang/String; public final fun getLogo ()Ljava/util/List; public final fun getRegexes ()Ljava/util/Map; @@ -2621,10 +2646,17 @@ public final synthetic class org/icpclive/cds/tunning/OverrideOrganizations$$ser public final class org/icpclive/cds/tunning/OverrideOrganizations$Override { public static final field Companion Lorg/icpclive/cds/tunning/OverrideOrganizations$Override$Companion; public fun ()V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getCountry ()Ljava/lang/String; + public final fun getCountryFlag ()Ljava/util/List; + public final fun getCountrySubdivision ()Ljava/lang/String; + public final fun getCountrySubdivisionFlag ()Ljava/util/List; + public final fun getCustomFields ()Ljava/util/Map; public final fun getDisplayName ()Ljava/lang/String; - public final fun getExtraLogo ()Ljava/util/List; + public final fun getExtraCountryFlags ()Ljava/util/List; + public final fun getExtraCountrySubdivisionFlags ()Ljava/util/List; + public final fun getExtraLogos ()Ljava/util/List; public final fun getFullName ()Ljava/lang/String; public final fun getLogo ()Ljava/util/List; } diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/api/OrganizationInfo.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/api/OrganizationInfo.kt index bbcf47ed6..1417d014d 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/api/OrganizationInfo.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/api/OrganizationInfo.kt @@ -1,5 +1,6 @@ package org.icpclive.cds.api +import kotlinx.serialization.Required import kotlinx.serialization.Serializable @JvmInline @@ -19,4 +20,9 @@ public data class OrganizationInfo( val displayName: String, val fullName: String, val logo: List, + val country: String? = null, + val countryFlag: List = emptyList(), + val countrySubdivision: String? = null, + val countrySubdivisionFlag: List = emptyList(), + @Required val customFields: Map = emptyMap() ) \ No newline at end of file diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganisationTemplate.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganisationTemplate.kt index cd920a647..1b6340d80 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganisationTemplate.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganisationTemplate.kt @@ -28,8 +28,15 @@ public data class OverrideOrganisationTemplate( public val fullName: String? = null, public val displayName: String? = null, @Serializable(with = ListOrSingleElementSerializer::class) public val logo: List? = null, - @Serializable(with = ListOrSingleElementSerializer::class) public val extraLogo: List? = null, -): Desugarable, TuningRule { + @Serializable(with = ListOrSingleElementSerializer::class) public val extraLogos: List? = null, + public val country: String? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val countryFlag: List? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val extraCountryFlags: List? = null, + public val countrySubdivision: String? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val countrySubdivisionFlag: List? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val extraCountrySubdivisionFlags: List? = null, + public val customFields: Map? = null, + ): Desugarable, TuningRule { override fun process(info: ContestInfo): ContestInfo { return desugar(info).process(info) } @@ -43,7 +50,14 @@ public data class OverrideOrganisationTemplate( fullName = substituteRaw(fullName), displayName = substituteRaw(displayName), logo = logo?.map { substitute(it) }, - extraLogo = extraLogo?.map { substitute(it) } + extraLogos = extraLogos?.map { substitute(it) }, + country = substituteRaw(country), + countryFlag = countryFlag?.map { substitute(it) }, + extraCountryFlags = extraCountryFlags?.map { substitute(it) }, + countrySubdivision = substituteRaw(countrySubdivision), + countrySubdivisionFlag = countrySubdivisionFlag?.map { substitute(it) }, + extraCountrySubdivisionFlags = extraCountrySubdivisionFlags?.map { substitute(it) }, + customFields = customFields?.mapValues { substituteRaw(it.value) }, ) } } diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganizations.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganizations.kt index f3e0b33e8..a6445bb17 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganizations.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/OverrideOrganizations.kt @@ -30,7 +30,12 @@ public data class OverrideOrganizations( org.copy( displayName = override.displayName ?: org.displayName, fullName = override.fullName ?: org.fullName, - logo = (override.logo ?: org.logo) + override.extraLogo.orEmpty(), + logo = (override.logo ?: org.logo) + override.extraLogos.orEmpty(), + country = override.country ?: org.country, + countryFlag = (override.countryFlag ?: org.countryFlag) + override.extraCountryFlags.orEmpty(), + countrySubdivision = override.countrySubdivision ?: org.countrySubdivision, + countrySubdivisionFlag = (override.countrySubdivisionFlag ?: org.countrySubdivisionFlag) + override.extraCountrySubdivisionFlags.orEmpty(), + customFields = mergeMaps(org.customFields, override.customFields), ) } ) @@ -43,15 +48,29 @@ public data class OverrideOrganizations( * * @param displayName Name of the organization shown in most places. * @param fullName Full name of the organization. Will be mostly shown on admin pages. - * @param logo Organization logo. Not displayed anywhere for now, but can be exported to e.g., icpc resolved. Replace data from cds - * @param extraLogos Organization logo. Not displayed anywhere for now, but can be exported to e.g., icpc resolved. Adds to data from cds + * @param logo Organization logo. Replace data from cds + * @param extraLogos Organization logo. Adds to data from cds + * @param country ISO 3166-1 alpha-3 code of the organization's country. + * @param countryFlag Country flags of the organization. Replace data from cds + * @param extraCountryFlags Country flags of the organization. Adds to data from cds + * @param countrySubdivision ISO 3166-2 code of country subdivision of the organization (like region or state). Adds to data from cds + * @param countrySubdivisionFlag Subdivision flags. Replace data from cds + * @param extraCountrySubdivisionFlags Subdivision flags. Adds to data from cds + * @param customFields Map of custom values. They can be used in substitutions in templates. */ @Serializable public class Override( public val displayName: String? = null, public val fullName: String? = null, @Serializable(with = ListOrSingleElementSerializer::class) public val logo: List? = null, - public val extraLogo: List? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val extraLogos: List? = null, + public val country: String? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val countryFlag: List? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val extraCountryFlags: List? = null, + public val countrySubdivision: String? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val countrySubdivisionFlag: List? = null, + @Serializable(with = ListOrSingleElementSerializer::class) public val extraCountrySubdivisionFlags: List? = null, + public val customFields: Map? = null, ) private companion object { diff --git a/src/cds/plugins/clics/src/main/kotlin/org/icpclive/cds/plugins/clics/ClicsModel.kt b/src/cds/plugins/clics/src/main/kotlin/org/icpclive/cds/plugins/clics/ClicsModel.kt index 4ff6e5302..b3476be3f 100644 --- a/src/cds/plugins/clics/src/main/kotlin/org/icpclive/cds/plugins/clics/ClicsModel.kt +++ b/src/cds/plugins/clics/src/main/kotlin/org/icpclive/cds/plugins/clics/ClicsModel.kt @@ -118,7 +118,7 @@ internal class ClicsModel { customFields = buildMap { put("clicsTeamFullName", name) put("clicsTeamDisplayName", displayName ?: name) - label?.let { put("clicsTeamLabel", it) } + label?.let { put("label", it) } icpcId?.let { put("icpc_id", it) } } ) @@ -167,7 +167,16 @@ internal class ClicsModel { id = id.toOrganizationId(), displayName = name ?: formalName ?: id, fullName = formalName ?: name ?: id, - logo = logo.mapNotNull { it.toApi() } + logo = logo.mapNotNull { it.toApi() }, + country = country, + countryFlag = countryFlag.mapNotNull { it.toApi() }, + countrySubdivision = countrySubdivision, + countrySubdivisionFlag = countrySubdivisionFlag.mapNotNull { it.toApi() }, + customFields = buildMap { + twitterHashtag?.let { put("clicsTwitterHashtag", it) } + twitterAccount?.let { put("clicsTwitterAccount", it) } + icpcId?.let { put("icpc_id", it) } + } ) private fun Language.toApi() = LanguageInfo( diff --git a/src/cds/tests/testData/loaders/goldenData/clics202003.txt b/src/cds/tests/testData/loaders/goldenData/clics202003.txt index 41faff1b0..5559bf075 100644 --- a/src/cds/tests/testData/loaders/goldenData/clics202003.txt +++ b/src/cds/tests/testData/loaders/goldenData/clics202003.txt @@ -3739,7 +3739,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "4" + } }, { "id": "0065", @@ -3753,7 +3756,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "5" + } }, { "id": "0068", @@ -3767,7 +3773,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "6" + } }, { "id": "0081", @@ -3781,7 +3790,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "7" + } }, { "id": "0114", @@ -3795,7 +3807,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "9" + } }, { "id": "0140", @@ -3809,7 +3824,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "11" + } }, { "id": "0144", @@ -3823,7 +3841,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "10" + } }, { "id": "0160", @@ -3837,7 +3858,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "12" + } }, { "id": "0196", @@ -3851,7 +3875,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "101" + } }, { "id": "0232", @@ -3865,7 +3892,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "15" + } }, { "id": "0358", @@ -3879,7 +3909,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "16" + } }, { "id": "0413", @@ -3893,7 +3926,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "18" + } }, { "id": "0443", @@ -3907,7 +3943,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "20" + } }, { "id": "0451", @@ -3921,7 +3960,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "21" + } }, { "id": "0492", @@ -3935,7 +3977,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "86" + } }, { "id": "0502", @@ -3949,7 +3994,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "3" + } }, { "id": "0642", @@ -3963,7 +4011,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "25" + } }, { "id": "0695", @@ -3977,7 +4028,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "92" + } }, { "id": "0718", @@ -3991,7 +4045,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "29" + } }, { "id": "0722", @@ -4005,7 +4062,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "34" + } }, { "id": "0724", @@ -4019,7 +4079,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "27" + } }, { "id": "0725", @@ -4033,7 +4096,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "28" + } }, { "id": "0727", @@ -4047,7 +4113,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "31" + } }, { "id": "0728", @@ -4061,7 +4130,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "32" + } }, { "id": "0846", @@ -4075,7 +4147,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "42" + } }, { "id": "0923", @@ -4089,7 +4164,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "44" + } }, { "id": "0931", @@ -4103,7 +4181,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "45" + } }, { "id": "0993", @@ -4117,7 +4198,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "46" + } }, { "id": "1008", @@ -4131,7 +4215,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "47" + } }, { "id": "1026", @@ -4145,7 +4232,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "48" + } }, { "id": "1145", @@ -4159,7 +4249,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "50" + } }, { "id": "1214", @@ -4173,7 +4266,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "51" + } }, { "id": "1215", @@ -4187,7 +4283,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "54" + } }, { "id": "1220", @@ -4201,7 +4300,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "52" + } }, { "id": "1237", @@ -4215,7 +4317,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "53" + } }, { "id": "12694", @@ -4229,7 +4334,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "114" + } }, { "id": "1303", @@ -4243,7 +4351,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "56" + } }, { "id": "1338", @@ -4257,7 +4368,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "58" + } }, { "id": "1452", @@ -4271,7 +4385,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "60" + } }, { "id": "1623", @@ -4285,7 +4402,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "63" + } }, { "id": "1636", @@ -4299,7 +4419,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "64" + } }, { "id": "1677", @@ -4313,7 +4436,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "65" + } }, { "id": "1730", @@ -4327,7 +4453,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "66" + } }, { "id": "1802", @@ -4341,7 +4470,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "69" + } }, { "id": "1822", @@ -4355,7 +4487,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "70" + } }, { "id": "1917", @@ -4369,7 +4504,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "72" + } }, { "id": "1962", @@ -4383,7 +4521,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "99" + } }, { "id": "1966", @@ -4397,7 +4538,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "73" + } }, { "id": "1977", @@ -4411,7 +4555,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "74" + } }, { "id": "2107", @@ -4425,7 +4572,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "79" + } }, { "id": "2112", @@ -4439,7 +4589,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "82" + } }, { "id": "2172", @@ -4453,7 +4606,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "89" + } }, { "id": "2195", @@ -4467,7 +4623,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "90" + } }, { "id": "2204", @@ -4481,7 +4640,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "91" + } }, { "id": "2216", @@ -4495,7 +4657,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "93" + } }, { "id": "2230", @@ -4509,7 +4674,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "94" + } }, { "id": "2232", @@ -4523,7 +4691,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "95" + } }, { "id": "2324", @@ -4537,7 +4708,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "100" + } }, { "id": "2343", @@ -4551,7 +4725,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "102" + } }, { "id": "2349", @@ -4565,7 +4742,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "103" + } }, { "id": "2366", @@ -4579,7 +4759,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "104" + } }, { "id": "2387", @@ -4593,7 +4776,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "105" + } }, { "id": "2390", @@ -4607,7 +4793,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "98" + } }, { "id": "2400", @@ -4621,7 +4810,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "106" + } }, { "id": "2493", @@ -4635,7 +4827,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "107" + } }, { "id": "2519", @@ -4649,7 +4844,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "108" + } }, { "id": "2528", @@ -4663,7 +4861,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "109" + } }, { "id": "2538", @@ -4677,7 +4878,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "75" + } }, { "id": "2562", @@ -4691,7 +4895,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "110" + } }, { "id": "2574", @@ -4705,7 +4912,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "112" + } }, { "id": "2589", @@ -4719,7 +4929,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "113" + } }, { "id": "2648", @@ -4733,7 +4946,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "115" + } }, { "id": "2659", @@ -4747,7 +4963,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "116" + } }, { "id": "2673", @@ -4761,7 +4980,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "111" + } }, { "id": "2742", @@ -4775,7 +4997,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "117" + } }, { "id": "2745", @@ -4789,7 +5014,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "118" + } }, { "id": "3071", @@ -4803,7 +5031,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "41" + } }, { "id": "3098", @@ -4817,7 +5048,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "84" + } }, { "id": "3272", @@ -4831,7 +5065,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "85" + } }, { "id": "3295", @@ -4845,7 +5082,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "68" + } }, { "id": "3328", @@ -4859,7 +5099,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "62" + } }, { "id": "3348", @@ -4873,7 +5116,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "14" + } }, { "id": "3360", @@ -4887,7 +5133,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "22" + } }, { "id": "3372", @@ -4901,7 +5150,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "88" + } }, { "id": "3436", @@ -4915,7 +5167,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "19" + } }, { "id": "3487", @@ -4929,7 +5184,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "87" + } }, { "id": "3519", @@ -4943,7 +5201,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "24" + } }, { "id": "3534", @@ -4957,7 +5218,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "55" + } }, { "id": "3664", @@ -4971,7 +5235,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "1" + } }, { "id": "3683", @@ -4985,7 +5252,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "78" + } }, { "id": "3775", @@ -4999,7 +5269,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "76" + } }, { "id": "3919", @@ -5013,7 +5286,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "36" + } }, { "id": "3944", @@ -5027,7 +5303,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "17" + } }, { "id": "4166", @@ -5041,7 +5320,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "96" + } }, { "id": "4193", @@ -5055,7 +5337,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "83" + } }, { "id": "4330", @@ -5069,7 +5354,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "43" + } }, { "id": "4376", @@ -5083,7 +5371,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "61" + } }, { "id": "4846", @@ -5097,7 +5388,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "77" + } }, { "id": "5628", @@ -5111,7 +5405,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "13" + } }, { "id": "5640", @@ -5125,7 +5422,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "30" + } }, { "id": "5716", @@ -5139,7 +5439,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "80" + } }, { "id": "5724", @@ -5153,7 +5456,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "23" + } }, { "id": "6581", @@ -5167,7 +5473,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "26" + } }, { "id": "6908", @@ -5181,7 +5490,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "33" + } }, { "id": "6960", @@ -5195,7 +5507,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "39" + } }, { "id": "7113", @@ -5209,7 +5524,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "2" + } }, { "id": "7325", @@ -5223,7 +5541,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "40" + } }, { "id": "7423", @@ -5237,7 +5558,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "49" + } }, { "id": "7857", @@ -5251,7 +5575,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "38" + } }, { "id": "7898", @@ -5265,7 +5592,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "59" + } }, { "id": "7990", @@ -5279,7 +5609,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "97" + } }, { "id": "8140", @@ -5293,7 +5626,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "81" + } }, { "id": "8162", @@ -5307,7 +5643,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "71" + } }, { "id": "8628", @@ -5321,7 +5660,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "8" + } }, { "id": "9406", @@ -5335,7 +5677,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "35" + } }, { "id": "9574", @@ -5349,7 +5694,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "37" + } }, { "id": "9606", @@ -5363,7 +5711,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "67" + } }, { "id": "9780", @@ -5377,7 +5728,10 @@ "height": 64, "mime": "image/png" } - ] + ], + "customFields": { + "icpc_id": "57" + } } ], "languages": [ diff --git a/src/cds/tests/testData/loaders/goldenData/clics202207.txt b/src/cds/tests/testData/loaders/goldenData/clics202207.txt index 8b57d87a7..7a6c2c4cf 100644 --- a/src/cds/tests/testData/loaders/goldenData/clics202207.txt +++ b/src/cds/tests/testData/loaders/goldenData/clics202207.txt @@ -4107,7 +4107,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "PRT", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/366/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/366/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/366/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/366/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "366" + } }, { "id": "443", @@ -4130,7 +4168,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/443/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/443/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/443/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/443/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#Polytechnique", + "icpc_id": "443" + } }, { "id": "444", @@ -4153,7 +4230,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "CHE", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/444/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/444/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/444/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/444/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "444" + } }, { "id": "451", @@ -4176,7 +4291,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "CHE", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/451/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/451/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/451/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/451/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#ETH", + "icpc_id": "451" + } }, { "id": "460", @@ -4199,7 +4353,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/460/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/460/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/460/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/460/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "460" + } }, { "id": "478", @@ -4222,7 +4414,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "PRT", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/478/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/478/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/478/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/478/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#UPorto", + "icpc_id": "478" + } }, { "id": "742", @@ -4245,7 +4476,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/742/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/742/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/742/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/742/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "742" + } }, { "id": "789", @@ -4268,7 +4537,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "PRT", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/789/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/789/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/789/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/789/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "789" + } }, { "id": "2079", @@ -4291,7 +4598,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2079/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2079/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2079/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2079/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2079" + } }, { "id": "2122", @@ -4314,7 +4659,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2122/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2122/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2122/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2122/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2122" + } }, { "id": "2166", @@ -4337,7 +4720,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2166/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2166/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2166/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2166/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2166" + } }, { "id": "2170", @@ -4360,7 +4781,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2170/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2170/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2170/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2170/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2170" + } }, { "id": "2257", @@ -4383,7 +4842,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2257/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2257/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2257/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2257/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2257" + } }, { "id": "2260", @@ -4406,7 +4903,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2260/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2260/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2260/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2260/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2260" + } }, { "id": "2261", @@ -4429,7 +4964,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2261/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2261/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2261/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2261/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2261" + } }, { "id": "2263", @@ -4452,7 +5025,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2263/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2263/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2263/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2263/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "2263" + } }, { "id": "2273", @@ -4475,7 +5086,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2273/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2273/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2273/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/2273/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#UPC", + "icpc_id": "2273" + } }, { "id": "3236", @@ -4498,7 +5148,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ISR", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3236/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3236/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3236/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3236/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "3236" + } }, { "id": "3409", @@ -4521,7 +5209,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3409/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3409/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3409/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3409/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "3409" + } }, { "id": "3436", @@ -4544,7 +5270,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3436/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3436/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3436/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3436/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#ENS_Ulm", + "icpc_id": "3436" + } }, { "id": "3545", @@ -4567,7 +5332,45 @@ "filename": "logo.jpg", "mime": "image/jpeg" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3545/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3545/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3545/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/3545/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "3545" + } }, { "id": "5282", @@ -4590,7 +5393,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "PRT", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5282/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5282/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5282/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5282/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "5282" + } }, { "id": "5687", @@ -4613,7 +5454,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5687/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5687/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5687/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/5687/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "5687" + } }, { "id": "6369", @@ -4636,7 +5515,45 @@ "filename": "logo.jpg", "mime": "image/jpeg" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6369/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6369/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6369/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6369/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "6369" + } }, { "id": "6379", @@ -4659,7 +5576,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6379/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6379/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6379/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/6379/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "6379" + } }, { "id": "7032", @@ -4682,7 +5637,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7032/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7032/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7032/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7032/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "7032" + } }, { "id": "7083", @@ -4705,7 +5698,45 @@ "filename": "logo.jpg", "mime": "image/jpeg" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7083/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7083/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7083/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7083/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "7083" + } }, { "id": "7435", @@ -4728,7 +5759,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7435/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7435/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7435/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7435/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "7435" + } }, { "id": "7990", @@ -4751,7 +5820,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7990/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7990/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7990/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/7990/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#LaStatale", + "icpc_id": "7990" + } }, { "id": "8246", @@ -4774,7 +5882,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8246/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8246/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8246/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8246/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8246" + } }, { "id": "8450", @@ -4797,7 +5943,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "CHE", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8450/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8450/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8450/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8450/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8450" + } }, { "id": "8460", @@ -4820,7 +6004,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8460/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8460/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8460/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8460/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8460" + } }, { "id": "8483", @@ -4843,7 +6065,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ISR", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8483/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8483/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8483/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8483/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8483" + } }, { "id": "8488", @@ -4866,7 +6126,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8488/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8488/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8488/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8488/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8488" + } }, { "id": "8818", @@ -4889,7 +6187,46 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8818/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8818/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8818/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8818/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "clicsTwitterHashtag": "#ScuolaNormale", + "icpc_id": "8818" + } }, { "id": "8869", @@ -4912,7 +6249,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8869/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8869/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8869/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8869/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8869" + } }, { "id": "8886", @@ -4935,7 +6310,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8886/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8886/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8886/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/8886/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "8886" + } }, { "id": "9009", @@ -4958,7 +6371,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9009/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9009/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9009/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9009/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "9009" + } }, { "id": "9635", @@ -4981,7 +6432,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9635/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9635/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9635/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9635/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "9635" + } }, { "id": "9745", @@ -5004,7 +6493,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9745/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9745/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9745/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/9745/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "9745" + } }, { "id": "10640", @@ -5027,7 +6554,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10640/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10640/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10640/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10640/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "10640" + } }, { "id": "10678", @@ -5050,7 +6615,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10678/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10678/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10678/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10678/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "10678" + } }, { "id": "10685", @@ -5073,7 +6676,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10685/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10685/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10685/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10685/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "10685" + } }, { "id": "10689", @@ -5096,7 +6737,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10689/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10689/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10689/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10689/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "10689" + } }, { "id": "10706", @@ -5119,7 +6798,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10706/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10706/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10706/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/10706/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "10706" + } }, { "id": "11111", @@ -5142,7 +6859,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ISR", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11111/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11111/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11111/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11111/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "11111" + } }, { "id": "11205", @@ -5165,7 +6920,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11205/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11205/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11205/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11205/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "11205" + } }, { "id": "11538", @@ -5188,7 +6981,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11538/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11538/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11538/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/11538/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "11538" + } }, { "id": "15696", @@ -5211,7 +7042,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/15696/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/15696/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/15696/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/15696/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "15696" + } }, { "id": "16191", @@ -5234,7 +7103,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ITA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/16191/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/16191/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/16191/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/16191/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "16191" + } }, { "id": "19561", @@ -5257,7 +7164,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/19561/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/19561/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/19561/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/19561/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "19561" + } }, { "id": "20085", @@ -5280,7 +7225,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "ESP", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20085/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20085/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20085/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20085/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "20085" + } }, { "id": "20090", @@ -5303,7 +7286,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "FRA", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20090/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20090/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20090/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/20090/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "20090" + } }, { "id": "42424242", @@ -5326,7 +7347,45 @@ "filename": "logo.64.png", "mime": "image/png" } - ] + ], + "country": "GBR", + "countryFlag": [ + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/42424242/country_flag-4", + "width": 512, + "height": 512, + "filename": "country_flag-4.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/42424242/country_flag-2", + "width": 512, + "height": 512, + "filename": "country_flag-2.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/42424242/country_flag", + "width": 640, + "height": 480, + "filename": "country_flag.svg", + "mime": "image/svg+xml" + }, + { + "type": "Image", + "url": "../../tests/testData/loaders/clics-2022-07/contests/swerc2022/organizations/42424242/country_flag-3", + "width": 640, + "height": 480, + "filename": "country_flag-3.svg", + "mime": "image/svg+xml" + } + ], + "customFields": { + "icpc_id": "42424242" + } } ], "languages": [ diff --git a/src/clics-api/src/main/kotlin/org/icpclive/clics/objects/Organization.kt b/src/clics-api/src/main/kotlin/org/icpclive/clics/objects/Organization.kt index 2a35ad780..59ca85756 100644 --- a/src/clics-api/src/main/kotlin/org/icpclive/clics/objects/Organization.kt +++ b/src/clics-api/src/main/kotlin/org/icpclive/clics/objects/Organization.kt @@ -12,7 +12,7 @@ public data class Organization( public val country: String? = null, public val countryFlag: List = emptyList(), @SinceClics(FeedVersion.DRAFT) public val countrySubdivision: String? = null, - @SinceClics(FeedVersion.DRAFT) public val countrySubdivisionFlag: List? = null, + @SinceClics(FeedVersion.DRAFT) public val countrySubdivisionFlag: List = emptyList(), public val url: String? = null, public val twitterHashtag: String? = null, @SinceClics(FeedVersion.`2023_06`) public val twitterAccount: String? = null, diff --git a/src/frontend/generated/api.ts b/src/frontend/generated/api.ts index a5ab0f1a9..5f99d9777 100644 --- a/src/frontend/generated/api.ts +++ b/src/frontend/generated/api.ts @@ -162,6 +162,11 @@ export interface OrganizationInfo { displayName: string; fullName: string; logo: MediaType[]; + country?: string | null; + countryFlag?: MediaType[]; + countrySubdivision?: string | null; + countrySubdivisionFlag?: MediaType[]; + customFields: { [key: string]: string }; } export interface LanguageInfo { From 0568853ff551d3b9b304e721c3517f1d12f2607c Mon Sep 17 00:00:00 2001 From: Pavel Kunyavskiy Date: Sun, 23 Nov 2025 12:39:00 +0100 Subject: [PATCH 2/3] Support org custom fields --- .../main/kotlin/org/icpclive/admin/Routing.kt | 9 +++ src/cds/cli/api/cli.api | 1 + .../icpclive/cds/cli/CdsCommandLineOptions.kt | 69 +++++++++++------- src/cds/core/api/core.api | 3 +- .../org/icpclive/cds/adapters/Adapters.kt | 1 - .../cds/adapters/impl/CustomFieldsAdapter.kt | 71 ------------------- .../org/icpclive/cds/settings/entrypoint.kt | 1 + .../kotlin/org/icpclive/cds/tunning/Rules.kt | 43 +++++++++++ .../src/components/ConfigurationEditor.tsx | 18 +++-- 9 files changed, 113 insertions(+), 103 deletions(-) delete mode 100644 src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/impl/CustomFieldsAdapter.kt diff --git a/src/backend/src/main/kotlin/org/icpclive/admin/Routing.kt b/src/backend/src/main/kotlin/org/icpclive/admin/Routing.kt index 3f3ae193e..c81acd7c4 100644 --- a/src/backend/src/main/kotlin/org/icpclive/admin/Routing.kt +++ b/src/backend/src/main/kotlin/org/icpclive/admin/Routing.kt @@ -205,6 +205,15 @@ fun Route.configureAdminApiRouting() { examplesPackage = null ) } + route("/orgCustomFields") { + configureConfigFileRouting( + Config.cdsSettings.orgCustomFieldsCsvPath, + emptyResponse = "", + validate = { }, + schemaLocation = null, + examplesPackage = null + ) + } get("/contestInfo") { diff --git a/src/cds/cli/api/cli.api b/src/cds/cli/api/cli.api index 889ba1615..51e7513c2 100644 --- a/src/cds/cli/api/cli.api +++ b/src/cds/cli/api/cli.api @@ -4,6 +4,7 @@ public class org/icpclive/cds/cli/CdsCommandLineOptions : com/github/ajalt/clikt public final fun getConfigDirectory ()Ljava/nio/file/Path; public final fun getCredentialFile ()Ljava/nio/file/Path; public final fun getCustomFieldsCsvPath ()Ljava/nio/file/Path; + public final fun getOrgCustomFieldsCsvPath ()Ljava/nio/file/Path; public final fun toFlow ()Lkotlinx/coroutines/flow/Flow; } diff --git a/src/cds/cli/src/main/kotlin/org/icpclive/cds/cli/CdsCommandLineOptions.kt b/src/cds/cli/src/main/kotlin/org/icpclive/cds/cli/CdsCommandLineOptions.kt index 95dfa409d..632873474 100644 --- a/src/cds/cli/src/main/kotlin/org/icpclive/cds/cli/CdsCommandLineOptions.kt +++ b/src/cds/cli/src/main/kotlin/org/icpclive/cds/cli/CdsCommandLineOptions.kt @@ -4,20 +4,18 @@ import com.github.ajalt.clikt.parameters.groups.OptionGroup import com.github.ajalt.clikt.parameters.options.* import com.github.ajalt.clikt.parameters.types.path import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.flowOn +import kotlinx.coroutines.flow.* import kotlinx.serialization.SerializationException import kotlinx.serialization.json.* import org.apache.commons.csv.CSVFormat import org.apache.commons.csv.CSVParser import org.icpclive.cds.ContestUpdate -import org.icpclive.cds.adapters.applyCustomFieldsMap import org.icpclive.cds.adapters.applyTuningRules -import org.icpclive.cds.api.toTeamId import org.icpclive.cds.settings.* import org.icpclive.cds.tunning.TuningRule import org.icpclive.cds.util.fileContentFlow import org.icpclive.cds.util.getLogger +import java.io.InputStream import java.nio.file.Path import java.nio.file.Paths import kotlin.io.path.exists @@ -38,10 +36,14 @@ public open class CdsCommandLineOptions : OptionGroup("CDS options") { .path(mustExist = true, canBeFile = true, canBeDir = false) .defaultLazy("configDirectory/advanced.json") { configDirectory.resolve("advanced.json") } - public val customFieldsCsvPath: Path by option("--custom-fields-csv", help = "Path to file with custom fields") + public val customFieldsCsvPath: Path by option("--custom-fields-csv", help = "Path to file with custom fields for teams") .path(mustExist = true, canBeFile = true, canBeDir = false) .defaultLazy("configDirectory/custom-fields.csv") { configDirectory.resolve("custom-fields.csv") } + public val orgCustomFieldsCsvPath: Path by option("--org-custom-fields-csv", help = "Path to file with custom fields for organizations") + .path(mustExist = true, canBeFile = true, canBeDir = false) + .defaultLazy("configDirectory/org-custom-fields.csv") { configDirectory.resolve("org-custom-fields.csv") } + public fun toFlow(): Flow { val advancedProperties = fileContentFlow( advancedJsonPath, @@ -61,39 +63,58 @@ public open class CdsCommandLineOptions : OptionGroup("CDS options") { } val customFields = fileContentFlow( customFieldsCsvPath, - noData = emptyMap() + noData = emptyList() ) { - val parser = CSVParser.parse(it.reader(), CSVFormat.EXCEL.builder().setHeader().setSkipHeaderRecord(true).get()) - val names = parser.headerNames - if (names.isEmpty()) { - log.warning { "Ignoring malformed ${customFieldsCsvPath.name}: empty file" } - emptyMap() - } else if (names[0] != "team_id") { - log.warning { "Ignoring malformed ${customFieldsCsvPath.name}: first column should be team_id" } - emptyMap() - } else { - parser.records.associate { record -> - record[0].toTeamId() to names.zip(record).drop(1).associate { it.first!! to it.second!! } - } - } + val parsed = parseCsv(customFieldsCsvPath, it, "team_id") + listOf(TuningRule.fromTeamFields(parsed)) + } + val orgCustomFields = fileContentFlow( + orgCustomFieldsCsvPath, + noData = emptyList() + ) { + val parsed = parseCsv(orgCustomFieldsCsvPath, it, "org_id") + listOf(TuningRule.fromOrganizationFields(parsed)) + } + + val combinedTuningFlow = combine(customFields, orgCustomFields, advancedProperties) { a, b, c -> + a + b + c } log.info { "Using config directory ${this.configDirectory}" } log.info { "Current working directory is ${Paths.get("").toAbsolutePath()}" } - val path = this.configDirectory.resolve("events.properties") - .takeIf { it.exists() } - ?.also { log.warning { "Using events.properties is deprecated, use settings.json instead." } } + val path = this.configDirectory.resolve("events.properties").takeIf { it.exists() } ?: this.configDirectory.resolve("settings.json5").takeIf { it.exists() } ?: this.configDirectory.resolve("settings.json") val creds: Map = this.credentialFile?.let { Json.decodeFromStream?>(it.toFile().inputStream()) } ?: emptyMap() return CDSSettings.fromFile(path) { creds[it] } .toFlow() - .applyCustomFieldsMap(customFields) - .applyTuningRules(advancedProperties) + .applyTuningRules(combinedTuningFlow) .flowOn(Dispatchers.IO) } + private companion object { val log by getLogger() } + + private fun parseCsv( + path: Path, + input: InputStream, + idHeaderName: String, + ): Map> { + val parser = CSVParser.parse(input.reader(), CSVFormat.EXCEL.builder().setHeader().setSkipHeaderRecord(true).get()) + val names = parser.headerNames + if (names.isEmpty()) { + log.warning { "Ignoring malformed ${path.name}: empty file" } + return emptyMap() + } + if (names[0] != idHeaderName) { + log.warning { "Ignoring malformed ${path.name}: first column should be ${idHeaderName}" } + return emptyMap() + } + return parser.records.associate { record -> + record[0] to names.zip(record).drop(1).associate { it.first!! to it.second!! } + } + } + } diff --git a/src/cds/core/api/core.api b/src/cds/core/api/core.api index 90c645933..fe770f6d1 100644 --- a/src/cds/core/api/core.api +++ b/src/cds/core/api/core.api @@ -65,7 +65,6 @@ public final class org/icpclive/cds/adapters/AdaptersKt { public static final fun addFirstToSolves (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow; public static final fun addPreviousDaysByResults (Lkotlinx/coroutines/flow/Flow;Ljava/util/List;)Lkotlinx/coroutines/flow/Flow; public static final fun addPreviousDaysBySettings (Lkotlinx/coroutines/flow/Flow;Ljava/util/List;)Lkotlinx/coroutines/flow/Flow; - public static final fun applyCustomFieldsMap (Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow; public static final fun applyTuningRules (Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow; public static final fun autoCreateMissingGroupsAndOrgs (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow; public static final fun calculateScoreDifferences (Lkotlinx/coroutines/flow/Flow;)Lkotlinx/coroutines/flow/Flow; @@ -3006,6 +3005,8 @@ public abstract interface class org/icpclive/cds/tunning/TuningRule { } public final class org/icpclive/cds/tunning/TuningRule$Companion { + public final fun fromOrganizationFields (Ljava/util/Map;)Lorg/icpclive/cds/tunning/TuningRule; + public final fun fromTeamFields (Ljava/util/Map;)Lorg/icpclive/cds/tunning/TuningRule; public final fun listFromInputStream (Ljava/io/InputStream;)Ljava/util/List; public final fun listFromString (Ljava/lang/String;)Ljava/util/List; public final fun serializer ()Lkotlinx/serialization/KSerializer; diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/Adapters.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/Adapters.kt index 3796a46ee..ef7a80d73 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/Adapters.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/Adapters.kt @@ -30,7 +30,6 @@ public fun Flow.addPreviousDays(previousDays: List) public fun Flow.addPreviousDays(previousDays: List): Flow = addPreviousDays(this, previousDays) public fun Flow.applyTuningRules(tuningRulesFlow: Flow>): Flow = applyTuningRules(this, tuningRulesFlow) -public fun Flow.applyCustomFieldsMap(customFieldsFlow: Flow>>): Flow = applyCustomFieldsMap(this, customFieldsFlow) public fun Flow.autoCreateMissingGroupsAndOrgs(): Flow = autoCreateMissingGroupsAndOrgs(this) diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/impl/CustomFieldsAdapter.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/impl/CustomFieldsAdapter.kt deleted file mode 100644 index 2a17ebc03..000000000 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/adapters/impl/CustomFieldsAdapter.kt +++ /dev/null @@ -1,71 +0,0 @@ -package org.icpclive.cds.adapters.impl - -import kotlinx.coroutines.coroutineScope -import kotlinx.coroutines.flow.* -import org.icpclive.cds.* -import org.icpclive.cds.api.* -import org.icpclive.cds.util.getLogger - -private val logger by getLogger() - -private sealed interface CustomFieldsAdapterEvent { - data class Update(val update: ContestUpdate) : CustomFieldsAdapterEvent - data object Trigger : CustomFieldsAdapterEvent -} - -@OptIn(InefficientContestInfoApi::class) -private fun applyCustomFieldsMap(ci: ContestInfo, cf: Map>) : ContestInfo { - if (cf.isEmpty()) return ci - val unknownTeams = cf.keys.filterNot { it in ci.teams } - if (unknownTeams.isNotEmpty()) { - logger.warning { "Unknown teams in custom fields csv: $unknownTeams" } - } - return ci.copy( - teamList = ci.teamList.map { team -> team.copy(customFields = (cf[team.id] ?: emptyMap()) + team.customFields) } - ) -} - -internal fun applyCustomFieldsMap(flow: Flow, customFieldsFlow: Flow>>): Flow = - flow { - coroutineScope { - val customFieldStateFlow = customFieldsFlow.stateIn(this) - var contestInfo: ContestInfo? = null - - suspend fun apply() { - val ci = contestInfo ?: return - val cf = customFieldStateFlow.value - emit(InfoUpdate(applyCustomFieldsMap(ci, cf))) - } - merge( - flow.map { CustomFieldsAdapterEvent.Update(it) }, - customFieldStateFlow.map { CustomFieldsAdapterEvent.Trigger }, - ).collect { - when (it) { - is CustomFieldsAdapterEvent.Trigger -> { - apply() - } - - is CustomFieldsAdapterEvent.Update -> { - when (it.update) { - is InfoUpdate -> { - if (contestInfo != it.update.newInfo) { - contestInfo = it.update.newInfo - apply() - } - } - - is RunUpdate -> { - emit(it.update) - } - - else -> { - emit(it.update) - } - } - } - } - } - } - } - - diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/settings/entrypoint.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/settings/entrypoint.kt index c3e459a25..72c80ce88 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/settings/entrypoint.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/settings/entrypoint.kt @@ -13,6 +13,7 @@ public fun CDSSettings.Companion.fromFile(path: Path, credentialProvider: Creden return when { !file.exists() -> throw IllegalArgumentException("File ${file.absolutePath} does not exist") file.name.endsWith(".properties") -> throw IllegalStateException("Properties format is not supported anymore, use settings.json instead") + file.name.endsWith(".json5") -> throw IllegalStateException("Json5 format is not supported anymore, use settings.json instead") file.name.endsWith(".json") -> { val format = Json { serializersModule = serializersModule(credentialProvider, path) diff --git a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/Rules.kt b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/Rules.kt index 72bbd1d8d..39149b0c3 100644 --- a/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/Rules.kt +++ b/src/cds/core/src/main/kotlin/org/icpclive/cds/tunning/Rules.kt @@ -1,12 +1,48 @@ package org.icpclive.cds.tunning import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.PrimitiveKind +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.descriptors.elementDescriptors +import kotlinx.serialization.descriptors.elementNames import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.buildJsonObject import kotlinx.serialization.json.decodeFromStream +import kotlinx.serialization.serializer import org.icpclive.cds.api.* import org.icpclive.cds.api.AwardsSettings.MedalGroup import java.io.InputStream +private fun SerialDescriptor.unwrapInlines(): SerialDescriptor = if (isInline) elementDescriptors.first().unwrapInlines() else this + +private inline fun fieldsToOverrideImpl(rules: Map>) : Map { + val s = serializer() + val knownFields = buildSet { + val descriptor = s.descriptor + for ((index, element) in descriptor.elementNames.withIndex()) { + if (descriptor.getElementDescriptor(index).unwrapInlines().kind == PrimitiveKind.STRING) { + add(element) + } + } + } + return rules.mapValues { (_, data) -> + val knownData = data.filterKeys { it in knownFields } + val customData = data.filterKeys { it !in knownFields } + Json.decodeFromJsonElement( + s, + buildJsonObject { + for ((k, v) in knownData) { + put(k, JsonPrimitive(v)) + } + put("customFields", JsonObject(customData.mapValues { JsonPrimitive(it.value) })) + } + ) + } +} + + /** * This is a base interface for all rules in advanced.json file. * @@ -34,6 +70,13 @@ public sealed interface TuningRule { public fun tryListFromLegacyFormatFromInputStream(input: InputStream): List? = runCatching { AdvancedProperties.fromInputStream(input).toRulesList() }.getOrNull() + + public fun fromTeamFields(input: Map>): TuningRule { + return OverrideTeams(rules = fieldsToOverrideImpl(input.mapKeys { it.key.toTeamId() })) + } + public fun fromOrganizationFields(input: Map>): TuningRule { + return OverrideOrganizations(rules = fieldsToOverrideImpl(input.mapKeys { it.key.toOrganizationId() })) + } } public fun process(info: ContestInfo): ContestInfo diff --git a/src/frontend/admin/src/components/ConfigurationEditor.tsx b/src/frontend/admin/src/components/ConfigurationEditor.tsx index ca96e0904..530f72537 100644 --- a/src/frontend/admin/src/components/ConfigurationEditor.tsx +++ b/src/frontend/admin/src/components/ConfigurationEditor.tsx @@ -182,6 +182,7 @@ enum EditorType { advancedJson = "advancedJson", visualConfig = "visualConfig", customFields = "customFields", + orgCustomFields = "orgCustomFields", } function ConfigurationsEditor(): React.ReactElement { @@ -192,6 +193,9 @@ function ConfigurationsEditor(): React.ReactElement { console.log(`Selection is now ${event.target.value}`); setSelection(event.target.value as EditorType); }; + const isCsv = + selection == EditorType.customFields || + selection == EditorType.orgCustomFields; return ( ); From 0a3b58f14dd413ee094313d6ffab6575d0cd7172 Mon Sep 17 00:00:00 2001 From: Pavel Kunyavskiy Date: Sun, 23 Nov 2025 14:31:13 +0100 Subject: [PATCH 3/3] Use new custom.csv in nwrcc-2025-2026 as example --- .../nwrrc-2025-2026/advanced.json | 167 +++--------------- .../nwrrc-2025-2026/custom-fields.csv | 2 +- .../nwrrc-2025-2026/org-custom-fields.csv | 27 +++ 3 files changed, 53 insertions(+), 143 deletions(-) create mode 100644 config/icpc-northern-eurasia/nwrrc-2025-2026/org-custom-fields.csv diff --git a/config/icpc-northern-eurasia/nwrrc-2025-2026/advanced.json b/config/icpc-northern-eurasia/nwrrc-2025-2026/advanced.json index dd4c032a4..401634ccc 100644 --- a/config/icpc-northern-eurasia/nwrrc-2025-2026/advanced.json +++ b/config/icpc-northern-eurasia/nwrrc-2025-2026/advanced.json @@ -1,46 +1,39 @@ [ + { + "type": "overrideOrganisationTemplate", + "logo": { + "type": "Image", + "url": "/media/organizations/{org.id}/logo.svg" + } + }, { "type": "overrideTeamTemplate", "regexes": { - "custom": { + "fromName": { "from": "{team.fullName}", "rules": { "([^:]*): (.*) (\\([^)]*\\))": { - "org": "$1", "funnyNameValue": "$2", - "contestants": "$3", - }, - "spb(.*)": { - "compValue": "$1" - } + "contestants": "$3" + } + } + }, + "fromId": { + "from": "{team.id}", + "rules": { + "spb(.*)": {"compValue": "$1"} } } }, - "organizationId": "{regexes.custom.org}", "customFields": { - "funnyName": "{regexes.custom.funnyNameValue}", - "comp": "{regexes.custom.compValue}" + "funnyName": "{regexes.fromName.funnyNameValue}", + "comp": "{regexes.fromId.compValue}" } }, - { - "type": "overrideTeamTemplate", - "regexes": { - "custom": { - "from": "{team.id}", - "rules": { - "spb(.*)": { - "compValue": "$1" - } - } - } - }, - "customFields": { - "comp": "{regexes.custom.compValue}" - } - }, { "type": "overrideTeamTemplate", "displayName": "{org.displayName}: {funnyName}", + "fullName": "{org.fullName}: {funnyName}", "medias": { "screen": { "type": "WebRTCGrabberConnection", @@ -62,33 +55,12 @@ } } }, - { - "type": "overrideProblems", - "rules": { - "W": { - "color": "#a6406eff" - }, - "X": { - "color": "#bb7190ff" - }, - "Y": { - "color": "#3daa91ff" - }, - "Z": { - "color": "#3f4a58ff" - } - } - }, { "type": "addMedals", "gold": 5, "silver": 8, "bronze": 10 }, - { - "type": "overrideQueue", - "maxQueueSize": 20 - }, { "type": "overrideScoreboardSettings", "problemColorPolicy": { @@ -111,100 +83,11 @@ "J": { "color": "#3EABB4" }, "K": { "color": "#000000" }, "L": { "color": "#8E74B7" }, + + "W": { "color": "#a6406e" }, + "X": { "color": "#bb7190" }, + "Y": { "color": "#3daa91" }, + "Z": { "color": "#3f4a58" } } - }, - { - "type": "overrideTeamTemplate", - "organizationId": "{team.customFields.organization_id}" - }, - { - "type": "overrideOrganisationTemplate", - "logo": { - "type": "Image", - "url": "/media/organizations/{org.id}/logo.svg" - } - }, - { - "type": "overrideOrganizations", - "rules": { - "3295": { - "displayName": "St. Petersburg ITMO University" - }, - "1366": { - "displayName": "Novgorod State University" - }, - "1456": { - "displayName": "Petrozavodsk State University" - }, - "1584": { - "displayName": "St. Petersburg Baltic State Technical University" - }, - "1587": { - "displayName": "St. Petersburg Polytechnic University" - }, - "1592": { - "displayName": "St. Petersburg University of Aerospace Instrumentation" - }, - "1772": { - "displayName": "St. Petersburg State University of Architecture and Civil Engineering" - }, - "1802": { - "displayName": "St. Petersburg State University" - }, - "3526": { - "displayName": "St. Petersburg Academic University" - }, - "4325": { - "displayName": "St. Petersburg State University of Telecommunications" - }, - "5320": { - "displayName": "St. Petersburg Electrotechnical University LETI" - }, - "5341": { - "displayName": "Herzen State Pedagogical University" - }, - "5343": { - "displayName": "Popov Naval Institute of Radio Electronics" - }, - "6536": { - "displayName": "Pskov State University" - }, - "7043": { - "displayName": "Admiral Makarov State University of Maritime and Inland Shipping" - }, - "7537": { - "displayName": "St. Petersburg State University of Economics" - }, - "7846": { - "displayName": "A. Pushkin Leningrad State University" - }, - "7935": { - "displayName": "Military Telecommunications Academy named after the Soviet Union Marshal Budienny S.M." - }, - "9606": { - "displayName": "St. Petersburg Campus of HSE University" - }, - "10354": { - "displayName": "Mikhailovskaya Military Artillery Academy" - }, - "10615": { - "displayName": "St. Petersburg State University of Industrial Technologies and Design" - }, - "10617": { - "displayName": "Murmansk Arctic University" - }, - "10618": { - "displayName": "Polytechnic College of Novgorod State University" - }, - "14046": { - "displayName": "St. Petersburg State Forest Technical University named after S.M. Kirova" - }, - "14047": { - "displayName": "Military Space Academy" - }, - "24938": { - "displayName": "Military Academy of Logistics" - } - } - } + } ] diff --git a/config/icpc-northern-eurasia/nwrrc-2025-2026/custom-fields.csv b/config/icpc-northern-eurasia/nwrrc-2025-2026/custom-fields.csv index d049db90b..84623b157 100644 --- a/config/icpc-northern-eurasia/nwrrc-2025-2026/custom-fields.csv +++ b/config/icpc-northern-eurasia/nwrrc-2025-2026/custom-fields.csv @@ -1,4 +1,4 @@ -team_id,icpcid,icpc_id,original_name,university_display_name,group_id,organization_id +team_id,icpcid,icpc_id,original_name,university_display_name,group_id,organizationId spb101,1115012,1115012,<3,St. Petersburg State University,37957,1802 spb102,1117231,1117231,Deprecated 25,St. Petersburg ITMO University,37957,3295 spb103,1117232,1117232,Log'n'roll,St. Petersburg State University,37957,1802 diff --git a/config/icpc-northern-eurasia/nwrrc-2025-2026/org-custom-fields.csv b/config/icpc-northern-eurasia/nwrrc-2025-2026/org-custom-fields.csv new file mode 100644 index 000000000..07338083d --- /dev/null +++ b/config/icpc-northern-eurasia/nwrrc-2025-2026/org-custom-fields.csv @@ -0,0 +1,27 @@ +org_id,fullName,displayName +3295,St. Petersburg ITMO University,SPb ITMO +1366,Novgorod State University,NovSU +1456,Petrozavodsk State University,Petrozavodsk SU +1584,St. Petersburg Baltic State Technical University,BSTU +1587,St. Petersburg Polytechnic University,Polytech +1592,St. Petersburg University of Aerospace Instrumentation,SUAI +1772,St. Petersburg State University of Architecture and Civil Engineering,SPSUACE +1802,St. Petersburg State University,St. Petersburg SU +3526,St. Petersburg Academic University,St. Petersburg AU +4325,St. Petersburg State University of Telecommunications,SPb SUT +5320,St. Petersburg Electrotechnical University LETI,SPbETU +5341,Herzen State Pedagogical University,Herzen SPU +5343,Popov Naval Institute of Radio Electronics,Popov Naval I of RE +6536,Pskov State University,Pskov SU +7043,Admiral Makarov State University of Maritime and Inland Shipping,Makarov SU of Maritime and IS +7537,St. Petersburg State University of Economics,SPb SU of Economics +7846,A. Pushkin Leningrad State University,Pushkin Leningrad SU +7935,Military Telecommunications Academy named after the Soviet Union Marshal Budienny S.M.,Budenny Mil Telecom A +9606,St. Petersburg Campus of HSE University,SPb HSE +10354,Mikhailovskaya Military Artillery Academy,MVAA +10615,St. Petersburg State University of Industrial Technologies and Design,SPb SUITD +10617,Murmansk Arctic University,Murmansk AU +10618,Polytechnic College of Novgorod State University,Pol C of Novgorod SU +14046,St. Petersburg State Forest Technical University named after S.M. Kirova,SPbFTU +14047,Military Space Academy,MSA +24938,Military Academy of Logistics,Military A of Logistics \ No newline at end of file