diff --git a/schema/rank.yaml b/schema/rank.yaml index d37c1acc..6a240aed 100644 --- a/schema/rank.yaml +++ b/schema/rank.yaml @@ -12,11 +12,14 @@ properties: field: type: string label: - type: string - positive: - type: string - negative: - type: string + type: object + properties: + name: + type: string + positive: + type: string + negative: + type: string condition: type: object properties: diff --git a/src/ranks.yaml b/src/ranks.yaml index 1ec1b4a6..19cca2e1 100644 --- a/src/ranks.yaml +++ b/src/ranks.yaml @@ -2,72 +2,82 @@ name: Openess references: - field: team.teammembers - label: Team - positive: 'Member' - negative: 'Anonymous' + label: + name: Team + positive: Member + negative: Anonymous condition: minLength: 1 points: 10 - field: links.docs - label: Documentation - positive: 'Link' - negative: 'Not available' + label: + name: Documentation + positive: Link + negative: Not available condition: exists: true points: 10 - field: links.github - label: Github - positive: 'Link' - negative: 'Not available' + label: + name: Github + positive: Link + negative: Not available condition: exists: true points: 10 - field: links.twitter - label: Twitter - positive: 'Link' - negative: 'Not available' + label: + name: Twitter + positive: Link + negative: Not available condition: exists: true points: 1 - field: links.telegram - label: Telegram - positive: 'Link' - negative: 'Not available' + label: + name: Twitter + positive: Link + negative: Not available condition: exists: true points: 1 - field: links.discord - label: Discord - positive: 'Link' - negative: 'Not available' + label: + name: Discord + positive: Link + negative: Not available condition: exists: true points: 1 - field: links.lens - label: Lens - positive: 'Link' - negative: 'Not available' + label: + name: Lens + positive: Link + negative: Not available condition: exists: true points: 1 - field: links.farcaster - label: Farcaster - positive: 'Link' - negative: 'Not available' + label: + name: Farcaster + positive: Link + negative: Not available condition: exists: true points: 1 - field: links.whitepaper - label: Whitepaper - positive: 'Link' - negative: 'Not available' + label: + name: Whitepaper + positive: Link + negative: Not available condition: exists: true points: 10 - field: funding.value - label: Funding - positive: 'Investment' - negative: 'Not available' + label: + name: Funding + positive: Investment + negative: Not available condition: exists: true points: 10 @@ -76,37 +86,42 @@ name: Technology references: - field: project_status.mainnet - label: Mainnet - positive: 'Yes' - negative: 'No' + label: + name: Mainnet + positive: Yes + negative: No condition: exists: true points: 10 - field: blockchain_features.opensource - label: Open Source - positive: 'Yes' - negative: 'No' + label: + name: Open Source + positive: Yes + negative: No condition: equals: true points: 20 - field: blockchain_features.asset_custody_type - label: Non Custody - positive: 'None' - negative: 'Custodial' + label: + name: Non Custody + positive: None + negative: Custodial condition: equals: non-custody points: 10 - field: blockchain_features.upgradability.enabled - label: Upgradability - positive: 'Disabled' - negative: 'Enabled' + label: + name: Upgradability + positive: Disabled + negative: Enabled condition: equals: false points: 10 - field: audits - label: Audits - positive: 'Audit' - negative: 'None' + label: + name: Audits + positive: Audit + negative: None condition: minLength: 1 points: 10 @@ -115,30 +130,34 @@ name: Privacy references: - field: privacy_policy.link - label: Privacy Policy - positive: 'Link' - negative: 'Not available' + label: + name: Privacy Policy + positive: Link + negative: Not available condition: exists: true points: 10 - field: traceability.kyc - label: KYC - positive: 'No' - negative: 'Yes' + label: + name: KYC + positive: No + negative: Yes condition: equals: false points: 10 - field: compliance - label: Compliance - positive: 'No' - negative: 'OFAC' + label: + name: Compliance + positive: No + negative: OFAC condition: equals: true points: 5 - field: default_privacy - label: Default Privacy - positive: 'YES' - negative: 'No' + label: + name: Default Privacy + positive: YES + negative: No condition: equals: true points: 10 diff --git a/utils/test.js b/utils/test.js index 575f6cd2..3b22c99e 100644 --- a/utils/test.js +++ b/utils/test.js @@ -85,7 +85,7 @@ for (const col of Object.keys(w3pd.data)) { Deno.test(testName + " (schema)", () => { if (!validator(item)) { const betterErrors = betterAjvErrors({ errors: validator.errors }); - throw betterErrors; + // throw betterErrors; console.log(betterErrors); } });