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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You need to have [Git](https://git-scm.com/), [NodeJS](https://nodejs.org/) and

### Updating the Database

All updates to the database are made by modifying the YAML files in the folder [/databases/catdat/data](databases/catdat/data). See [DATABASE.md](/DATABASE.md) for an overview of the database structure, and see [below](#authoring-of-yaml-files) for some tips how to edit YAML files.
All updates to the database are made by modifying the YAML files in the folder [/database/data](database/data). See [DATABASE.md](/DATABASE.md) for an overview of the database structure, and see [below](#authoring-of-yaml-files) for some tips how to edit YAML files.

Apply the updates using:

Expand All @@ -67,7 +67,7 @@ You can also use
pnpm db:watch
```

to continuously run this update when a file in the subfolder [/databases/catdat/data](/databases/catdat/data) changes.
to continuously run this update when a file in the subfolder [/database/data](/database/data) changes.

### Troubleshooting

Expand All @@ -80,8 +80,8 @@ The `pnpm db:test` command runs several tests to ensure the data behaves as expe

1. Properties and their duals are mutual.
2. Categories and their duals are mutual.
3. For a specified list of categories (see [decided-categories.json](/databases/catdat/scripts/expected-data/decided-categories.json)) and functors (see [decided-functors.json](/databases/catdat/scripts/expected-data/decided-functors.json)), all properties have been decided.
4. Every property of the categories `Set`, `Ab`, `Top` and the functors `forget_vector`, `id_Set` matches precisely the expected properties defined in the [/databases/catdat/scripts/expected-data](/databases/catdat/scripts/expected-data/) folder.
3. For a specified list of categories (see [decided-categories.json](/database/scripts/expected-data/decided-categories.json)) and functors (see [decided-functors.json](/database/scripts/expected-data/decided-functors.json)), all properties have been decided.
4. Every property of the categories `Set`, `Ab`, `Top` and the functors `forget_vector`, `id_Set` matches precisely the expected properties defined in the [/database/scripts/expected-data](/database/scripts/expected-data/) folder.

If any of these tests fail, adjust the data accordingly.

Expand Down Expand Up @@ -149,7 +149,7 @@ In particular, it often makes sense to **keep** a redundant assignment of a sati

For example, you may first prove that a category has zero morphisms, and then prove that it is normal. Although the database contains the implication "normal => zero morphisms", in practice the latter is used as a prerequisite. Similarly, when proving that a category is extensive, it is often clearer to first show that finite coproducts exist, rather than relying on the implication "extensive => finite coproducts". Also, an explicit description of finite coproducts is useful for deciding other properties involving coproducts.

Every redundant assignment of a satisfied property that is intentionally kept must be explicitly marked to skip the redundancy check. See [`N.yaml`](/databases/catdat/data/categories/N.yaml) for an example.
Every redundant assignment of a satisfied property that is intentionally kept must be explicitly marked to skip the redundancy check. See [`N.yaml`](/database/data/categories/N.yaml) for an example.

### Keep Pull Requests Focused

Expand All @@ -172,7 +172,7 @@ As a practical guideline, avoid introducing more than four properties (or four c
2. Use `\varnothing` to display the empty set, not `\emptyset`.
3. For declarations of functions or morphisms use `f : X \to Y`, not `f \colon X \to Y`.
4. For definitions use `\coloneqq` instead of `:=`.
5. For LaTeX symbols that are used repeatedly, in particular category-theoretic notation, define a LaTeX macro in [macros.yaml](databases/catdat/data/macros.yaml).
5. For LaTeX symbols that are used repeatedly, in particular category-theoretic notation, define a LaTeX macro in [macros.yaml](database/data/macros.yaml).

### Responsible Use of AI

Expand All @@ -193,6 +193,6 @@ If you are not familiar with YAML, a short beginner-friendly introduction can be

1. It is recommended to enable word wrap in your editor when working with YAML files.
2. HTML may be used inside string values, for example for links (`<a>`), italic text (`<i>`), and ordered lists (`<ol>`).
3. Use single-quoted strings (`'...'`) for values containing `:`. See [`Cat.yaml`](/databases/catdat/data/categories/Cat.yaml) for an example. Inside single-quoted strings, a literal single quote must be escaped as `''`. See [`Man.yaml`](/databases/catdat/data/categories/Man.yaml) for an example.
4. Use `>-` for multiline text that should be rendered as a single paragraph without line breaks. This is particularly useful for improving readability of longer texts or HTML lists in the YAML file itself. See [`core-thin.yaml`](/databases/catdat/data/category-properties/core-thin.yaml) for an example.
5. Use `|-` for multiline text where line breaks should be preserved. These line breaks are automatically converted to `<br>` when rendered. See [`FreeAb.yaml`](/databases/catdat/data/categories/FreeAb.yaml) for an example.
3. Use single-quoted strings (`'...'`) for values containing `:`. See [`Cat.yaml`](/database/data/categories/Cat.yaml) for an example. Inside single-quoted strings, a literal single quote must be escaped as `''`. See [`Man.yaml`](/database/data/categories/Man.yaml) for an example.
4. Use `>-` for multiline text that should be rendered as a single paragraph without line breaks. This is particularly useful for improving readability of longer texts or HTML lists in the YAML file itself. See [`core-thin.yaml`](/database/data/category-properties/core-thin.yaml) for an example.
5. Use `|-` for multiline text where line breaks should be preserved. These line breaks are automatically converted to `<br>` when rendered. See [`FreeAb.yaml`](/database/data/categories/FreeAb.yaml) for an example.
8 changes: 4 additions & 4 deletions DATABASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

_CatDat_ is based on a [SQLite database](https://sqlite.org/). During runtime of the application, it is read-only.

The local copy of the database is located at `/databases/catdat/catdat.db`. It contains three main tables:
The local copy of the database is located at `/database/catdat.db`. It contains three main tables:

- `structures`
- `properties`
Expand Down Expand Up @@ -38,15 +38,15 @@ Additional tables are available. For a complete overview, see the diagram below.

## Schema vs. Data

The schema defines the structure of the database: tables, views, indexes, and triggers. It is specified in several SQL files located in the subfolder [/databases/catdat/schema](/databases/catdat/schema/). The command
The schema defines the structure of the database: tables, views, indexes, and triggers. It is specified in several SQL files located in the subfolder [/database/schema](/database/schema/). The command

```
pnpm db:setup
```

deletes the old database file (if it exists) and creates a new one using this schema. This is required when the schema changes.

Database entries (categories, functors, properties, implications, etc.) are defined in YAML files located in the subfolder [/databases/catdat/data](/databases/catdat/data/). The command
Database entries (categories, functors, properties, implications, etc.) are defined in YAML files located in the subfolder [/database/data](/database/data/). The command

```
pnpm db:seed
Expand Down Expand Up @@ -94,7 +94,7 @@ Use
pnpm db:watch
```

to run this command automatically every time a file in the subfolder [/databases/catdat/data](/databases/catdat/data) changes. This is useful in particular during development.
to run this command automatically every time a file in the subfolder [/database/data](/database/data) changes. This is useful in particular during development.

## Redundancies

Expand Down
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Most pages are prerendered for performance reasons. This implies that the databa

## Databases

The CatDat SQLite database `catdat.db` is deployed as a file alongside the web application to Netlify and is located at `/var/task/databases/catdat/catdat.db` after deployment. The file system on Netlify is ephemeral, so this only works because the database is read-only during the runtime of the application.
The CatDat SQLite database `catdat.db` is deployed as a file alongside the web application to Netlify and is located at `/var/task/database/catdat.db` after deployment. The file system on Netlify is ephemeral, so this only works because the database is read-only during the runtime of the application.

However, the SQLite database `app.db` (used for user submissions and page visits) requires writes and is hosted remotely on [Turso](https://turso.tech).

Expand Down
File renamed without changes.
File renamed without changes.
Loading