Skip to content

Commit

Permalink
Merge pull request #133 from neuroforgede/wip/fix-typing-compose_cli#…
Browse files Browse the repository at this point in the history
…main

try to improve typing for dataclass_json support
  • Loading branch information
s4ke committed Jun 21, 2024
2 parents 1ad3031 + 5905348 commit 0d9f44f
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
source venv/bin/activate
(bash install_dev_dependencies.sh && python3 setup.py sdist) || exit 1
# copy into separate file to prevent issues where the source and target are the same
mv dist/compose_client-2.2.7*.tar.gz dist/release.tar.gz
mv dist/compose_client-2.2.10*.tar.gz dist/release.tar.gz
mv dist/release.tar.gz dist/compose_client-$RELEASE_VERSION.tar.gz
- name: "zip deploy/local folder"
Expand Down
2 changes: 1 addition & 1 deletion client/compose_client/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@click.group()
def cli() -> None:
"""
NF Compose CLI - version: 2.2.7
NF Compose CLI - version: 2.2.10
"""
pass

Expand Down
2 changes: 1 addition & 1 deletion client/compose_client/library/connection/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import datetime


USER_AGENT = 'compose_cli 2.2.7'
USER_AGENT = 'compose_cli 2.2.10'


class APIClient(abc.ABC):
Expand Down
5 changes: 3 additions & 2 deletions client/compose_client/library/models/definition/datapoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# [2019] - [2024] © NeuroForge GmbH & Co. KG

from dataclasses import dataclass, field
from typing import Any, Dict, Union, BinaryIO
from typing import Any, List, Dict, Union, BinaryIO

from dataclasses_json import dataclass_json, Undefined

Expand All @@ -22,7 +22,8 @@ def __init__(self, url: str):
self.url = url


Primitive = Union[str, float, int, bool]
# typing below the first level is subpar, but this is the best we can do for now
Primitive = Union[str, float, int, bool, Dict[str, Any], List[Any]]


@dataclass_json(undefined=Undefined.EXCLUDE)
Expand Down
2 changes: 1 addition & 1 deletion client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def cli_test_suite():
setuptools.setup(
name="compose_client",
scripts=['bin/compose_cli'],
version="2.2.7",
version="2.2.10",
author="NeuroForge GmbH & Co. KG",
author_email="kontakt@neuroforge.de",
description="NF Compose package",
Expand Down
12 changes: 6 additions & 6 deletions deploy/local/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
restart: unless-stopped

nfcomposeskipper:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
networks:
postgres:
nfcompose:
Expand All @@ -66,7 +66,7 @@ services:

# inside facing container used for separating internal requests so that outside requests are not harmed by etl jobs
nfcomposeskipper_internal:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
networks:
postgres:
nfcompose:
Expand All @@ -86,7 +86,7 @@ services:
SKIPPER_TASK_DASHBOARD_UPSTREAM: "http://skipper.task.dashboard.${INTERNAL_DOMAIN_SUFFIX:-test.local}:5555"

nfcompose_skipper_celery:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
networks:
- postgres
- nfcompose
Expand All @@ -104,7 +104,7 @@ services:
restart: unless-stopped

nfcompose_skipper_celery_beat:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
networks:
- postgres
- nfcompose
Expand All @@ -126,7 +126,7 @@ services:
restart: unless-stopped

nfcompose_skipper_task_dashboard:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
networks:
postgres: {}
nfcompose:
Expand All @@ -144,7 +144,7 @@ services:
restart: unless-stopped

nfcomposeskipperproxy:
image: "${SKIPPER_PROXY_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.2.7}"
image: "${SKIPPER_PROXY_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.2.10}"
restart: unless-stopped
depends_on:
- nfcomposeskipper
Expand Down
2 changes: 1 addition & 1 deletion deploy/local/integration/library/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from library.types import JSONType


USER_AGENT = 'integration_test compose 2.2.7'
USER_AGENT = 'integration_test compose 2.2.10'


class APIClient(abc.ABC):
Expand Down
16 changes: 8 additions & 8 deletions deploy/production/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ services:
- "nodered.local"

consumer_gateway:
image: "${SKIPPER_CONSUMER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-consumer-gateway:2.2.7}"
image: "${SKIPPER_CONSUMER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-consumer-gateway:2.2.10}"
restart: unless-stopped
networks:
postgres:
Expand All @@ -163,7 +163,7 @@ services:
start_period: 1s

skipper:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
restart: unless-stopped
networks:
postgres:
Expand All @@ -179,7 +179,7 @@ services:

# inside facing container used for separating internal requests so that outside requests are not harmed by etl jobs
skipper_internal:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
restart: unless-stopped
networks:
postgres:
Expand All @@ -195,7 +195,7 @@ services:
SKIPPER_DJANGO_EXTRA_ALLOWED_HOSTS: "skipper.internal.local"

skipper_celery:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
restart: unless-stopped
networks:
- postgres
Expand All @@ -208,7 +208,7 @@ services:
SKIPPER_CONTAINER_TYPE: "CELERY"

skipper_celery_beat:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
restart: unless-stopped
networks:
- postgres
Expand All @@ -225,7 +225,7 @@ services:
SKIPPER_CONTAINER_TYPE: "CELERY_BEAT"

skipper_task_dashboard:
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
restart: unless-stopped
networks:
postgres: {}
Expand All @@ -237,7 +237,7 @@ services:
SKIPPER_CONTAINER_TYPE: "TASK_DASHBOARD"

skipper_proxy:
image: "${SKIPPER_PROXY_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.2.7}"
image: "${SKIPPER_PROXY_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper-proxy:2.2.10}"
environment:
SKIPPER_BACKEND_SERVICE: "skipper.local"
SKIPPER_BACKEND_SERVICE_PORT: "8000"
Expand Down Expand Up @@ -281,7 +281,7 @@ services:
python manage.py collectstatic --noinput
check_result "failed to collect static files"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.7}"
image: "${SKIPPER_DOCKER_IMAGE:-ghcr.io/neuroforgede/nfcompose-skipper:2.2.10}"
environment:
# force rerun everytime
DEPLOY_DATE: "${DEPLOY_DATE}"
Expand Down
6 changes: 3 additions & 3 deletions skipper/buildinfo/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
suffix_version = ""
else:
major_version = "2"
minor_version = "1"
patch_version = "0"
suffix_version = "-beta"
minor_version = "2"
patch_version = "10"
suffix_version = ""


major_version_string = f"{major_version}{suffix_version}"
Expand Down

0 comments on commit 0d9f44f

Please sign in to comment.