-
Notifications
You must be signed in to change notification settings - Fork 54
Refactoring to Use Poetry #305
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
Merged
openshift-merge-robot
merged 12 commits into
project-codeflare:main
from
Fiona-Waters:poetry
Sep 14, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6719486
Update python tests job
anishasthana 779bf2b
refactor to use poetry
Fiona-Waters 4ff2f36
making test dependencies optional, and updating readme accordingly
Fiona-Waters 050664a
removing requirements files and updating readme to build from root dir
Fiona-Waters 0d80fc5
updating coverage-badge.yaml
Fiona-Waters 19317a3
fixing failing pre-commit check
Fiona-Waters 2320547
update unit test workflow
Fiona-Waters 07f5eaa
updating unit-test.yml
Fiona-Waters 514166f
adding pytorch-lightning dependency
Fiona-Waters 2e4240a
Removing poetry virtual env in test container and updating README.md
Fiona-Waters 003e07c
updating READNE.md to use poetry shell
Fiona-Waters 57d2dac
updating containerfile and coverage-badge workflow
Fiona-Waters File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,3 +1,5 @@ | ||
# Pre-Commit Build Artifacts | ||
|
||
This directory contains the artifacts required to build the codeflare-sdk pre-commit image. As of right now, we will need to manually update `requirements-dev.txt` in this directory as well. | ||
This directory contains the artifacts required to build the codeflare-sdk pre-commit image. | ||
|
||
To build the image run `podman build -f .github/build/Containerfile .` from the root directory. |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Python Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
unit-tests: | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/project-codeflare/codeflare-sdk-precommit:v0.0.3 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pip install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.create false | ||
Maxusmusti marked this conversation as resolved.
Show resolved
Hide resolved
|
||
poetry lock --no-update | ||
poetry install --with test | ||
- name: Test with pytest and check coverage | ||
run: | | ||
coverage run -m --source=src pytest -v tests/unit_test.py | ||
coverage=$(coverage report -m | tail -1 | tail -c 4 | head -c 2) | ||
if (( $coverage < 90 )); then exit 1; else echo "Coverage passed, ${coverage}%"; fi |
This file contains hidden or 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ __pycache__/ | |
.coverage | ||
Pipfile | ||
Pipfile.lock | ||
poetry.lock | ||
.venv* | ||
build/ | ||
tls-cluster-namespace | ||
|
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.