diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15323f7e3..ab4a25d51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,70 +1,206 @@ -# Contributing +First of all, I would like to give you a thumbs up 👍🏻 for choosing to contribute to the open source community. Also, thank you very much for choosing to participate in the VisActor community and contribute to this open source project. -## Code of Conduct +## VChart Contribution Guide -We has adopted [the Contributor Covenant](CODE_OF_CONDUCT.md) as our Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated. +The VisActor team usually develops and maintains issues on GitHub. Please open the [GitHub website](https://github.com/), click the `Sign up `button in the upper right corner, register your own account, and take the first step in your open source journey. -## Open Development +If you cannot open the Github site due to special circumstances, please inform us and proceed with project development through [Gitee](https://gitee.com/VisActor/VChart). -All work on VChart happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process. +In the [VChart repository](https://github.com/VisActor/VChart), we have a [guide ](https://github.com/VisActor/VChart/blob/develop/CONTRIBUTING.md)for all open source contributors on versioning, branching, and more. **Please take a few minutes to read about it** . -## Semantic Versioning +## Your first PullRequest -VChart follows [semantic versioning](https://semver.org/). We release patch versions for critical bugfixes, minor versions for new features or non-essential changes, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance. +### Step 0: Install Git -Every significant change is documented in the changelog file. +Git is a version control system used to track and manage code changes in software development projects. It helps developers record and manage the history of code, facilitating team collaboration, code version control, merging code, and other operations. With Git, you can track each version of each file and easily switch and compare between different versions. Git also provides branch management functionality, allowing for multiple parallel development tasks to be performed simultaneously. -## Branch Organization +- Visit the official Git website: [https://git-scm.com](https://git-scm.com/) +- Download the latest version of the Git installer. +- Run the downloaded installation program and follow the prompts of the installation wizard to install. +- After the installation is complete, you can use the Command Line command `git version `to confirm the installation is successful. -Submit all changes directly to the develop branch. The main branch represents the latest production version of the project. We do our best to keep the main and develop branch in good shape, with all tests passing. +### Step 1: Fork the project -Code that lands in main must be compatible with the latest stable release. It may contain additional features, but no breaking changes. We should be able to release a new minor version from the tip of main at any time. +- First, you need to fork this project, enter the [VChart project page](https://github.com/VisActor/VChart), and click the Fork button in the upper right corner -## Bugs +![](/vchart/guide/contribution-guide/fork.PNG) -We are using [GitHub Issues](https://github.com/VisActor/VChart/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist. +- The project Your_Github_Username/vchart will appear in your GitHub account +- Use the following command on your local computer: Get a VChart folder -We have already prepared issue templates for bug reports and feature requests. If you want to fire an issue, just enter the [New issue](https://github.com/VisActor/VChart/issues/new/choose) page and select either of them to get started. The best way to get your bug fixed is by using our issue template and provide reproduction steps with this [template](https://github.com/VisActor/VChart/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D+). +``` +// ssh +git clone git@github.com:Your_Github_Username/VChart.git +// https +git clone https://github.com/Your_Github_Username/VChart.git +``` -## Proposing a Change +### Step 2: Get the project code -If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend filing an issue, or just enter the [New issue](https://github.com/VisActor/VChart/issues/new/choose) page and select either of them to get started. +- Go to the VChart folder and add the remote address of the VChart -If you’re only fixing a bug, it’s fine to submit a pull request right away but we still recommend to file an issue detailing what you’re fixing. This is helpful in case we don’t accept that specific fix but want to keep track of the issue. +``` +git remote add upstream https://github.com/VisActor/VChart.git +``` -## Your First Pull Request +- Get the latest source code of VChart -Working on your first Pull Request? You can learn how from this free video series:[How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) +``` +git pull upstream develop +``` -To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first issues](https://github.com/VisActor/VChart/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) that contain bugs that have a relatively limited scope. This is a great place to get started. +### Step 3: Create a branch -If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don’t accidentally duplicate your effort. +- Okay, now we can start contributing our code. The default branch of VChart is the develop branch. Whether it's feature development, bug fixing, or documentation writing, please create a new branch and merge it into the develop branch. Use the following code to create a branch: -If somebody claims an issue but doesn’t follow up for more than two weeks, it’s fine to take it over but you should still leave a comment. +``` +// Create a feature development branch +git checkout -b feat/xxxx -### Sending a Pull Request +// Create a issue-fix development branch +git checkout -b fix/xxxx -The core team is monitoring for pull requests. We will review your pull request and either merge it, request changes to it, or close it with an explanation. We’ll do our best to provide updates and feedback throughout the process. +// Create documentation and demo branches +git checkout -b docs/add-funnel-demo +``` -**Before submitting a pull request**, please make sure the following is done: +Suppose we create a document modification branch `docs/add-fund-demo` -1. Fork the [repository](git@github.com:VisActor/VChart.git) and create your branch from `develop`. -2. (If rush has been install, just go to step 3) global install [@microsoft/rush](https://rushjs.io/pages/intro/get_started/):`npm i --global @microsoft/rush`. -3. Run `rush update` in the repository root. -4. If you’ve fixed a bug or added code that should be tested, add tests! -5. Ensure the test suite passes (`rush test`). -6. If you've modified sources code(The code in `src/` folder), make sure you've run `rush change`, and commit the rush changelog in `common/changes`. -7. Run `rush compile` for typescript check. Tip: we will also do this check in github workflow. +- Now we can change the code on the branch -## Development Workflow +- Assuming we have added some code and submitted it to the codebase -After cloning VChart, run `rush update` to fetch its dependencies. Then, you can run several commands: +- Git commit -a -m "docs: add custom funnel demo and related docs". The commit information of VisActor follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)specification -1. `rush start` runs VChart test page locally. -2. `rush react` runs React VChart test page locally. -3. `rush eslint` checks the code style. -4. `rush test` runs the complete test suite. -5. `rush run -p -s