Skip to content

Commit ba4cf79

Browse files
committed
Removing poetry virtual env in test container and updating README.md
1 parent 40bb981 commit ba4cf79

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

Diff for: .github/workflows/unit-tests.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ jobs:
1414
image: quay.io/project-codeflare/codeflare-sdk-precommit:v0.0.3
1515
steps:
1616
- uses: actions/checkout@v3
17+
- name: Install poetry
18+
run: pip install poetry
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.8'
1722
- name: Install dependencies
1823
run: |
19-
python -m pip install --upgrade pip
20-
pip3 install poetry
24+
poetry config virtualenvs.create false
2125
poetry lock --no-update
2226
poetry install --with test
2327
- name: Test with pytest and check coverage
2428
run: |
25-
poetry run coverage run -m --source=src pytest -v tests/unit_test.py
29+
coverage run -m --source=src pytest -v tests/unit_test.py
2630
coverage=$(coverage report -m | tail -1 | tail -c 4 | head -c 2)
2731
if (( $coverage < 90 )); then exit 1; else echo "Coverage passed, ${coverage}%"; fi

Diff for: README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ Can be installed via `pip`: `pip install codeflare-sdk`
2121
### Prerequisites
2222

2323
We recommend using Python 3.9 for development.
24-
Install dependencies: `poetry install`
24+
25+
#### Install dependencies:
26+
- run: `poetry install`
27+
2528
This will install standard requirements as specified in the poetry.lock file. Test and docs dependencies are optional.
2629

27-
To include test dependencies run: `poetry install --with test`
30+
- To include test dependencies run: `poetry install --with test`
2831

29-
To include docs dependencies run: `poetry install --with docs`
32+
- To include docs dependencies run: `poetry install --with docs`
3033

31-
To include test and docs dependencies run: `poetry install --with test,docs`
34+
- To include test and docs dependencies run: `poetry install --with test,docs`
3235

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

@@ -43,13 +46,13 @@ To build the codeflare-sdk pre-commit image run `podman build -f .github/build/C
4346
### Testing
4447

4548
- To install codeflare-sdk in editable mode, run `pip install -e .` from the repo root.
46-
- To run the unit tests, run `pytest -v tests/unit_test.py`
49+
- To run the unit tests, run `poetry run pytest -v tests/unit_test.py`
4750
- Any new test functions/scripts can be added into the `tests` folder
4851
- NOTE: Functional tests coming soon, will live in `tests/func_test.py`
4952

5053
#### Code Coverage
5154

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

5558
### Code Formatting

0 commit comments

Comments
 (0)