Skip to content

Commit

Permalink
chore: move away from dev-dependencies
Browse files Browse the repository at this point in the history
`dev-dependencies` is deprecated from poetry.
This PR changes that.

Another benefit from it is that we should now be able to do:
`python -m pip install concrete-ml[dev]` to install from pypi with all
development dependencies.

closes zama-ai/concrete-ml-internal#2005
closes zama-ai/concrete-ml-internal#2319
closes zama-ai/concrete-ml-internal#2685
  • Loading branch information
fd0r committed Jun 28, 2024
1 parent 23cb7dc commit 82bf54d
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 10 deletions.
4 changes: 1 addition & 3 deletions ci/aws_ami_build_component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ phases:
- virtualenv venv --python=python3.9
- echo "source $(pwd)/venv/bin/activate" >> .bashrc
- source venv/bin/activate
- python -m pip install concrete-ml==${CML_VERSION}
- python -m pip install "concrete-ml[dev]==${CML_VERSION}"

- name: test
steps:
Expand Down Expand Up @@ -76,8 +76,6 @@ phases:
commands:
- apt install -y git-lfs
- git lfs install
- source venv/bin/activate
- python -m pip install pytest==7.1.1 pandas==2.0.3 tensorflow==2.12.0 tf2onnx==1.13.0 torchvision==0.14.1 transformers==4.40.0

# We disable tests for test_deploy file because the instance does not have AWS CLI setup
- name: RunTests
Expand Down
1 change: 1 addition & 0 deletions deps_licenses/licenses_mac_silicon_user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ tzdata, 2024.1, Apache Software License
urllib3, 2.2.2, MIT License
xgboost, 1.6.2, Apache Software License
z3-solver, 4.13.0.0, MIT License
zipp, 3.19.2, MIT License
2 changes: 1 addition & 1 deletion deps_licenses/licenses_mac_silicon_user.txt.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
adb925c3b7be3e651975febcf49b6543
1cde59339dad23a5ecae8ac1192e872e
36 changes: 34 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,32 @@ numpy = "1.23.5"
protobuf = "3.20.3"
pandas = "2.0.3"

# Needed to have the latest Concrete Python versions
# Zama sources
[[tool.poetry.source]]
name = "zama-pypi-cpu"
url = "https://pypi.zama.ai/cpu"
priority = "explicit"

[tool.poetry.dev-dependencies]
[[tool.poetry.source]]
name = "zama-pypi-gpu"
url = "https://pypi.zama.ai/gpu"
priority = "explicit"

# GPU
[tool.poetry.group.gpu]
optional = true

[tool.poetry.group.gpu.dependencies]
concrete-python = {version="==2.7.0", source = "zama-pypi-gpu", markers = "sys_platform != 'darwin' and platform_machine != 'arm'"}

# Development dependencies
[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
isort = "^5.10.1"
black = "^24.3.0"
pylint = "^2.13.0"
# Coverage issue
# FIXME: https://github.com/zama-ai/concrete-ml-internal/issues/2541
pytest = "7.4.1"
pytest-cov = "^4.1.0"
pytest-xdist = "^3.3.1"
Expand Down

0 comments on commit 82bf54d

Please sign in to comment.