Skip to content

Commit

Permalink
Merge pull request #52 from junghoon-vans/docs/add-contributing-guide…
Browse files Browse the repository at this point in the history
…lines

docs: Add contributing guidelines
  • Loading branch information
junghoon-vans authored Jan 6, 2023
2 parents 67c5d30 + deded45 commit b77f056
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
89 changes: 89 additions & 0 deletions CONTRIBUTING.md
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/).
23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ Github Actions
varST can be integrated with ``Github Actions``.
Please refer to this link_ and apply it to your own workflows.

Contributing
============

Contribution Guideline
----------------------

Please read the |contributing guidelines|_ to learn how to contribute to this project.

Reporting Issues
----------------

If you have any questions, suggestions, or bug reports, please feel free to report them to the issue.

Code of Conduct
---------------

This project is governed by the |code of conduct|_.

License
=======

Expand All @@ -45,3 +63,8 @@ License <https://github.com/junghoon-vans/varst/blob/main/LICENSE>`__
:target: https://varst.readthedocs.io/en/latest/?badge=latest

.. _link: https://github.com/marketplace/actions/rst-substitution

.. |contributing guidelines| replace:: contributing guidelines
.. _contributing guidelines: ./CONTRIBUTING.md
.. |code of conduct| replace:: Code of Conduct
.. _Code Of Conduct: ./CODE_OF_CONDUCT.md

0 comments on commit b77f056

Please # to comment.