Skip to content

Commit

Permalink
Merge pull request #147 from brown-ccv/doc-ver-3
Browse files Browse the repository at this point in the history
refactor: update dependencies and change syntax details to support do…
  • Loading branch information
YUUU23 authored Jul 12, 2024
2 parents abffc88 + 9722df4 commit b45a5ed
Show file tree
Hide file tree
Showing 11 changed files with 9,175 additions and 5,148 deletions.
8 changes: 3 additions & 5 deletions docs/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Quick Start
description: Quick start guide for Honeycomb
---

import CodeBlock from "@theme/CodeBlock";
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

Expand Down Expand Up @@ -174,10 +173,9 @@ NVM (Node Version Manager) is a tool for installing and using multiple versions
</em>
</TabItem>
<TabItem value="mac" label="macOS">
<CodeBlock language="sh">
curl -o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
</CodeBlock>
```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
```
</TabItem>
</Tabs>

Expand Down
14,113 changes: 9,074 additions & 5,039 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"clear": "docusaurus clear"
},
"dependencies": {
"@docusaurus/core": "^2.4.0",
"@docusaurus/preset-classic": "^2.4.0",
"@docusaurus/theme-mermaid": "^2.4.1",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.2.1",
"docusaurus-lunr-search": "^3.3.2",
"react": "^17.0.0",
"react-dom": "^17.0.0"
"@docusaurus/core": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@docusaurus/theme-mermaid": "^3.4.0",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.1",
"docusaurus-lunr-search": "^3.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"browserslist": {
"production": [
Expand Down
18 changes: 9 additions & 9 deletions versioned_docs/version-3.0.0/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ title: Configuration

## Environment Variables

Honeycomb uses environment variables during **build** and **run** time to control the different configurations. Below we list the environment variables used by the app and indicate their properties via badges and text. Optional variables are labeled with the ![optional](https://img.shields.io/badge/-optional-yellow) badge and mandatory variables are labeled with the ![default <default-value>](https://img.shields.io/badge/default-<defaultvalue>-yellow) badge with their default value specified. The ![buildtime](https://img.shields.io/badge/-buildtime-blue) badge indicates the variable is used during the build/compilation phase (`npm build`) while the ![runtime](https://img.shields.io/badge/-runtime-purple) badge indicates the variable is used during the executable run (`npm run dev`).
Honeycomb uses environment variables during **build** and **run** time to control the different configurations. Below we list the environment variables used by the app and indicate their properties via badges and text. Optional variables are labeled with the ![optional](https://img.shields.io/badge/-optional-yellow) badge and mandatory variables are labeled with the ![default `<default-value>`](https://img.shields.io/badge/default-<defaultvalue>-yellow) badge with their default value specified. The ![buildtime](https://img.shields.io/badge/-buildtime-blue) badge indicates the variable is used during the build/compilation phase (`npm build`) while the ![runtime](https://img.shields.io/badge/-runtime-purple) badge indicates the variable is used during the executable run (`npm run dev`).

### Dev Mode Only

- `ELECTRON_START_URL` ![string](https://img.shields.io/badge/-string-grey)![optional](https://img.shields.io/badge/-optional-yellow): URL (e.g. `http://localhost:3000`) where the front end of the app is being hosted - also used in `electron.js` to indicate the app is running in dev mode.

### Desktop Only

- `EVENT_MARKER_PRODUCT_ID`![string](https://img.shields.io/badge/-string-grey)![optional](https://img.shields.io/badge/-optional-yellow)![runtime](https://img.shields.io/badge/-runtime-purple): The product ID of the event marker (e.g. `0487`). If not set, it will use the `productID` set in `public/config/trigger.js` if available, or attempt to connect using the com name.
- `EVENT_MARKER_COM_NAME` ![string](https://img.shields.io/badge/-string-grey)![optional](https://img.shields.io/badge/-optional-yellow)![runtime](https://img.shields.io/badge/-runtime-purple): The com name of the event marker (e.g. `COM3`). If not set, it will use the `comName` set in `public/config/trigger.js`. If the `productID` is set (not an empty string), this field will be ignored.
- `EVENT_MARKER_PRODUCT_ID`![string](https://img.shields.io/badge/-string-grey)![optional](https://img.shields.io/badge/-optional-yellow)![runtime](https://img.shields.io/badge/-runtime-purple): The product ID of the event marker (e.g. `0487`). If not set, it will use the `productID` set in `public/config/trigger.js` if available, or attempt to connect using the com name.
- `EVENT_MARKER_COM_NAME` ![string](https://img.shields.io/badge/-string-grey)![optional](https://img.shields.io/badge/-optional-yellow)![runtime](https://img.shields.io/badge/-runtime-purple): The com name of the event marker (e.g. `COM3`). If not set, it will use the `comName` set in `public/config/trigger.js`. If the `productID` is set (not an empty string), this field will be ignored.
- `REACT_APP_VIDEO`![boolean](https://img.shields.io/badge/-boolean-lightgrey)![default false](https://img.shields.io/badge/default-false-yellow)![buildtime](https://img.shields.io/badge/-buildtime-blue): whether the participant is being video recorded. This can be used when the task is running as a desktop app (electron).
- `REACT_APP_USE_EEG`![boolean](https://img.shields.io/badge/-boolean-lightgrey)![default false](https://img.shields.io/badge/default-false-yellow)![buildtime](https://img.shields.io/badge/-buildtime-blue): whether the event marker/EEG is available. This can be used when the task is running as a desktop app (electron).
- `REACT_APP_USE_PHOTODIODE`![boolean](https://img.shields.io/badge/-boolean-lightgrey)![default false](https://img.shields.io/badge/default-false-yellow)![buildtime](https://img.shields.io/badge/-buildtime-blue): whether the photodiode is in use. This can be used when the task is running as a desktop app (electron).
Expand All @@ -31,30 +31,30 @@ Honeycomb uses environment variables during **build** and **run** time to contro

- ![build time](https://img.shields.io/badge/-buildtime-blue): Build-time environment variable are configured before the application is built and cannot be changed at run-time. They are configured via `.env` files before building. Instead of using a single `.env` file, we prefer to defined separate files under the `env/` directory, and use a package called `dotenv-cli` before building`.

The `dotenv-cli` comes with the `dotenv` command that can be used to properly load the needed variables. This command does not run directly from the command line (terminal). Instead, to set build-time environment variables, we need to add a script to `package.json` with the following format:
The `dotenv-cli` comes with the `dotenv` command that can be used to properly load the needed variables. This command does not run directly from the command line (terminal). Instead, to set build-time environment variables, we need to add a script to `package.json` with the following format:

```json
"[build|dev]:<script name>": "dotenv -e env/<your env file> npm run [build|dev]"
```

Honeycomb includes so scripts for common scenarios. For instance, you can run:

``` console
```console
npm run dev:home
```

``` console
```console
npm run dev:home:video
```

``` console
```console
npm run dev:clinic
```

``` console
```console
npm run dev:clinic:video
```

``` console
```console
npm run dev:firebase
```
4 changes: 2 additions & 2 deletions versioned_docs/version-3.0.0/setup_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In addition, Honeycomb relies on Electron to package the cross-platform desktop

### Brew

All of the required dependencies for honeycomb on MacOS can be installed via the brewfile. See the [quick start](quick_start.md/#installing-prerequisites-with-homebrew-for-macos) for more information.
All of the required dependencies for honeycomb on MacOS can be installed via the brewfile. See the [quick start](quick_start.md#installing-prerequisites-with-homebrew-for-macos) for more information.

### Manual Installation (MacOS)

Expand Down Expand Up @@ -59,7 +59,7 @@ Running `choco install chocolatey.config` is the equivalent of calling `choco in

### Python on Windows (pyenv)

Installing and managing Python on Windows is a notoriously difficult task even for advanced developers. It is best practice to have exactly 1 tool for managing python on your system, which is a rule for most things in software development (this is what [npm](quick_start.md/#3-install-npm-packages) does for node packages). **We highly recommend uninstalling Python and using pyenv even if you never anticipate using python again.** We promise the extra setup today will pay great dividends in the future!
Installing and managing Python on Windows is a notoriously difficult task even for advanced developers. It is best practice to have exactly 1 tool for managing python on your system, which is a rule for most things in software development (this is what [npm](quick_start.md#3-install-npm-packages) does for node packages). **We highly recommend uninstalling Python and using pyenv even if you never anticipate using python again.** We promise the extra setup today will pay great dividends in the future!

First and foremost, turn off both Python App Installers in the "App Execution Aliases" settings. **Please complete this step even if you already have a Python manager**

Expand Down
4 changes: 1 addition & 3 deletions versioned_docs/version-3.1.x/environment_variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Environment Variables
description: Overview of environment variables used by Honeycomb
---

Honeycomb uses environment variables during **build** and **run** time to control the different configurations. Below we list the environment variables used by the app and indicate their properties via badges and text. Optional variables are labeled with the ![optional](https://img.shields.io/badge/-optional-yellow) badge and mandatory variables are labeled with the ![default <default-value>](https://img.shields.io/badge/default-<defaultvalue>-yellow) badge with their default value specified. The ![buildtime](https://img.shields.io/badge/-buildtime-blue) badge indicates the variable is used during the build/compilation phase (`npm build`) while the ![runtime](https://img.shields.io/badge/-runtime-purple) badge indicates the variable is used during the executable run (`npm run dev`).
Honeycomb uses environment variables during **build** and **run** time to control the different configurations. Below we list the environment variables used by the app and indicate their properties via badges and text. Optional variables are labeled with the ![optional](https://img.shields.io/badge/-optional-yellow) badge and mandatory variables are labeled with the ![default `<default-value>`](https://img.shields.io/badge/default-<defaultvalue>-yellow) badge with their default value specified. The ![buildtime](https://img.shields.io/badge/-buildtime-blue) badge indicates the variable is used during the build/compilation phase (`npm build`) while the ![runtime](https://img.shields.io/badge/-runtime-purple) badge indicates the variable is used during the executable run (`npm run dev`).

### Dev Mode Only

Expand All @@ -27,12 +27,10 @@ Honeycomb uses environment variables during **build** and **run** time to contro

## Understanding Build-Time and Run-Time Variables


- ![runtime](https://img.shields.io/badge/-runtime-purple): Run-time environment variables allow for quick changes before running the task. They are convenient since they don't require building a whole different executable. For a Desktop Application, these are set at the system level and must be available at the time where the task runs. See [this tutorial for OS specific instructions.](https://www.imatest.com/docs/editing-system-environment-variables/#Windows). For a Firebase Application, these must be stored in the Firestore.

- ![build time](https://img.shields.io/badge/-buildtime-blue): Build-time environment variables are configured before the application is built and cannot be changed at run-time. They are configured via `.env` files before building. Instead of using a single `.env` file, we prefer to define separate files under the `env/` directory, and use a package called `dotenv-cli` before building`.


The `dotenv-cli` comes with the `dotenv` command that can be used to properly load the needed variables. We write our npm scripts with the following format:

```json title="package.json"
Expand Down
7 changes: 3 additions & 4 deletions versioned_docs/version-3.1.x/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ description: Quick start guide for Honeycomb

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import cloneCodeButton from "./assets/clone-code-button.webp";
import nvmrc from "./assets/nvmrc.png";
import workflowPermissions from "./assets/workflow-permissions.png";
Expand Down Expand Up @@ -170,9 +169,9 @@ NVM (Node Version Manager) is a tool for installing and using multiple versions
value="mac"
label="macOS"
>
<CodeBlock language="sh">
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
</CodeBlock>
```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
```
</TabItem>
</Tabs>

Expand Down
7 changes: 3 additions & 4 deletions versioned_docs/version-3.2.x/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ description: Quick start guide for Honeycomb

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import cloneCodeButton from "./assets/clone-code-button.webp";
import nvmrc from "./assets/nvmrc.png";
import workflowPermissions from "./assets/workflow-permissions.png";
Expand Down Expand Up @@ -170,9 +169,9 @@ NVM (Node Version Manager) is a tool for installing and using multiple versions
value="mac"
label="macOS"
>
<CodeBlock language="sh">
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
</CodeBlock>
```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
```
</TabItem>
</Tabs>

Expand Down
7 changes: 3 additions & 4 deletions versioned_docs/version-3.3.x/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Quick Start
description: Quick start guide for Honeycomb
---

import CodeBlock from "@theme/CodeBlock";
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

Expand Down Expand Up @@ -188,9 +187,9 @@ NVM (Node Version Manager) is a tool for installing and using multiple versions
value="mac"
label="macOS"
>
<CodeBlock language="sh">
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
</CodeBlock>
```shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
```
</TabItem>
</Tabs>

Expand Down
115 changes: 57 additions & 58 deletions versioned_sidebars/version-1.1.0-sidebars.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
{
"version-1.1.0/someSidebar": [
{
"collapsed": true,
"type": "category",
"label": "Overview",
"items": [
{
"type": "doc",
"id": "version-1.1.0/intro"
},
{
"type": "doc",
"id": "version-1.1.0/folders"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "HowTo",
"items": [
{
"type": "doc",
"id": "version-1.1.0/quick_start"
},
{
"type": "doc",
"id": "version-1.1.0/version_control"
},
{
"type": "doc",
"id": "version-1.1.0/ci"
},
{
"type": "doc",
"id": "version-1.1.0/configuration"
},
{
"type": "doc",
"id": "version-1.1.0/event_triggers"
},
{
"type": "doc",
"id": "version-1.1.0/online_integration"
},
{
"type": "doc",
"id": "version-1.1.0/troubleshooting"
},
{
"type": "doc",
"id": "version-1.1.0/npm_scripts"
}
]
}
]
}

"someSidebar": [
{
"collapsed": true,
"type": "category",
"label": "Overview",
"items": [
{
"type": "doc",
"id": "intro"
},
{
"type": "doc",
"id": "folders"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "HowTo",
"items": [
{
"type": "doc",
"id": "quick_start"
},
{
"type": "doc",
"id": "version_control"
},
{
"type": "doc",
"id": "ci"
},
{
"type": "doc",
"id": "configuration"
},
{
"type": "doc",
"id": "event_triggers"
},
{
"type": "doc",
"id": "online_integration"
},
{
"type": "doc",
"id": "troubleshooting"
},
{
"type": "doc",
"id": "npm_scripts"
}
]
}
]
}
24 changes: 12 additions & 12 deletions versioned_sidebars/version-2.x-sidebars.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"version-2.x/someSidebar": [
"someSidebar": [
{
"collapsed": true,
"type": "category",
"label": "Overview",
"items": [
{
"type": "doc",
"id": "version-2.x/intro"
"id": "intro"
},
{
"type": "doc",
"id": "version-2.x/folders"
"id": "folders"
}
]
},
Expand All @@ -22,39 +22,39 @@
"items": [
{
"type": "doc",
"id": "version-2.x/quick_start"
"id": "quick_start"
},
{
"type": "doc",
"id": "version-2.x/version_control"
"id": "version_control"
},
{
"type": "doc",
"id": "version-2.x/firebase"
"id": "firebase"
},
{
"type": "doc",
"id": "version-2.x/ci"
"id": "ci"
},
{
"type": "doc",
"id": "version-2.x/configuration"
"id": "configuration"
},
{
"type": "doc",
"id": "version-2.x/event_triggers"
"id": "event_triggers"
},
{
"type": "doc",
"id": "version-2.x/online_integration"
"id": "online_integration"
},
{
"type": "doc",
"id": "version-2.x/troubleshooting"
"id": "troubleshooting"
},
{
"type": "doc",
"id": "version-2.x/npm_scripts"
"id": "npm_scripts"
}
]
}
Expand Down

0 comments on commit b45a5ed

Please sign in to comment.