Skip to content

Commit

Permalink
Contributing Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Feb 19, 2025
1 parent d059d8a commit b47071a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4,452 deletions.
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"label": "start",
"type": "shell",
"command": "poetry install --no-root && poetry run uvicorn src.main:app --reload",
"command": "uv sync && uv run fastapi dev src/main.py",
"group": "none",
"presentation": {
"reveal": "always",
Expand Down
17 changes: 8 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# honcho-docs
# Honcho Docs

## Setting Up `honcho-docs` Locally
These docs are built using Next.js via mintlify.

## Setting Up Honcho's Docs Locally

1. Clone the repository:
```
git clone [email protected]:plastic-labs/honcho-docs.git
git clone [email protected]:plastic-labs/honcho.git
```

2. Navigate into the `honcho-docs` folder:
2. Navigate into the `docs` folder:
```
cd honcho-docs/
cd honcho/docs/
```
The docs folder contains the markdown files that make up the documentation. The majority of the files are in the pages directory. Some notable files in this folder include:

`index.mdx`: The main documentation file.
`_app.js`: This file is used to customize the default Next.js application shell.
`theme.config.jsx`: This file is for configuring the Nextra theme for the documentation.

3. Verify that you have Node.js and npm installed in your system. You can check by running:
```
Expand All @@ -30,7 +29,7 @@ npm --version
npm install -g pnpm
```

6. Install the project dependencies using yarn:
6. Install the project dependencies using pnpm:
```
pnpm i
```
Expand Down
26 changes: 16 additions & 10 deletions docs/contributing/self-hosting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ icon: 'cloud'
### Prerequisites and Dependencies

Honcho is developed using [python](https://www.python.org/) and [poetry](https://python-poetry.org/).
Honcho is developed using [python](https://www.python.org/) and [uv](https://docs.astral.sh/uv/).

The minimum python version is `3.9`
The minimum poetry version is `1.4.1`
The minimum poetry version is `0.4.9`

### Setup

Expand All @@ -29,16 +29,22 @@ git clone https://github.com/plastic-labs/honcho.git
2. Enter the repository and install the python dependencies

We recommend using a virtual environment to isolate the dependencies for Honcho
from other projects on the same system. With `poetry` a virtual environment can
be generated using the `poetry shell` command. Once the virtual environment is
created and activated install the dependencies with `poetry install`
from other projects on the same system. `uv` will create a virtual environment
when you sync your dependencies in the project.

Putting this together:

```bash
cd honcho
poetry shell
poetry install
uv sync
```

This will create a virtual environment and install the dependencies for Honcho.
The default virtual environment will be located at `honcho/.venv`. Activate the
virtual environment via:

```bash
source honcho/.venv/bin/activate
```

3. Set up a database
Expand All @@ -61,7 +67,8 @@ Below are the required configurations

```env
CONNECTION_URI= # Connection uri for a postgres database
OPENAI_API_KEY= # API Key for OpenAI used for insights
OPENAI_API_KEY= # API Key for OpenAI used for embedding documents
ANTHROPIC_API_KEY= # API Key for Anthropic used for the deriver and dialectic API
```
> Note that the `CONNECTION_URI` must have the prefix `postgresql+psycopg` to
> function properly. This is a requirement brought by `sqlalchemy`
Expand All @@ -72,7 +79,6 @@ set to false.

```env
USE_AUTH_SERVICE=false
OPENTELEMETRY_ENABLED=false
SENTRY_ENABLED=false
```

Expand All @@ -83,7 +89,7 @@ and the environment variables setup you can now launch a local instance of
Honcho. The following command will launch the storage API for Honcho

```bash
python -m uvicorn src.main:app --reload --port 8000
fastapi dev src/main.py
```
This is a development server that will reload whenever code is changed. When
first launching the API with a connection the database it will provision the
Expand Down
Loading

0 comments on commit b47071a

Please sign in to comment.