Skip to content

Commit

Permalink
chore: upgrade deps to prep for 0.2.0-rc1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kentbull committed Jan 13, 2025
1 parent ca5cc7a commit 0480888
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 41 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/python-app-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
os: [ macos-13, ubuntu-latest ]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12.2
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.12.8
uses: actions/setup-python@v5
with:
python-version: 3.12.2
python-version: 3.12.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -43,11 +43,11 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12.2
- uses: actions/checkout@v4
- name: Set up Python 3.12.8
uses: actions/setup-python@v2
with:
python-version: 3.12.2
python-version: 3.12.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.PHONY: build-keria

VERSION=0.2.0-dev6
VERSION=0.2.0-rc1
IMAGE_NAME=weboftrust/keria
VERSION_TAG=$(IMAGE_NAME):$(VERSION)
LATEST_TAG=$(IMAGE_NAME):latest

define DOCKER_WARNING
In order to use the multi-platform build enable the containerd image store
Expand All @@ -11,11 +14,21 @@ To enable the feature for Docker Desktop:
Select Apply and Restart."
endef

build-wheel:
@python setup.py sdist

build-keria: .warn
@docker build --platform=linux/amd64,linux/arm64 --no-cache -f images/keria.dockerfile -t weboftrust/keria:$(VERSION) .
@docker build \
--build-arg KERI_AGENT_CORS=false \
--platform=linux/amd64,linux/arm64 \
--no-cache \
-f images/keria.dockerfile \
-t $(LATEST_TAG) \
-t $(VERSION_TAG) \
.

publish-keria:
@docker push weboftrust/keria:$(VERSION)
@docker push $(VERSION_TAG) && docker push $(LATEST_TAG)

.warn:
@echo -e ${RED}"$$DOCKER_WARNING"${NO_COLOUR}
Expand Down
22 changes: 13 additions & 9 deletions images/keria.dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Builder stage
FROM python:3.12-alpine3.19 as builder
FROM python:3.12.8-alpine3.21 AS builder

# Install compilation dependencies
RUN apk --no-cache add \
curl \
bash \
alpine-sdk \
libffi-dev \
Expand All @@ -13,29 +14,32 @@ SHELL ["/bin/bash", "-c"]

# Install Rust for blake3 dependency build
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

WORKDIR /keria

RUN python -m venv venv
ENV PATH=/keria/venv/bin:${PATH}
RUN pip install --upgrade pip

# Copy in Python dependency files
COPY requirements.txt setup.py ./
RUN pip install --upgrade pip
# "src/" dir required for installation of dependencies with setup.py
RUN mkdir /keria/src
# Copy in Python dependency files
COPY requirements.txt setup.py ./

# Install Python dependencies
RUN . "$HOME/.cargo/env" && \
pip install -r requirements.txt
RUN . "$HOME/.cargo/env"
RUN pip install -r requirements.txt

# Runtime stage
FROM python:3.12-alpine3.19
FROM python:3.12.8-alpine3.21

# Install runtime dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libsodium-dev
curl \
libsodium-dev \
gcc

WORKDIR /keria

Expand Down
16 changes: 16 additions & 0 deletions scripts/keri/cf/keria.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"dt": "2025-01-03T16:08:30.123456+00:00",
"keria": {
"dt": "2025-01-03T16:08:30.123457+00:00",
"curls": ["http://127.0.0.1:3902/"]
},
"iurls": [
"http://127.0.0.1:5642/oobi/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha/controller?name=Wan&tag=witness",
"http://127.0.0.1:5643/oobi/BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM/controller?name=Wil&tag=witness",
"http://127.0.0.1:5644/oobi/BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX/controller?name=Wes&tag=witness"
],
"tocks": {
"initer": 0.0,
"escrower": 1.0
}
}
Empty file removed scripts/keri/cf/main/keria.json
Empty file.
47 changes: 27 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,27 @@
https://caremad.io/posts/2013/07/setup-vs-requirement/
"""


from pathlib import Path
from glob import glob
from os.path import basename
from os.path import splitext

from setuptools import find_packages
from setuptools import setup

this_directory = Path(__file__).parent
if (this_directory / "README.md").exists(): # If building inside a container, like in the `images/keria.dockerfile`, this file won't exist and fails the build
long_description = (this_directory / "README.md").read_text()
else:
long_description = "KERIA: KERI Agent in the cloud."

setup(
name='keria',
version='0.2.0-dev6', # also change in src/keria/__init__.py
version='0.2.0-rc1', # also change in src/keria/__init__.py
license='Apache Software License 2.0',
description='KERIA: KERI Agent in the cloud',
long_description="KERIA: KERI Agent in the cloud.",
long_description=long_description,
long_description_content_type='text/markdown',
author='Philip S. Feairheller',
author_email='[email protected]',
url='https://github.com/WebOfTrust/keria',
Expand All @@ -54,7 +61,7 @@
'Operating System :: Unix',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
# uncomment if you test on these interpreters:
# 'Programming Language :: Python :: Implementation :: PyPy',
Expand All @@ -64,37 +71,37 @@
'Topic :: Utilities',
],
project_urls={
'Documentation': 'https://weboftrust.github.io/keridoc',
'Issue Tracker': 'https://github.com/WebOfTrust/keria/issues',
'Source': 'https://github.com/WebOfTrust/keria',
},
keywords=[
"secure attribution",
"authentic data",
"discovery",
"resolver",
# eg: 'keyword1', 'keyword2', 'keyword3',
"resolver"
],
python_requires='>=3.12.2',
install_requires=[
'hio>=0.6.14',
'keri==1.2.0.dev13',
'mnemonic>=0.21',
'multicommand>=1.0.0',
'falcon>=3.1.3',
'http_sfv>=0.9.8',
'dataclasses_json>=0.5.7',
'apispec>=6.6.0',
'hio==0.6.14',
'keri==1.2.2',
'mnemonic==0.21',
'multicommand==1.0.0',
'falcon==4.0.2',
'http_sfv==0.9.9',
'dataclasses_json==0.6.7',
'apispec==6.8.1',
],
extras_require={
# eg:
# 'rst': ['docutils>=0.11'],
# ':python_version=="2.6"': ['argparse'],
'test': ['pytest', 'coverage'],
'docs': ['sphinx', 'sphinx-rtd-theme']
},
tests_require=[
'coverage>=5.5',
'pytest>=6.2.4',
'requests==2.32.3'
'coverage>=7.6.10',
'pytest>=8.3.4',
],
setup_requires=[
'setuptools==75.8.0'
],
entry_points={
'console_scripts': [
Expand Down
2 changes: 1 addition & 1 deletion src/keria/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
main package
"""

__version__ = '0.2.0-dev6' # also change in setup.py
__version__ = '0.2.0-rc1' # also change in setup.py

2 changes: 1 addition & 1 deletion src/keria/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ def on_get(req, rep):
pre = req.params.get("pre")
preb = pre.encode("utf-8")
events = []
for fn, dig in agent.hby.db.getFelItemPreIter(preb, fn=0):
for _, fn, dig in agent.hby.db.getFelItemPreIter(preb, fn=0):
if not (raw := agent.hby.db.cloneEvtMsg(pre=preb, fn=fn, dig=dig)):
raise falcon.HTTPInternalServerError(f"Missing event for dig={dig}.")

Expand Down

0 comments on commit 0480888

Please sign in to comment.