From 66ddfc7bc02eb7645c9d2bede2ff31311f4cff90 Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Wed, 4 Sep 2024 11:46:11 +0800 Subject: [PATCH] add contribute & modify contribute md --- README.md | 2 +- README_ZH.md | 2 +- docs/contribute.md | 42 ++++++++++++++++++++++++++++++++++++++++++ docs/contribute_zh.md | 4 ++-- setup.py | 4 +++- 5 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 docs/contribute.md diff --git a/README.md b/README.md index 5d34a7b9..fa0d8395 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ poetry install --with dev pre-commit install ``` - +Please refer to our [Contribution Guide](./docs/contribute.md) for more details. ## 📖 Citation diff --git a/README_ZH.md b/README_ZH.md index aadc7737..e9302462 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -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) 了解更多详细信息。 ## 📖 引用 diff --git a/docs/contribute.md b/docs/contribute.md new file mode 100644 index 00000000..d750e56e --- /dev/null +++ b/docs/contribute.md @@ -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. \ No newline at end of file diff --git a/docs/contribute_zh.md b/docs/contribute_zh.md index 168bc3dd..2bc6414d 100644 --- a/docs/contribute_zh.md +++ b/docs/contribute_zh.md @@ -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 "修改内容的简要描述" ``` diff --git a/setup.py b/setup.py index 5a64f173..8dffd2a4 100644 --- a/setup.py +++ b/setup.py @@ -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()