Skip to content
Closed
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/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
BASE_IMAGE_USER: ghcr.io/driplineorg
BASE_IMAGE_REPO: dripline-cpp
DEV_SUFFIX: '-dev'
BASE_IMAGE_TAG: 'v2.10.9'
BASE_IMAGE_TAG: 'v2.10.10'
# BASE_IMAGE_TAG: 'dlcpp-hf2.10.8'
# DEV_SUFFIX: ''

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5) # <3.5 is deprecated by CMake
project( DriplinePy VERSION 5.1.2 )
project( DriplinePy VERSION 5.1.3 )

cmake_policy( SET CMP0074 NEW )

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG img_user=ghcr.io/driplineorg
ARG img_repo=dripline-cpp
#ARG img_tag=dlcpp-hf2.10.8
ARG img_tag=v2.10.9
ARG img_tag=v2.10.10

FROM ${img_user}/${img_repo}:${img_tag} AS deps

Expand Down
2 changes: 1 addition & 1 deletion bin/dl-serve
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Serve(dripline.core.ObjectCreator):
self.handler.setLevel(verbosity)
logger.setLevel(verbosity)

sig_handler = scarab.SignalHandler()
sig_handler = scarab.SignalHandler(True)

# Prior to v4.8.0, service configuration information was nested within the `runtime-config` block
# This deprecates that usage and moves everything within `runtime-config` to the top level of the configuration
Expand Down
17 changes: 15 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Types of changes: Added, Changed, Deprecated, Removed, Fixed, Security

## [Unreleased]


## [5.1.3] - 2026-01-22

### Changed

- Updated dl-cpp version to v2.10.10

### Fixed

- Receiver class binding switched to use smart holder; all other bindings switched to smart holder too, except where that doesn't work


## [5.1.2] - 2025-12-03

## Changed
### Changed

- Updated dl-cpp version to v2.10.9


## [5.1.1] - 2025-11-05

## Changed
### Changed

- Updated dl-cpp version to v2.10.8

Expand Down
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
## the appVersion is used as the container image tag for the main container in the pod from the deployment
## it can be overridden by a values.yaml file in image.tag
appVersion: "v5.1.2"
appVersion: "v5.1.3"
description: Deploy a dripline-python microservice
name: dripline-python
version: 1.1.2
4 changes: 1 addition & 3 deletions module_bindings/dripline_core/core_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ namespace dripline_pybind
std::list< std::string > all_items;

all_items.push_back( "SentMessagePackage" );
pybind11::class_< dripline::sent_msg_pkg,
std::shared_ptr< dripline::sent_msg_pkg >
>( mod, "SentMessagePackage", "Data structure for sent messages" )
pybind11::classh< dripline::sent_msg_pkg >( mod, "SentMessagePackage", "Data structure for sent messages" )
.def_property_readonly( "successful_send", [](const dripline::sent_msg_pkg& an_obj){ return an_obj.f_successful_send; } )
.def_property_readonly( "send_error_message", [](const dripline::sent_msg_pkg& an_obj){ return an_obj.f_send_error_message; } )
;
Expand Down
1 change: 1 addition & 0 deletions module_bindings/dripline_core/dripline_config_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace dripline_pybind
std::list< std::string > all_members;

all_members.push_back( "DriplineConfig" );
// scarab::param_node uses class_, so we don't use classh here
pybind11::class_< dripline::dripline_config, scarab::param_node >( mod, "DriplineConfig" )
.def( pybind11::init<>(), DL_BIND_CALL_GUARD_STREAMS )
;
Expand Down
3 changes: 0 additions & 3 deletions module_bindings/dripline_core/message_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@

#include "uuid.hh"

#include "logger.hh"

#include "pybind11/pybind11.h"
#include "pybind11/iostream.h"
#include "pybind11/eval.h"

#include <boost/uuid/uuid_io.hpp>
#include <boost/lexical_cast.hpp>

LOGGER( dlog_mph, "message_pybind.hh" )

namespace dripline_pybind
{
Expand Down
2 changes: 1 addition & 1 deletion module_bindings/dripline_core/receiver_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace dripline_pybind
std::list< std::string > all_members;

all_members.push_back( "Receiver" );
pybind11::class_< dripline::receiver, scarab::cancelable, std::shared_ptr<dripline::receiver> >( mod, "Receiver", "Collect and combine message chunks into a full message object")
pybind11::classh< dripline::receiver, scarab::cancelable >( mod, "Receiver", "Collect and combine message chunks into a full message object")
.def( pybind11::init<>() )

.def_property( "single_message_wait_ms",
Expand Down
2 changes: 1 addition & 1 deletion module_bindings/dripline_core/return_code_trampoline.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace dripline_pybind
{

class return_code_trampoline : public dripline::return_code
class return_code_trampoline : public dripline::return_code, public pybind11::trampoline_self_life_support
{
public:
using dripline::return_code::return_code;
Expand Down
5 changes: 2 additions & 3 deletions module_bindings/dripline_core/return_codes_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@

namespace dripline_pybind
{
LOGGER( dl_pybind_retcode, "return_codes_pybind" );
// Macro for binding dripline-cpp return codes; note, it uses local variables defined and scoped in this header
#define ADD_DRIPLINE_RET_CODE( cpp_name, py_name ) \
all_items.push_back( "DL_" #py_name ); \
pybind11::class_< dripline::dl_##cpp_name, dripline::return_code >( mod, "DL_" #py_name, "" ) \
pybind11::classh< dripline::dl_##cpp_name, dripline::return_code >( mod, "DL_" #py_name, "" ) \
.def( pybind11::init<>() ) \
.def_property_readonly( "value", &dripline::dl_##cpp_name::rc_value ) \
.def_property_readonly( "name", &dripline::dl_##cpp_name::rc_name ) \
Expand All @@ -28,7 +27,7 @@ namespace dripline_pybind
std::list< std::string > all_items;

all_items.push_back( "ReturnCode" );
pybind11::class_< dripline::return_code, return_code_trampoline >( mod, "ReturnCode", "base class for return codes" )
pybind11::classh< dripline::return_code, return_code_trampoline >( mod, "ReturnCode", "base class for return codes" )
.def( pybind11::init<>() )
.def_property_readonly( "value", &dripline::return_code::rc_value, "return code value" )
.def_property_readonly( "name", &dripline::return_code::rc_name, "return code name" )
Expand Down
2 changes: 1 addition & 1 deletion module_bindings/dripline_core/run_simple_service_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace dripline_pybind
{
std::list< std::string > all_items;
all_items.push_back( "simple_service" );
pybind11::class_< dripline::simple_service, std::shared_ptr< dripline::simple_service > >( mod, "simple_service", "Minimal example of a dripline service" )
pybind11::classh< dripline::simple_service >( mod, "simple_service", "Minimal example of a dripline service" )
.def( pybind11::init< const scarab::param_node& >() )
.def( "execute", &dripline::simple_service::execute, DL_BIND_CALL_GUARD_STREAMS_AND_GIL )
;
Expand Down
1 change: 1 addition & 0 deletions module_bindings/dripline_core/service_config_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace dripline_pybind
std::list< std::string > all_members;

all_members.push_back( "ServiceConfig" );
// scarab::param_node uses class_, so we don't use classh here
pybind11::class_< dripline::service_config, scarab::param_node >( mod, "ServiceConfig" )
.def( pybind11::init< const std::string& >(),
DL_BIND_CALL_GUARD_STREAMS,
Expand Down
3 changes: 1 addition & 2 deletions module_bindings/dripline_core/specifier_pybind.hh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ namespace dripline_pybind
{
std::list< std::string > all_items;
all_items.push_back( "Specifier" );
pybind11::class_< dripline::specifier, std::shared_ptr< dripline::specifier >
>( mod, "Specifier", "All routing key content after the first '.' delimiter" )
pybind11::classh< dripline::specifier >( mod, "Specifier", "All routing key content after the first '.' delimiter" )
.def( pybind11::init< const std::string& >(),
pybind11::arg( "unparsed" ) = "")
.def( "parse", &dripline::specifier::parse, "parses the specifier and populates internal attributes", DL_BIND_CALL_GUARD_STREAMS )
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def build_extension(self, ext):
]

#cfg = 'Debug' if self.debug else 'Release'
cfg = 'DEBUG'
cfg = 'Release'
build_args = ['--config', cfg]

if platform.system() == "Windows":
Expand Down
8 changes: 8 additions & 0 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ def test_service_creation():
a_service = dripline.core.Service(a_name, make_connection=False)
assert(a_service.name == a_name)

def test_cancelation():
a_service = dripline.core.Service("a_service", make_connection=False)
assert(not a_service.is_canceled())
a_sighand = scarab.SignalHandler(False)
a_sighand.add_cancelable(a_service)
a_sighand.cancel_all(0)
assert(a_service.is_canceled())

def test_submit_request_message():
a_name = "a_service"
a_service = dripline.core.Service(a_name, make_connection=False)
Expand Down