Add contribution docs (#2294)
This commit is contained in:
87
docs/contributing/development.mdx
Normal file
87
docs/contributing/development.mdx
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
---
|
||||||
|
title: Development
|
||||||
|
icon: "code"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Development Contributions
|
||||||
|
|
||||||
|
We strive to make contributions **easy, collaborative, and enjoyable**. Follow the steps below to ensure a smooth contribution process.
|
||||||
|
|
||||||
|
## Submitting Your Contribution through PR
|
||||||
|
|
||||||
|
To contribute, follow these steps:
|
||||||
|
|
||||||
|
1. **Fork & Clone** the repository: [Mem0 on GitHub](https://github.com/mem0ai/mem0)
|
||||||
|
2. **Create a Feature Branch**: Use a dedicated branch for your changes, e.g., `feature/my-new-feature`
|
||||||
|
3. **Implement Changes**: If adding a feature or fixing a bug, ensure to:
|
||||||
|
- Write necessary **tests**
|
||||||
|
- Add **documentation, docstrings, and runnable examples**
|
||||||
|
4. **Code Quality Checks**:
|
||||||
|
- Run **linting** to catch style issues
|
||||||
|
- Ensure **all tests pass**
|
||||||
|
5. **Submit a Pull Request** 🚀
|
||||||
|
|
||||||
|
For detailed guidance on pull requests, refer to [GitHub's documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📦 Dependency Management
|
||||||
|
|
||||||
|
We use `poetry` as our package manager. Install it by following the [official instructions](https://python-poetry.org/docs/#installation).
|
||||||
|
|
||||||
|
⚠️ **Do NOT use `pip` or `conda` for dependency management.** Instead, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make install_all
|
||||||
|
|
||||||
|
# Activate virtual environment
|
||||||
|
poetry shell
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠️ Development Standards
|
||||||
|
|
||||||
|
### ✅ Pre-commit Hooks
|
||||||
|
|
||||||
|
Ensure `pre-commit` is installed before contributing:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pre-commit install
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🔍 Linting with `ruff`
|
||||||
|
|
||||||
|
Run the linter and fix any reported issues before submitting your PR:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🎨 Code Formatting with `black`
|
||||||
|
|
||||||
|
To maintain a consistent code style, format your code using `black`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make format
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🧪 Testing with `pytest`
|
||||||
|
|
||||||
|
Run tests to verify functionality before submitting your PR:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
💡 **Note:** Some dependencies have been removed from Poetry to reduce package size. Run `make install_all` to install necessary dependencies before running tests.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Release Process
|
||||||
|
|
||||||
|
Currently, releases are handled manually. We aim for frequent releases, typically when new features or bug fixes are introduced.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Thank you for contributing to Mem0! 🎉
|
||||||
55
docs/contributing/documentation.mdx
Normal file
55
docs/contributing/documentation.mdx
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
title: Documentation
|
||||||
|
icon: "book"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Documentation Contributions
|
||||||
|
|
||||||
|
## 📌 Prerequisites
|
||||||
|
|
||||||
|
Before getting started, ensure you have **Node.js (version 23.6.0 or higher)** installed on your system.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 Setting Up Mintlify
|
||||||
|
|
||||||
|
### Step 1: Install Mintlify
|
||||||
|
|
||||||
|
Install Mintlify globally using your preferred package manager:
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash npm
|
||||||
|
npm i -g mintlify
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash yarn
|
||||||
|
yarn global add mintlify
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
### Step 2: Run the Documentation Server
|
||||||
|
|
||||||
|
Navigate to the `docs/` directory (where `docs.json` is located) and start the development server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mintlify dev
|
||||||
|
```
|
||||||
|
|
||||||
|
The documentation website will be available at: [http://localhost:3000](http://localhost:3000).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Custom Ports
|
||||||
|
|
||||||
|
By default, Mintlify runs on **port 3000**. To use a different port, add the `--port` flag:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mintlify dev --port 3333
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
By following these steps, you can efficiently contribute to **Mem0's documentation**. Happy documenting! ✍️
|
||||||
|
|
||||||
@@ -155,6 +155,14 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"group": "Contribution",
|
||||||
|
"icon": "handshake",
|
||||||
|
"pages": [
|
||||||
|
"contributing/development",
|
||||||
|
"contributing/documentation"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user