Skip to content

Commit

Permalink
refactor to use poetry
Browse files Browse the repository at this point in the history
Co-authored-by: Anish Asthana [email protected]
Co-authored-by: Fiona Waters [email protected]
  • Loading branch information
Fiona-Waters committed Aug 14, 2023
1 parent f45185d commit 665c8b5
Show file tree
Hide file tree
Showing 8 changed files with 5,127 additions and 14 deletions.
10 changes: 7 additions & 3 deletions .github/build/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ RUN tar -C /usr/local/bin -xvf $TMPDIR/oc.tar.gz && \
rm $TMPDIR/oc.tar.gz
USER $USERID

COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install -r /tmp/requirements.txt
RUN pip3 install poetry
COPY pyproject.toml ./
RUN poetry install

CMD bash
#COPY requirements.txt /tmp/requirements.txt
#RUN python -m pip install -r /tmp/requirements.txt

CMD bash
2 changes: 1 addition & 1 deletion .github/build/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 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.
2,618 changes: 2,618 additions & 0 deletions .github/build/poetry.lock

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions .github/build/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[tool.poetry]
name = "codeflare-sdk"
version = "0.0.0-dev"
description = "Python SDK for codeflare client"

license = "Apache-2.0"

authors = [
"Michael Clifford <[email protected]>",
"Mustafa Eyceoz <[email protected]>",
"Abhishek Malvankar <[email protected]>",
"Atin Sood <[email protected]>",
]

readme = 'README.md'

repository = "https://github.com/project-codeflare/codeflare-sdk"
homepage = "https://github.com/project-codeflare/codeflare-sdk"

keywords = ['codeflare', 'python', 'sdk', 'client', 'batch', 'scale']

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
openshift-client = "1.0.18"
rich = "^12.5"
ray = {version = "2.5.0", extras = ["default"]}
kubernetes = ">= 25.3.0, < 27"
codeflare-torchx = "0.6.0.dev0"
cryptography = "40.0.2"
executing = "1.2.0"
pydantic = "< 2"
pre-commit = "3.3.3"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
pdoc3 = "0.10.0"

[tool.poetry.group.test.dependencies]
pytest = "7.4.0"
coverage = "7.2.7"
pytest-mock = "3.11.1"
black = "22.3.0"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ __pycache__/
.coverage
Pipfile
Pipfile.lock
poetry.lock
.venv*
build/
tls-cluster-namespace
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ Can be installed via `pip`: `pip install codeflare-sdk`
### Prerequisites

We recommend using Python 3.9 for development.
Install dependencies: `$ pip install -r requirements.txt`
Install dependencies: `poetry install`
This will install all requirements as specified in the poetry.lock file.

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

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

### Pre-commit

Expand Down
2,451 changes: 2,451 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

0 comments on commit 665c8b5

Please sign in to comment.