Skip to content

Commit

Permalink
Update README.md to point to the new CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ygnas authored and openshift-merge-bot[bot] committed Jun 21, 2024
1 parent f6399e9 commit 8bfcfb1
Showing 1 changed file with 2 additions and 56 deletions.
58 changes: 2 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Codeflare-SDK
# CodeFlare SDK

[![Python application](https://github.com/project-codeflare/codeflare-sdk/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/project-codeflare/codeflare-sdk/actions/workflows/unit-tests.yml)
![coverage badge](./coverage.svg)
Expand All @@ -19,61 +19,7 @@ Can be installed via `pip`: `pip install codeflare-sdk`

## Development

### Prerequisites

We recommend using Python 3.9 for development, along with Poetry.
Create a Poetry virtual environment with the required Python version 3.9, and run all commands within this environment.

- run: `poetry shell`

#### Install dependencies:

- run: `poetry install`

This will install standard requirements as specified in the poetry.lock file. Test and docs dependencies are optional.

- To include test dependencies run: `poetry install --with test`

- To include docs dependencies run: `poetry install --with docs`

- To include test and docs dependencies run: `poetry install --with test,docs`

If you require a requirements.txt file you can run:

`poetry export -f requirements.txt --output requirements.txt --without-hashes`

### Pre-commit

We use pre-commit to make sure the code is consistently formatted. To make sure that pre-commit is run every time you commit changes, simply run `pre-commit install`

To build the codeflare-sdk pre-commit image run `podman build -f .github/build/Containerfile .` from the root directory.

### Testing

- To install codeflare-sdk in editable mode, run `pip install -e .` from the repo root.
- Any new test functions/scripts can be added into the `tests` folder
- NOTE: Functional tests coming soon, will live in `tests/func_test.py`

#### Unit Testing
- To run the unit tests, run `pytest -v tests/unit_test.py`

#### Local e2e Testing
- Please follow the [e2e documentation](https://github.com/project-codeflare/codeflare-sdk/blob/main/docs/e2e.md)

#### Code Coverage

- Run tests with the following command: `coverage run -m --source=src pytest tests/unit_test.py`
- To then view a code coverage report w/ missing lines, run `coverage report -m`

### Code Formatting

- To check file formatting, in top-level dir run `black --check .`
- To auto-reformat all files, remove the `--check` flag
- To reformat an individual file, run `black <filename>`

### Package Build

To build the python package: `$ poetry build`
Please see our [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed instructions.

## Release Instructions

Expand Down

0 comments on commit 8bfcfb1

Please sign in to comment.