danswer/CONTRIBUTING_MACOS.md

37 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2024-09-07 14:05:36 -07:00
## Some additional notes for Mac Users
2024-12-13 09:48:43 -08:00
The base instructions to set up the development environment are located in [CONTRIBUTING.md](https://github.com/onyx-dot-app/onyx/blob/main/CONTRIBUTING.md).
2024-09-07 14:05:36 -07:00
### Setting up Python
2024-12-13 09:48:43 -08:00
2024-09-07 14:05:36 -07:00
Ensure [Homebrew](https://brew.sh/) is already set up.
Then install python 3.11.
2024-12-13 09:48:43 -08:00
2024-09-07 14:05:36 -07:00
```bash
brew install python@3.11
```
Add python 3.11 to your path: add the following line to ~/.zshrc
2024-12-13 09:48:43 -08:00
2024-09-07 14:05:36 -07:00
```
export PATH="$(brew --prefix)/opt/python@3.11/libexec/bin:$PATH"
```
> **Note:**
> You will need to open a new terminal for the path change above to take effect.
### Setting up Docker
2024-12-13 09:48:43 -08:00
On macOS, you will need to install [Docker Desktop](https://www.docker.com/products/docker-desktop/) and
ensure it is running before continuing with the docker commands.
2024-09-07 14:05:36 -07:00
### Formatting and Linting
2024-12-13 09:48:43 -08:00
2024-09-07 14:05:36 -07:00
MacOS will likely require you to remove some quarantine attributes on some of the hooks for them to execute properly.
After installing pre-commit, run the following command:
2024-12-13 09:48:43 -08:00
2024-09-07 14:05:36 -07:00
```bash
sudo xattr -r -d com.apple.quarantine ~/.cache/pre-commit
2024-12-13 09:48:43 -08:00
```