Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"esbuild",
"coloneqq",
"FiltVect",
"networkidle"
"networkidle",
"devlog"
],
"words": [
"abelian",
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ jobs:
pnpm db:setup:catdat
pnpm db:update

- name: Redundancy check
run: pnpm db:redundancies

- name: Cache Playwright browsers
uses: actions/cache@v6
with:
Expand Down
7 changes: 4 additions & 3 deletions databases/app/scripts/setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dotenv from 'dotenv'
import { createClient } from '@libsql/client'
import { devlog } from '$shared/utils'

dotenv.config({ quiet: true })

Expand Down Expand Up @@ -39,7 +40,7 @@ async function create_visits_table() {
)
`)

console.info('Visits table ready')
devlog('Visits table ready')
}

/**
Expand All @@ -58,7 +59,7 @@ async function create_submissions_table() {
)
`)

console.info('Submissions table ready')
devlog('Submissions table ready')
}

/**
Expand All @@ -74,5 +75,5 @@ async function create_actions_table() {
)
`)

console.info('User actions table ready')
devlog('User actions table ready')
}
17 changes: 0 additions & 17 deletions databases/catdat/scripts/config.ts

This file was deleted.

17 changes: 11 additions & 6 deletions databases/catdat/scripts/deduce-implications.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { STRUCTURE_TYPES_WITH_DUALS, type StructureType } from './config'
import { are_equal_sets, parse_nested_json_set, parse_json_set } from './utils/helpers'
import { get_client } from './utils/db'
import { type StructureType, STRUCTURE_TYPES_WITH_DUALS } from '$shared/config'
import {
are_equal_sets,
parse_nested_json_set,
parse_json_set,
devlog
} from '$shared/utils'
import { get_client } from '$shared/db'

const db = get_client()
const db = get_client({ readonly: false })

/**
* Clears all deduced implications. This is done before the deduction starts.
Expand Down Expand Up @@ -151,7 +156,7 @@ export function create_dualized_implications(type: StructureType) {
}
}

console.info(`Deduced ${count} ${type} implications by duality`)
devlog(`Deduced ${count} ${type} implications by duality`)
})

insert_duals()
Expand Down Expand Up @@ -203,5 +208,5 @@ export function create_self_dual_implications(type: StructureType) {
conclusion_insert.run(implication_id, p.dual, type)
}

console.info(`Deduced ${relevant_props.length} ${type} implications by self-duality`)
devlog(`Deduced ${relevant_props.length} ${type} implications by self-duality`)
}
7 changes: 4 additions & 3 deletions databases/catdat/scripts/deduce-special-morphisms.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { get_client } from './utils/db'
import { get_client } from '$shared/db'
import { devlog } from '$shared/utils'

const db = get_client()
const db = get_client({ readonly: false })

// TODO: deduce further morphisms,
// e.g. isomorphisms = bijective morphisms in algebraic categories,
Expand Down Expand Up @@ -46,5 +47,5 @@ function deduce_special_morphisms_of_dual_categories() {
)
.run()

console.info(`Deduced ${res.changes} special morphisms by duality`)
devlog(`Deduced ${res.changes} special morphisms by duality`)
}
7 changes: 4 additions & 3 deletions databases/catdat/scripts/deduce-special-objects.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { get_client } from './utils/db'
import { get_client } from '$shared/db'
import { devlog } from '$shared/utils'

const db = get_client()
const db = get_client({ readonly: false })

export function deduce_special_objects() {
console.info('\n--- Deduce special objects ---')
Expand Down Expand Up @@ -40,5 +41,5 @@ function deduce_special_objects_of_dual_categories() {
)
.run()

console.info(`Deduced ${res.changes} special objects by duality`)
devlog(`Deduced ${res.changes} special objects by duality`)
}
Loading