-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5742a46
commit c2a04b2
Showing
1 changed file
with
40 additions
and
1 deletion.
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 |
---|---|---|
@@ -1 +1,40 @@ | ||
## | ||
# Contributing Guide | ||
|
||
Contributors can add new useful functions to the foss42 core library or new data (check `foss42/data/`) by following the below steps: | ||
|
||
**Step 1**: Raise a new issue that you want to add new function/data. We will assign the issue to you and label it. | ||
**Step 2**: Star and fork THIS repository. | ||
**Step 3**: Now in your fork, make the required changes. | ||
**Step 4**: Raise a PR with your changes. | ||
**Step 5**: Wait for review and PR merge. | ||
|
||
## Setting up Dev env | ||
|
||
- Install the latest version of Python. | ||
- Clone the repo to your local sytem. | ||
- Use terminal to navigate inside the repo. | ||
- Execute `pip3 install -e .` to install the library locally. | ||
- Now you can import and use the library in the local enviroment. | ||
|
||
```python | ||
>>> import foss42.text.humanize as hz | ||
>>> hz.humanize_bytes(1126, | ||
2, | ||
prefix = True, | ||
trailing_zeros = True) | ||
>>> '1.10 kilobytes' | ||
``` | ||
|
||
## Testing | ||
|
||
Install `pytest` via the following command | ||
|
||
``` | ||
$ pip3 install pytest | ||
``` | ||
|
||
Now inside the folder, run the tests using the command: | ||
|
||
``` | ||
$ pytest | ||
``` |