diff --git a/docs/docs/codebase/contributing.md b/docs/docs/codebase/contributing.md index 44b2cd3c9..c82c5c634 100644 --- a/docs/docs/codebase/contributing.md +++ b/docs/docs/codebase/contributing.md @@ -63,9 +63,9 @@ I am trying to keep the codebase well organised and tidy. git config blame.ignoreRevsFile .git-blame-ignore-revs ``` - !!! info + !!! warning This only works on git 2.23 or greater. Your package manager may not have a version - this recent. See [Git Installation for Linux](https://git-scm.com/download/linux) + this recent. See [Git Installation for Linux](https://git-scm.com/download/linux). ### Pull Requests @@ -129,6 +129,3 @@ Non-Specific bug reports will be closed immediately and marked as invalid. - Documentation issues go in the other repo. Documentation issues should go [here](https://github.com/zkldi/tachi-docs) instead. - -## Other Things - diff --git a/docs/docs/codebase/import/main.md b/docs/docs/codebase/import/main.md index e821bc5d2..f61773435 100644 --- a/docs/docs/codebase/import/main.md +++ b/docs/docs/codebase/import/main.md @@ -12,7 +12,7 @@ This function can be found at `src/lib/score-import/framework/score-import-main. | Argument | Type | Description | | :: | :: | :: | | `user` | PublicUserDocument | The user that is making this import request. | -| `userIntent` | boolean | Whether this import was performed with User Intent - See [Import Types](./import-types.md#User%20Intent) | +| `userIntent` | boolean | Whether this import was performed with User Intent - See [Import Types](./import-types.md#user-intent) | | `importType` | ImportType | What kind of import "type" this is. For more on this, see [Import Types](./import-types.md) | `InputParser` | Function | The parser function to call. For more info, see [Parsing and Converting](./parse-conv.md) | `providedImportObjects` (Optional) | { logger, importID } | Optionally, a logger and existing importID can be passed here. This is used for scenarios where the logger and importID have already been created before importMain was called. | diff --git a/docs/docs/codebase/overview.md b/docs/docs/codebase/overview.md index 385c3b8b5..19a7840c3 100644 --- a/docs/docs/codebase/overview.md +++ b/docs/docs/codebase/overview.md @@ -21,11 +21,12 @@ correspond to, how `thing` works, etc. ## Repos and Licenses -Tachi is made up of three components: +Tachi is made up of four components: - `tachi-common`: Common types and values for Tachi. [GitHub](https://github.com/zkldi/tachi-common). This is licensed under MIT. - `tachi-server`: The API, IR implementations and 'business logic' behind Tachi. [GitHub](https://github.com/zkldi/tachi-server). This is licensed under AGPLv3. - `tachi-client`: The front-end code for Tachi. This is closed source. +- `tachi-docs`: The documentation you're reading right now! [GitHub](https://github.com/zkldi/tachi-docs). This is licensed under MIT. ### What's with `tachi-client`? diff --git a/docs/docs/codebase/setup/config.md b/docs/docs/codebase/setup/config.md index 52bf159dc..be39c55db 100644 --- a/docs/docs/codebase/setup/config.md +++ b/docs/docs/codebase/setup/config.md @@ -19,7 +19,8 @@ the main benefits for us are as follows: ```js { - MONGO_BASE_URL: "127.0.0.1", + MONGO_CONNECTION_URL: "127.0.0.1:27017", + MONGO_DATABASE_NAME: "somedb", LOG_LEVEL: "info", CAPTCHA_SECRET_KEY: "google_given_secret_key", SESSION_SECRET: "some_secret_key", @@ -43,16 +44,22 @@ the main benefits for us are as follows: All properties are required. -### MONGO_BASE_URL +### MONGO_CONNECTION_URL - Type: String Where your MongoDB server is located. For most cases, this -is `127.0.0.1` or `localhost`. +is `127.0.0.1:27017` or `localhost:27017`. For more creative scenarios such as running through WSL, you might need to change this. +### MONGO_DATABASE_NAME + +- Type: String + +What collection to use for your database. + ### LOG_LEVEL - Type: Log Level diff --git a/docs/docs/codebase/structure/filesystem.md b/docs/docs/codebase/structure/filesystem.md index 65b9ee6f5..c6289b980 100644 --- a/docs/docs/codebase/structure/filesystem.md +++ b/docs/docs/codebase/structure/filesystem.md @@ -34,6 +34,14 @@ Various scripts for interacting with `tachi-server`, such as single-use scripts for importing some data, or frequently used scripts such as updating BMS tables. +!!! danger + The scripts in here are not regularly maintained, + **especially** the ones inside `single-use`. You should + **ABSOLUTELY NOT** run those if you do not know what + they do. + + Seriously, you could destroy your server. + ## TypeScript Source Code All of these are inside `/src`. @@ -127,8 +135,4 @@ in cases where an API call needs to do a lot of things. ## Test Files -Test files are to be located in the same folder as the file -they're testing, and should only ever test the exports -of one file. - -They should have the filename of the file they're testing, with the extension `.test.ts`. +This documentation has been moved to [its own page](./testing.md)! diff --git a/docs/docs/codebase/infrastructure/testing.md b/docs/docs/codebase/structure/testing.md similarity index 82% rename from docs/docs/codebase/infrastructure/testing.md rename to docs/docs/codebase/structure/testing.md index 966aaa7a9..2c6ac87ee 100644 --- a/docs/docs/codebase/infrastructure/testing.md +++ b/docs/docs/codebase/structure/testing.md @@ -18,6 +18,16 @@ pnpm fulltest This will execute every test, and also perform coverage analysis. +!!! bug + This may or may not impact you depending on how + dependencies install, but `tap` requires `ts-node` + and `typescript` to also be installed. + + Otherwise, you will get a + `cannot use import outside of module` + error, which indicates that our typescript hasn't + been transpiled. + ## Parallel Tests You can run tests in parallel with: diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index fe9d15ac9..5009618af 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -55,11 +55,11 @@ nav: - "codebase/infrastructure/toolchain.md" - "codebase/infrastructure/logging.md" - "codebase/infrastructure/branches.md" - - "codebase/infrastructure/testing.md" - Structure: - "codebase/structure/style.md" - "codebase/structure/filesystem.md" + - "codebase/structure/testing.md" - Score Importing: - "codebase/import/overview.md"