Skip to content
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

Remove dependancy on indy-sdk for testing #109

Merged
merged 10 commits into from
Mar 18, 2025
1 change: 1 addition & 0 deletions docker/Dockerfile.tails-server
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.12



RUN pip3 install --upgrade pip
RUN pip3 install --upgrade setuptools

Expand Down
25 changes: 4 additions & 21 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
FROM ubuntu:20.04

# Note: libindy is a dependency for tests, and it's easiest to install on ubuntu images
# using debian from python base images doesn't allow following steps to work, so build from ubuntu:20

# Install ca-certificates and add the Sovrin repository key
RUN apt-get update && apt-get install -y ca-certificates gnupg software-properties-common && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
add-apt-repository "deb https://repo.sovrin.org/sdk/deb bionic stable" && \
apt-get update && \
apt-get install -y libindy

# Install Python 3.9 and python3-pip
RUN apt-get install -y python3.9 python3.9-venv python3.9-dev python3-pip
FROM python:3.12

ADD pyproject.toml .
ADD README.md .
ADD tails_server ./tails_server

RUN pip3 install --upgrade pip
# Upgrade pip using Python 3.9 to ensure compatibility
RUN python3.9 -m pip install --upgrade pip

# Use Python 3.9's pip to install dependencies
RUN python3.9 -m pip install --no-cache-dir .[dev]
# Use Python 3.12's pip to install dependencies
RUN python3.12 -m pip install --no-cache-dir .[dev]

ADD test ./

ENTRYPOINT ["python3.9", "integration.py"]
ENTRYPOINT ["python3.12", "integration.py"]
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ license = { text = "Apache-2.0"}
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
# TODO: Upgrade this to the latest version once we no longer rely on indySDK
requires-python = ">=3.9"
requires-python = ">=3.12"
dependencies = [
"aiohttp==3.10.5",
"base58~=2.1.1",
Expand All @@ -32,7 +31,7 @@ dev = [
"pynacl~=1.5.0",
"aiofiles~=23.2.1",

"python3_indy~=1.16.0.post286",
"anoncreds==0.2.0",

"isort~=5.13.2",
"black~=24.2.0"
Expand All @@ -42,7 +41,7 @@ dev = [
Homepage = "https://github.com/bcgov/indy-tails-server"

[tool.pyright]
pythonVersion = "3.9"
pythonVersion = "3.12"

[tool.setuptools]
packages = ["tails_server", "tails_server.config"]
Expand Down
Loading