From 68a21c5a5952913d6192be747efd245887bc36cc Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:24:54 +0200 Subject: [PATCH 1/4] Fix substring calculation in CSV cell parsing and add lexical_cast for signed and unsigned char --- include/xtensor/io/xcsv.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/xtensor/io/xcsv.hpp b/include/xtensor/io/xcsv.hpp index 080ccaf54..2fd347745 100644 --- a/include/xtensor/io/xcsv.hpp +++ b/include/xtensor/io/xcsv.hpp @@ -66,7 +66,7 @@ namespace xt } size_t last = cell.find_last_not_of(' '); - return cell.substr(first, last == std::string::npos ? cell.size() : last + 1); + return cell.substr(first, last == std::string::npos ? cell.size() : last - first + 1); } template <> @@ -93,6 +93,18 @@ namespace xt return std::stoi(cell); } + template <> + inline signed char lexical_cast(const std::string& cell) + { + return static_cast(std::stoi(cell)); + } + + template <> + inline unsigned char lexical_cast(const std::string& cell) + { + return static_cast(std::stoul(cell)); + } + template <> inline long lexical_cast(const std::string& cell) { From b6d8b7ddda3c7cb3fd0d962e3a0c77cb828d896a Mon Sep 17 00:00:00 2001 From: Alexis Placet Date: Wed, 10 Jun 2026 17:05:17 +0200 Subject: [PATCH 2/4] Use namespace runner --- .github/workflows/codspeed.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 9e2c5999c..752c6045d 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -2,11 +2,12 @@ name: CodSpeed on: push: - branches: [master] - pull_request: - # Allow CodSpeed to trigger backtest performance analysis + branches: [ master ] + pull_request: # Allow CodSpeed to trigger backtest performance analysis + workflow_dispatch: + permissions: contents: read id-token: write @@ -22,7 +23,7 @@ defaults: jobs: benchmarks: name: Run benchmarks - runs-on: ubuntu-latest + runs-on: namespace-profile-benchmark steps: - name: Checkout code uses: actions/checkout@v6 From 2e17fcf29b6f945da08546294d207ab71497bcd9 Mon Sep 17 00:00:00 2001 From: Alexis Placet Date: Wed, 10 Jun 2026 17:43:04 +0200 Subject: [PATCH 3/4] try privileged --- .github/workflows/codspeed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 752c6045d..988cdad06 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -23,7 +23,7 @@ defaults: jobs: benchmarks: name: Run benchmarks - runs-on: namespace-profile-benchmark + runs-on: namespace-profile-benchmark;container.privileged=true;container.host-pid-namespace=true steps: - name: Checkout code uses: actions/checkout@v6 From 25ccb3d8c3ed269034a59dbfb069be5391abd6b9 Mon Sep 17 00:00:00 2001 From: Alexis Placet Date: Wed, 10 Jun 2026 18:01:03 +0200 Subject: [PATCH 4/4] formatting --- .github/workflows/codspeed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 988cdad06..05d385180 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -2,7 +2,7 @@ name: CodSpeed on: push: - branches: [ master ] + branches: [master] pull_request: # Allow CodSpeed to trigger backtest performance analysis workflow_dispatch: