Skip to content

Commit bc36cb9

Browse files
committed
refactor to use poetry
Co-authored-by: Anish Asthana [email protected] Co-authored-by: Fiona Waters [email protected]
1 parent f45185d commit bc36cb9

File tree

7 files changed

+2509
-14
lines changed

7 files changed

+2509
-14
lines changed

.github/build/Containerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ RUN tar -C /usr/local/bin -xvf $TMPDIR/oc.tar.gz && \
1414
rm $TMPDIR/oc.tar.gz
1515
USER $USERID
1616

17-
COPY requirements.txt /tmp/requirements.txt
18-
RUN python -m pip install -r /tmp/requirements.txt
17+
RUN pip3 install poetry
18+
COPY pyproject.toml ./
19+
RUN poetry install
1920

20-
CMD bash
21+
#COPY requirements.txt /tmp/requirements.txt
22+
#RUN python -m pip install -r /tmp/requirements.txt
23+
24+
CMD bash

.github/build/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Pre-Commit Build Artifacts
22

3-
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.
3+
This directory contains the artifacts required to build the codeflare-sdk pre-commit image.

.github/build/pyproject.toml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[tool.poetry]
2+
name = "codeflare-sdk"
3+
version = "0.0.0-dev"
4+
description = "Python SDK for codeflare client"
5+
6+
license = "Apache-2.0"
7+
8+
authors = [
9+
"Michael Clifford <[email protected]>",
10+
"Mustafa Eyceoz <[email protected]>",
11+
"Abhishek Malvankar <[email protected]>",
12+
"Atin Sood <[email protected]>",
13+
]
14+
15+
readme = 'README.md'
16+
17+
repository = "https://github.com/project-codeflare/codeflare-sdk"
18+
homepage = "https://github.com/project-codeflare/codeflare-sdk"
19+
20+
keywords = ['codeflare', 'python', 'sdk', 'client', 'batch', 'scale']
21+
22+
[tool.poetry.dependencies]
23+
python = ">=3.8,<4.0"
24+
openshift-client = "1.0.18"
25+
rich = "^12.5"
26+
ray = {version = "2.5.0", extras = ["default"]}
27+
kubernetes = ">= 25.3.0, < 27"
28+
codeflare-torchx = "0.6.0.dev0"
29+
cryptography = "40.0.2"
30+
executing = "1.2.0"
31+
pydantic = "< 2"
32+
pre-commit = "3.3.3"
33+
34+
[tool.poetry.group.docs]
35+
optional = true
36+
37+
[tool.poetry.group.docs.dependencies]
38+
pdoc3 = "0.10.0"
39+
40+
[tool.poetry.group.test.dependencies]
41+
pytest = "7.4.0"
42+
coverage = "7.2.7"
43+
pytest-mock = "3.11.1"
44+
black = "22.3.0"

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ __pycache__/
44
.coverage
55
Pipfile
66
Pipfile.lock
7-
poetry.lock
87
.venv*
98
build/
109
tls-cluster-namespace

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ Can be installed via `pip`: `pip install codeflare-sdk`
1818
### Prerequisites
1919

2020
We recommend using Python 3.9 for development.
21-
Install dependencies: `$ pip install -r requirements.txt`
21+
Install dependencies: `poetry install`
22+
This will install all requirements as specified in the poetry.lock file.
23+
24+
If you require a requirements.txt file you can run:
25+
26+
`poetry export -f requirements.txt --output requirements.txt --without-hashes`
2227

2328
### Pre-commit
2429

poetry.lock

+2,451
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements.txt

-8
This file was deleted.

0 commit comments

Comments
 (0)