Skip to content

Commit

Permalink
Updated CONTRIBUTING.md for setup of venv and standard pip install (#127
Browse files Browse the repository at this point in the history
)

* Updated CONTRIBUTING.md for setup of venv and standard pip install

* Updated CONTRIBUTING.md with proposed changes

* Fixes

Co-authored-by: Matt Watson <[email protected]>
  • Loading branch information
adhadse and mattdangerw authored Apr 21, 2022
1 parent f41ec82 commit ad47068
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ development environment and run the unit tests. This is covered in section
### Step 3. Create a pull request

Once the change is ready, open a pull request from your branch in your fork to
the master branch in [keras-team/keras-nlp](https://github.com/keras-team/keras-nlp).
the master branch in
[keras-team/keras-nlp](https://github.com/keras-team/keras-nlp).

### Step 4. Sign the Contributor License Agreement

After creating the pull request, you will need to sign the Google CLA agreement.
The agreement can be foiund at [https://cla.developers.google.com/clas](https://cla.developers.google.com/clas).
The agreement can be found at
[https://cla.developers.google.com/clas](https://cla.developers.google.com/clas).

### Step 5. Code review

Expand All @@ -47,20 +49,24 @@ Once the pull request is approved, a team member will take care of merging.

## Setup environment

Python 3.7 or later is required.

Setting up your KerasNLP development environment requires you to fork the
KerasNLP repository, clone the repository, install dependencies, and execute
`python setup.py develop`.
KerasNLP repository, clone the repository, create a virtual environment, and
install dependencies.

You can achieve this by running the following commands:

```shell
gh repo fork keras-team/keras-nlp --clone --remote
cd keras-nlp
pip install ".[tests]"
python setup.py develop
python -m venv ~/keras-nlp-venv
source ~/keras-nlp-venv/bin/activate
pip install -e ".[tests]"
```

The first line relies on having an installation of [the GitHub CLI](https://github.com/cli/cli).
The first line relies on having an installation of
[the GitHub CLI](https://github.com/cli/cli).

Following these commands you should be able to run the tests using
`pytest keras_nlp`. Please report any issues running tests following these
Expand Down Expand Up @@ -114,4 +120,5 @@ like - `: invalid option`

## Community Guidelines

This project follows [Google's Open Source Community Guidelines](https://opensource.google/conduct/).
This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).

0 comments on commit ad47068

Please sign in to comment.