add contribute & modify contribute md

This commit is contained in:
jinli.yl 2024-09-04 11:46:11 +08:00
parent a34cab13ba
commit 66ddfc7bc0
5 changed files with 49 additions and 5 deletions

View file

@ -102,7 +102,7 @@ poetry install --with dev
pre-commit install
```
Please refer to our [Contribution Guide](./docs/contribute.md) for more details.
## 📖 Citation

View file

@ -113,7 +113,7 @@ poetry install --with dev
pre-commit install
```
Please refer to our [Contribution Guide](./docs/contribute_zh.md) for more details.
请参阅我们的[贡献指南](./docs/contribute_zh.md) 了解更多详细信息。
## 📖 引用

42
docs/contribute.md Normal file
View file

@ -0,0 +1,42 @@
# Contribute to MemoryScope
Our community thrives on the diverse ideas and contributions of its members. Whether you're fixing a bug, adding a new feature, improving the documentation, or adding examples, your help is welcome. Here's how you can contribute:
## Report Bugs and Ask For New Features?
Did you find a bug or have a feature request? Please first check the issue tracker to see if it has already been reported. If not, feel free to open a new issue. Include as much detail as possible:
- A descriptive title
- Clear description of the issue
- Steps to reproduce the problem
- Version of the MemoryScope you are using
- Any relevant code snippets or error messages
## Contribute to Codebase
### Fork and Clone the Repository
To work on an issue or a new feature, start by forking the MemoryScope repository and then cloning your fork locally.
```bash
git clone https://github.com/your-username/memoryscope.git
cd memoryscope
```
### Create a New Branch
Create a new branch for your work. This helps keep proposed changes organized and separate from the `master` branch.
```bash
git checkout -b your-feature-branch-name
```
### Making Changes
With your new branch checked out, you can now make your changes to the code. Remember to keep your changes as focused as possible. If you're addressing multiple issues or features, it's better to create separate branches and pull requests for each.
We provide a developer version with additional `pre-commit` hooks to perform format checks compared to the official version:
```bash
# Install the developer version
pip install -e .
# Install pre-commit hooks
pre-commit install
```
### Commit Your Changes
Once you've made your changes, it's time to commit them. Write clear and concise commit messages that explain your changes.
```bash
git add -A
git commit -m "A brief description of the changes"
```
You might get some error messages raised by `pre-commit`. Please resolve them according to the error code and commit again.
### Submit a Pull Request
When you're ready for feedback, submit a pull request to the MemoryScope `master` branch. In your pull request description, explain the changes you've made and any other relevant context.
We will review your pull request. This process might involve some discussion, additional changes on your part, or both.
### Code Review
Wait for us to review your pull request. We may suggest some changes or improvements. Keep an eye on your GitHub notifications and be responsive to any feedback.

View file

@ -39,7 +39,7 @@ git checkout -b your-feature-branch-name
```bash
# 安装开发者版本
pip install -e .[dev]
pip install -e .
# 安装 pre-commit 钩子
pre-commit install
```
@ -49,7 +49,7 @@ pre-commit install
修改完成之后就是提交它们的时候了。请提供清晰而简洁的提交信息,以解释您的修改内容。
```bash
git add -U
git add -A
git commit -m "修改内容的简要描述"
```

View file

@ -11,7 +11,9 @@ twine upload dist/*
rm -rf dist build && python setup.py sdist bdist_wheel && twine upload dist/*
"""
import setuptools, glob, os
import os
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()