Skip to content

{talib} v0.9-3 has been submitted to CRAN!#65

Draft
serkor1 wants to merge 16 commits into
CRANfrom
devel
Draft

{talib} v0.9-3 has been submitted to CRAN!#65
serkor1 wants to merge 16 commits into
CRANfrom
devel

Conversation

@serkor1

@serkor1 serkor1 commented May 26, 2026

Copy link
Copy Markdown
Owner

Note

This PR is a WIP.

serkor1 and others added 6 commits May 10, 2026 18:51
* This commit introduces support for cached builds across installation runs
  for each pushed update. It supports ccache, sccache and distcc. At this stage
  its only tested for remote installs, but it *should* cover all edge-cases either
  way as the compiled library is otherwise the same.

* This commit closes #57 by implementing
  cached builds across installation runs.
* The README has been streamlined and now positions the {talib} relative to the upstream, and (implicitly) relative to the wider R ecosystem.

* The usage examples have been equally weighted between charting and indicators in general, with a generally higher emphasis on the candlestick pattern recognition which is the primary differentiator against {TTR}
* normalize one-column numeric indicator outputs back to double vectors
* update the generated numeric templates so future wrappers keep the same behavior
* tighten generated numeric tests to reject one-column matrix results while preserving multi-column matrix outputs

Fixes #61

---------

Signed-off-by: nvphungdev <283886185+nvphungdev@users.noreply.github.com>
Co-authored-by: nvphungdev <283886185+nvphungdev@users.noreply.github.com>
* The benchmarks now covers comparisions against
  {TTR} across multiple indicators and presents them
  in the README accordingly.

* The benchmarks now compares the .Call against the
  dispatched methods more thoroughly than before.
  The goal of the benchmarks is primarily micro-optimizations
  on the R side.
* The README now includes a subtle reference to
  the benchmark where the claim of speed is made.

* Added linebreak after dots (this is good standard)
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.33951% with 151 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.47%. Comparing base (11ed302) to head (02b87fa).
⚠️ Report is 2 commits behind head on CRAN.

Files with missing lines Patch % Lines
R/lookback.R 68.75% 20 Missing ⚠️
R/ta_VOLUME.R 87.50% 3 Missing ⚠️
R/ta_BBANDS.R 89.47% 2 Missing ⚠️
R/ta_HT_PHASOR.R 86.66% 2 Missing ⚠️
R/ta_HT_SINE.R 86.66% 2 Missing ⚠️
R/ta_MACD.R 88.88% 2 Missing ⚠️
R/ta_MACDEXT.R 90.47% 2 Missing ⚠️
R/ta_MACDFIX.R 87.50% 2 Missing ⚠️
R/ta_MAMA.R 88.23% 2 Missing ⚠️
R/ta_STOCHRSI.R 89.47% 2 Missing ⚠️
... and 112 more
Additional details and impacted files
@@            Coverage Diff             @@
##             CRAN      #65      +/-   ##
==========================================
- Coverage   96.58%   96.47%   -0.11%     
==========================================
  Files         280      281       +1     
  Lines       21012    23849    +2837     
==========================================
+ Hits        20294    23009    +2715     
- Misses        718      840     +122     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

serkor1 and others added 10 commits June 6, 2026 10:48
* See issue #67 where remote installs
  fails on MacOS due to missing C header files. The error is related to gettext
  (source: https://stackoverflow.com/questions/11370684/what-is-libintl-h-and-where-can-i-get-it)

  The issue have not been addressed in the repository before now as it was assumed to be
  related to the workflow itself - the failed run coincided with the release of R4.6.0 which
  turned out to be a false-positive as it still an existing issue.

* Since the issue is most likely
  an upstream issue, the R-devel runs have been removed for all OSes and replaced with oldrel-2.

  Backwards compatibility is more imporant than experimental releases - if you decide to throw a development
  version of R against a package that deals with (potentially) expensive implementations, you have bigger things
  to worry about.
* This PR introduces a lookback function that wraps indicator_lookack that returns <NA> for invalid indicator and data pairs, and always minimum 1 (Can't calculate any indicators without data). The implementation differs from upstream in the way that upstream returns -1 for invalid pairs, and 0 for indicators that in reality does not need a lookback periods (C is 0-indexed).

* The implementation required significant backend changes that has no effect on the interface. One such example is using `dim(x) <- NULL` for 1D-arrays instead of `as.double()`; this introduces the following changes: (1) unit-testing has been made more flexible so it tests for `is.integer()` simultaneously as the new approach preserves the underlying storage mode. (2) parity-tests have, for lookback-calculation(s), been adapted to the new calculation of lookbacks.  

See PR #71 for more details.
* The indicators on C-side were generated using two separate templates for
  candlestick and non-candlestick. These have been consolidated to ease future
  changes from upstream and possible interface changes and additions.

* The lookback-functions on C-side now ignores ununused arguments
  to avoid compiler-warnings. The arguments have been kept to streamline
  function signatures on the R-side.
* Instead of relying on nested if-else statments, the if-else statements
  are heavily dependent on conditionals to be met.
* This is common knowledge: '<-' is for assignments
  its unclear when '=' was used in the code. But let this
  commit be testament to the commitment of correct use of
  assignment operators.
  - All hail the assignment operator.
* Without this, the documentation entry does not render.
  It appears that {roxygen2} looks for the top-level entry as
  the title, unless strictly typed.
* The example in lookback() were breaking because
  there was an additional non-existing argument passed
  into the downstream function.

* The (possible) fix is to let lookback() be strictly
  typed, for the lack of better words, such that it fails
  if the lookback signature doesn't match the downstream function
  entirely.

  This is probably not the best idea, but the lookback function is
  a function for 'developers' that seeks to wrap {talib} and it is therefore
  expected that the developer is familiar with the function(s).

  Even for non-developer use-cases this implementation has its justification
  in the sense that if there is a need to pre-calculate the lookback period
  it must be due to critical infrastructure implementations, which in return, again,
  requires familiarity with the function(s).
Bumps [src/ta-lib](https://github.com/TA-Lib/ta-lib) from `c042ea3` to `bffd837`.
- [Release notes](https://github.com/TA-Lib/ta-lib/releases)
- [Commits](TA-Lib/ta-lib@c042ea3...bffd837)

---
updated-dependencies:
- dependency-name: src/ta-lib
  dependency-version: bffd83732f0ab022a272ae6cd79d1ba6b32cc2ce
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [src/ta-lib](https://github.com/TA-Lib/ta-lib) from `bffd837` to `2247d59`.
- [Release notes](https://github.com/TA-Lib/ta-lib/releases)
- [Commits](TA-Lib/ta-lib@bffd837...2247d59)

---
updated-dependencies:
- dependency-name: src/ta-lib
  dependency-version: 2247d599bddf37ed37e3a709371517e46efc66f6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants