Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/).