Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.13"]
python-version: ["3.14"]
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- [macos-13, macosx_x86_64, "13.0"]
- [macos-14, macosx_arm64, "14.0"]
python:
- cp39
- cp310
- cp311
- cp312
- cp313
- cp314

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.13"
python-version: "3.14"

- name: Install twine
run: python -m pip install --upgrade twine
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.13"]
python-version: ["3.14"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.5)

project(tenseal)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ['py36', 'py37']
target-version = ['py310', 'py311', 'py312', 'py313', 'py314']
line-length = 100
exclude = '''
(
Expand Down
148 changes: 86 additions & 62 deletions requirements_dev.lock
Original file line number Diff line number Diff line change
@@ -1,68 +1,99 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile requirements_dev.in
#
--find-links file:///home/bcebere/.cache/pip/wheelhouse

# This file was autogenerated by uv via the following command:
# uv pip compile requirements_dev.txt -o requirements_dev.lock
attrs==22.2.0
# via pytest
black==22.3.0
# via -r requirements_dev.in
black==26.1.0
# via -r requirements_dev.txt
bump2version==1.0.1
# via bumpversion
bumpversion==0.6.0
# via -r requirements_dev.in
certifi==2022.12.7
# via requests
charset-normalizer==2.1.1
# via requests
# via -r requirements_dev.txt
click==8.1.3
# via black
py==1.11.0
coverage[toml]==7.0.3
coverage==7.0.3
# via pytest-cov
exceptiongroup==1.1.0
# via pytest
cuda-bindings==12.9.4
# via torch
cuda-pathfinder==1.4.0
# via cuda-bindings
filelock==3.24.3
# via torch
flake8==6.0.0
# via -r requirements_dev.in
idna==3.4
# via requests
# via -r requirements_dev.txt
fsspec==2026.2.0
# via torch
imageio==2.23.0
# via scikit-image
iniconfig==1.1.1
# via pytest
jinja2==3.1.6
# via torch
markupsafe==3.0.3
# via jinja2
mccabe==0.7.0
# via flake8
mpmath==1.3.0
# via sympy
mypy-extensions==0.4.3
# via black
networkx==2.8.8
# via scikit-image
# via
# scikit-image
# torch
numpy==1.24.1
# via
# -r requirements_dev.in
# -r requirements_dev.txt
# imageio
# pywavelets
# scikit-image
# scipy
# tifffile
# torchvision
nvidia-cublas-cu11==11.10.3.66
nvidia-cublas-cu12==12.8.4.1
# via
# nvidia-cudnn-cu11
# nvidia-cudnn-cu12
# nvidia-cusolver-cu12
# torch
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-cupti-cu12==12.8.90
# via torch
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cuda-nvrtc-cu12==12.8.93
# via torch
nvidia-cudnn-cu11==8.5.0.96
nvidia-cuda-runtime-cu12==12.8.90
# via torch
nvidia-cudnn-cu12==9.10.2.21
# via torch
nvidia-cufft-cu12==11.3.3.83
# via torch
nvidia-cufile-cu12==1.13.1.3
# via torch
nvidia-curand-cu12==10.3.9.90
# via torch
nvidia-cusolver-cu12==11.7.3.90
# via torch
nvidia-cusparse-cu12==12.5.8.93
# via
# nvidia-cusolver-cu12
# torch
nvidia-cusparselt-cu12==0.7.1
# via torch
nvidia-nccl-cu12==2.27.5
# via torch
nvidia-nvjitlink-cu12==12.8.93
# via
# nvidia-cufft-cu12
# nvidia-cusolver-cu12
# nvidia-cusparse-cu12
# torch
nvidia-nvshmem-cu12==3.4.5
# via torch
nvidia-nvtx-cu12==12.8.90
# via torch
packaging==22.0
# via
# black
# pytest
# scikit-image
pathspec==0.10.3
pathspec==1.0.4
# via black
pillow==9.4.0
# via
Expand All @@ -73,6 +104,8 @@ platformdirs==2.6.2
# via black
pluggy==1.0.0
# via pytest
py==1.11.0
# via -r requirements_dev.txt
py-cpuinfo==9.0.0
# via pytest-benchmark
pycodestyle==2.10.0
Expand All @@ -81,53 +114,44 @@ pyflakes==3.0.1
# via flake8
pygal==3.0.0
# via
# -r requirements_dev.in
# -r requirements_dev.txt
# pytest-benchmark
pygaljs==1.0.2
# via
# -r requirements_dev.in
# -r requirements_dev.txt
# pytest-benchmark
pytest==7.2.0
# via
# -r requirements_dev.in
# -r requirements_dev.txt
# pytest-benchmark
# pytest-cov
pytest-benchmark[histogram]==4.0.0
# via -r requirements_dev.in
pytest-benchmark==4.0.0
# via -r requirements_dev.txt
pytest-cov==4.0.0
# via -r requirements_dev.in
# via -r requirements_dev.txt
pytokens==0.4.1
# via black
pywavelets==1.4.1
# via scikit-image
requests==2.28.1
# via torchvision
scikit-image==0.19.3
# via -r requirements_dev.in
# via -r requirements_dev.txt
scipy==1.10.0
# via scikit-image
setuptools==82.0.0
# via
# -r requirements_dev.txt
# torch
sympy==1.14.0
# via torch
tifffile==2022.10.10
# via scikit-image
tomli==2.0.1
torch==2.10.0
# via
# black
# coverage
# pytest
torch==1.13.1
# via
# -r requirements_dev.in
# -r requirements_dev.txt
# torchvision
torchvision==0.14.1
# via -r requirements_dev.in
typing-extensions==4.4.0
# via
# black
# torch
# torchvision
urllib3==1.26.13
# via requests
wheel==0.38.4
# via
# nvidia-cublas-cu11
# nvidia-cuda-runtime-cu11

# The following packages are considered to be unsafe in a requirements file:
# setuptools
torchvision==0.25.0
# via -r requirements_dev.txt
triton==3.6.0
# via torch
typing-extensions==4.15.0
# via torch
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==22.3.0
black==26.1.0
bumpversion
flake8
numpy
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def run(self):

if platform.system() == "Windows":
cmake_version = LooseVersion(re.search(r"version\s*([\d.]+)", out.decode()).group(1))
if cmake_version < "3.1.0":
raise RuntimeError("CMake >= 3.1.0 is required on Windows")
if cmake_version < "3.5.0":
raise RuntimeError("CMake >= 3.5.0 is required on Windows")

for ext in self.extensions:
self.build_extension(ext)
Expand All @@ -52,6 +52,7 @@ def build_extension(self, ext):
"-DSEAL_USE_INTEL_HEXL=" + hexl,
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir,
"-DPYTHON_EXECUTABLE=" + sys.executable,
'-DCMAKE_POLICY_VERSION_MINIMUM=3.5',
]

cfg = "Debug" if self.debug else "Release"
Expand Down
3 changes: 1 addition & 2 deletions tenseal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""TenSEAL is a library for doing homomorphic encryption operation on tensors.
"""
"""TenSEAL is a library for doing homomorphic encryption operation on tensors."""

try:
import _tenseal_cpp as _ts_cpp
Expand Down
1 change: 1 addition & 0 deletions tenseal/enc_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""The Context manages everything related to the encrypted computation, including keys, which
optimization should be enabled, and how many threads should run for a parallel computation.
"""

import multiprocessing
from enum import Enum
from typing import List, Union
Expand Down
3 changes: 1 addition & 2 deletions tenseal/sealapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""SEAL API bindings.
"""
"""SEAL API bindings."""

try:
import _sealapi_cpp
Expand Down
1 change: 1 addition & 0 deletions tenseal/tensors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- BFVVectpr: Vector of values encrypted using BFV.
- PlainTensor: N-dimensonal tensor, serving as the main type to interact with encrypted tensors.
"""

from tenseal.tensors.ckkstensor import CKKSTensor
from tenseal.tensors.ckksvector import CKKSVector
from tenseal.tensors.bfvvector import BFVVector
Expand Down
1 change: 1 addition & 0 deletions tenseal/tensors/abstract_tensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Abstract tensor class that implements common tensor methods"""

from typing import List, Union
import tenseal as ts
from abc import ABC
Expand Down
3 changes: 1 addition & 2 deletions tenseal/tensors/bfvtensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""N-dimensional tensor storing value in encrypted form using BFV.
"""
"""N-dimensional tensor storing value in encrypted form using BFV."""

from typing import List
import tenseal as ts
Expand Down
4 changes: 2 additions & 2 deletions tenseal/tensors/bfvvector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Vector of values encrypted using BFV.
"""
"""Vector of values encrypted using BFV."""

from typing import List
import tenseal as ts
from tenseal.tensors.abstract_tensor import AbstractTensor
Expand Down
3 changes: 1 addition & 2 deletions tenseal/tensors/ckkstensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""N-dimensional tensor storing value in encrypted form using CKKS.
"""
"""N-dimensional tensor storing value in encrypted form using CKKS."""

from typing import List
import tenseal as ts
Expand Down
4 changes: 2 additions & 2 deletions tenseal/tensors/ckksvector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Vector of values encrypted using CKKS. Less flexible, but more efficient than CKKSTensor.
"""
"""Vector of values encrypted using CKKS. Less flexible, but more efficient than CKKSTensor."""

from typing import List
import tenseal as ts
from tenseal.tensors.abstract_tensor import AbstractTensor
Expand Down
4 changes: 2 additions & 2 deletions tenseal/tensors/plaintensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""N-dimensonal tensor, serving as the main type to interact with encrypted tensors.
"""
"""N-dimensonal tensor, serving as the main type to interact with encrypted tensors."""

from typing import List, Union
import tenseal as ts
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion tenseal/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.16"
__version__ = "0.3.17"
4 changes: 2 additions & 2 deletions tests/python/sealapi/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Test runner required by Bazel py_test rule.
"""
"""Test runner required by Bazel py_test rule."""

import sys
import os
import pytest
Expand Down
Loading
Loading