-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from junghoon-vans/docs/add-contributing-guide…
…lines docs: Add contributing guidelines
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
Contributing | ||
=== | ||
|
||
All contributions are welcome, including new features, bug fixes, and documentation improvements. | ||
Please follow the guidelines below to make the contribution process as smooth as possible. | ||
|
||
Style guide | ||
--- | ||
|
||
### Branch Naming | ||
|
||
We use the [Git-Flow](https://nvie.com/posts/a-successful-git-branching-model/) branching model. | ||
The branch names are prefixed with `feature/`, `bugfix/`, `hotfix/`, `docs/` or `ci/`. | ||
The `main` branch is the stable branch. Your pull requests should be made against the `main` branch. | ||
|
||
### Commit Convention | ||
|
||
All of commits should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) convention. | ||
This convention is used to generate the changelog and bump project version by `commitizen`. | ||
So, please follow the convention when you commit. | ||
|
||
### Code Style | ||
|
||
All of code should follow the [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/). | ||
The [pre-commit](https://pre-commit.com) hooks are defined in [pre-commit](.pre-commit-config.yaml) config file. | ||
The hooks will check and format the code style automatically when you commit. | ||
If you don't know how to use pre-commit, please refer [pre-commit documentation](https://pre-commit.com/#usage). | ||
|
||
### Pull Request | ||
|
||
The title of the pull request should be the same as the title of the branch. | ||
If branch name is `feature/awesome-feature`, the title of the pull request should be `feat: awesome feature`. | ||
|
||
Dependency Management | ||
--- | ||
|
||
We use [poetry](https://python-poetry.org/) for dependency management. | ||
Our dependencies are defined in [pyproject.toml](pyproject.toml) file and [poetry.lock](poetry.lock) file. | ||
Do not edit this file manually. If you want to add or remove dependencies, please use `poetry add` or `poetry remove` command. | ||
|
||
### Activate virtual environment | ||
|
||
```bash | ||
poetry shell | ||
``` | ||
|
||
This command will activate the virtual environment and install all dependencies. | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
poetry install | ||
``` | ||
|
||
**Do not use `pip install` command.** | ||
If you want to install dependencies for production, use `poetry install` command. | ||
|
||
```bash | ||
poetry install --with <group> | ||
``` | ||
|
||
Use `--with` option to install dependencies for specific group. | ||
If `all` keyword is used, all dependencies will be installed. | ||
|
||
Our dependencies are divided into 3 groups: `dev`, `test`, and `docs`. | ||
|
||
- `dev`: dependencies for development | ||
- `test`: dependencies for testing | ||
- `docs`: dependencies for documentation | ||
|
||
How to develop | ||
--- | ||
|
||
> Note: The poetry are required to contribute this project. | ||
> If you don't know how to use it, please refer [dependency management](#dependency-management) section. | ||
1. Fork the repository on GitHub | ||
2. Create a branch for the new feature | ||
3. Make your changes, committing at logical breaks | ||
4. Push your changes to a topic branch in your fork of the repository. | ||
5. Submit a pull request to the original repository | ||
|
||
Versioning | ||
--- | ||
|
||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the tags on this repository. | ||
The version bump is done by `commitizen` and the Github Actions. If you want to see this mechanism, | ||
please refer our [bump-version](.github/workflows/bump-version.yml) action | ||
or commitizen [documentation](https://commitizen-tools.github.io/commitizen/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters