This commit is contained in:
tree 2022-02-08 09:25:11 +01:00
rodič c5837f02fb
revize a55e054a7e
6 změnil soubory, kde provedl 287 přidání a 11 odebrání

Zobrazit soubor

@ -52,6 +52,9 @@ twitter-photos:
events:
deno run --unstable --allow-read utils/events.js
team:
deno run --unstable --allow-read utils/team.js
schema:
deno run --unstable --allow-read utils/exec.js schemas

Zobrazit soubor

@ -24,3 +24,4 @@ specDef:
- type: faqs
- type: partners
- type: projects
- type: team

175
spec/22/team.yaml Normal file
Zobrazit soubor

@ -0,0 +1,175 @@
persons:
tree:
name: Tree
twitter: treecz
desc: Zástupce [Gwei.cz](http://gwei.cz/) a [BohemianDAO](http://bohemiandao.cz/)
tereza:
name: Tereza Starostová
twitter: tatereza5
desc: Zástupce [Holky v Kryptu](https://holkyvkryptu.cz/)
vojtch:
name: Vojtch
twitter: StudenyVojta
desc: Zástupce [Bankless Czech](https://bankless.cz/) a [Gwei.cz](http://gwei.cz/)
simona:
name: Simona Pacáková
twitter: SPacakova
petr:
name: Petr Klein
twitter: kleinpetr_com
david:
name: DavidBankless
twitter: davidbankless
jiri:
name: Jiří Čepelka
twitter: JiriCepelka
exez:
name: Exez
twitter: OndraPulc
dusan:
name: Dušan Kmetyo
twitter: dusankmetyo
teams:
core:
name: Core
desc: |
Hlavní team který koordinuje ostatní teamy a fakticky reprezentuje konferenci.
members:
- tree
- tereza
- vojtch
lead: tereza
legal:
name: Legal
desc: |
Legální entita (UTXO Foundation, z.s.), právní aspekty, účetnictví atp.
members:
- tree
- tereza
- simona
- petr
lead: tereza
finance:
name: Finance
desc: |
Finanční plánování konference (budget).
members:
- vojtch
- tereza
- tree
lead: vojtch
sponsorship:
name: Sponzorství
parent: budget
desc: |
Shánění a domlouvání sponzorů.
members:
- vojtch
- tereza
- david
lead: vojtch
venue:
name: Místo konání
desc: |
Vše co se týká místa konání a jeho vybavení.
members:
- tereza
- tree
lead: tereza
catering:
name: Catering
parent: venue
desc: |
Řešení jídla pro návštěvníky.
members:
- tereza
- tree
lead: tereza
program:
name: Program
desc: |
Dramaturgie konference - hlavní a doprovodný program.
members:
- tree
- tereza
lead: tree
speakers:
name: Přednášející
parent: program
desc: |
Shánění a koordinace přednášejících.
members:
- tree
- tereza
lead: tree
design:
name: Design
desc: |
Vizuální identita apod.
members:
- tereza
- tree
- exez
lead: tereza
marketing:
name: Marketing
desc: |
Aktivity propagující konferenci, sociální sítě.
members:
- tereza
- tree
- jiri
lead: tereza
web-ticketing:
name: Web a ticketing
desc: |
Technická realizace webu a ticketingu (prodej vstupenek).
members:
- tree
lead: tree
utxo-tv:
name: UTXO.TV
members:
- tree
lead: tree
party:
name: Party
parent: program
desc: |
Společenský večer a party, která se uskuteční v rámci konference.
members:
- tereza
- tree
lead: tree
kryptokino:
name: KryptoKino
parent: program
members:
- tree
- dusan
lead: tree

51
utils/schema/1/team.yaml Normal file
Zobrazit soubor

@ -0,0 +1,51 @@
type: object
additionalProperties: false
required:
- persons
- teams
properties:
persons:
type: object
additionalProperties: false
patternProperties:
"^[a-z0-9-]+$":
type: object
additionalProperties: false
required:
- name
properties:
name:
type: string
twitter:
type: string
pattern: "^[a-zA-Z0-9_]+$"
desc:
type: string
teams:
type: object
additionalProperties: false
patternProperties:
"^[a-z0-9-]+$":
type: object
additionalProperties: false
required:
- name
- members
- lead
properties:
name:
type: string
members:
type: array
items:
type: string
pattern: "^[a-z0-9-]+$"
lead:
type: string
pattern: "^[a-z0-9-]+$"
desc:
type: string
parent:
type: string
pattern: "^[a-z0-9-]+$"

25
utils/team.js Normal file
Zobrazit soubor

@ -0,0 +1,25 @@
import { UTXOEngine } from "./engine.js";
const utxo = new UTXOEngine({ silent: true });
await utxo.init();
const entryId = "22";
const entry = utxo.entries[entryId];
const pt = entry.specs.team.teams;
const teams = Object.keys(pt).map((id) => Object.assign({ id }, pt[id]));
console.log("----");
function members(t) {
return t.members.map((m) => m === t.lead ? "@" + m : m).sort((m) =>
m.substring(0, 1) === "@" ? -1 : 1
).join(", ");
}
for (const t of teams.filter((t) => !t.parent)) {
console.log(`[${t.id}] +${members(t)}`);
for (const st of teams.filter((tx) => tx.parent === t.id)) {
console.log(` \\\__ [${st.id}] +${members(st)}`);
}
}

Zobrazit soubor

@ -39,18 +39,20 @@ for (const entryId of utxo.entriesList()) {
}
});
Deno.test(`UTXO.${entryId}: ${specId}[id-duplicates]`, () => {
const used = [];
for (const item of entry.specs[specId]) {
if (!item.id) {
return null;
if (!["team"].includes(specId)) {
Deno.test(`UTXO.${entryId}: ${specId}[id-duplicates]`, () => {
const used = [];
for (const item of entry.specs[specId]) {
if (!item.id) {
return null;
}
if (used.includes(item.id)) {
throw `Duplicate key: ${item.id}`;
}
used.push(item.id);
}
if (used.includes(item.id)) {
throw `Duplicate key: ${item.id}`;
}
used.push(item.id);
}
});
});
}
if (["speakers", "projects"].includes(specId)) {
Deno.test(`UTXO.${entryId}: ${specId}[tracks-links]`, () => {
@ -82,6 +84,25 @@ for (const entryId of utxo.entriesList()) {
}
});
}
if (["team"].includes(specId)) {
Deno.test(`UTXO.${entryId}: ${specId}[persons-links]`, () => {
const persons = Object.keys(entry.specs.team.persons);
for (const teamId of Object.keys(entry.specs[specId].teams)) {
const team = entry.specs[specId].teams[teamId];
if (team.lead && !persons.includes(team.lead)) {
throw new Error(`Lead not found: ${team.lead}`);
}
if (!team.members || team.members.length === 0) {
continue;
}
for (const m of team.members) {
if (!persons.includes(m)) {
throw new Error(`Person not exists: ${m}`);
}
}
}
});
}
if (["events"].includes(specId)) {
Deno.test(`UTXO.${entryId}: ${specId}[speakers-tracks]`, () => {
const tracks = entry.specs.tracks.map((t) => t.id);