Skip to content

Commit

Permalink
Merge branch 'master' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aj3sh authored Apr 29, 2023
2 parents 0fd7da7 + 4fd5af4 commit 3e62c54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
16 changes: 5 additions & 11 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Creating a Separate virtualenv

Before you contribute on this project you need to create a new separate [virtualenv](https://docs.python.org/3/library/venv.html).

Here is one example.

```bash
Expand All @@ -12,21 +13,15 @@ source .env/bin/activate

## Dependencies

We have listed all the dependencies in the `requirements.txt` files.
We have listed all the python dependencies in the `requirements.txt` files.

To install dependencies and prepare [`pre-commit`](https://pre-commit.com/) hooks you would need to run `install` command:
## Pre-commit Hook

```bash
make install
```
The config file for [`pre-commit`](https://pre-commit.com/) hooks is in [.pre-commit-config.yaml](./.pre-commit-config.yaml) file. To install pre-commit and enable the hook please refer to [https://pre-commit.com](https://pre-commit.com/)

## Codestyle

A `.editorconfig` is available to maintain the coding style. You can also use `black` for autoformatting.

```bash
black your-file-to-format.py
```
A [.editorconfig](./editorconfig) is available to maintain the coding style. Besides, your code will automatically gets formatted if you have install the pre-commit hook.

## Unit tests

Expand Down Expand Up @@ -58,7 +53,6 @@ Before submitting your code please do the following steps:
1. Add tests for the new changes
1. Update the `CHANGELOG.md` file if necessary
1. Edit documentation if you have changed something significant
1. Run `black .` to format your changes.

## Other help

Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
# py-nepali
#
# @file
# @version 0.1
install:
pip install -r requirements.txt
pre-commit install

# @version 0.2
test:
python -m unittest discover nepali/tests -v

Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
coverage
black==23.1.0
pre-commit==3.1.0

0 comments on commit 3e62c54

Please sign in to comment.