Skip to content

Polish R-side - #79

Merged
serkor1 merged 28 commits into
refactor-codegenfrom
polish-R-files
Jul 26, 2026
Merged

Polish R-side#79
serkor1 merged 28 commits into
refactor-codegenfrom
polish-R-files

Conversation

@serkor1

@serkor1 serkor1 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

📚 What?

This PR polishes the R-side of things of the existing changes made during the refactoring of the codegen.
Its primarily intended to rebuild the R side to its old functionality, and making the new interface "work as intended".

serkor1 added 13 commits July 26, 2026 11:43
* The optional documentation is mined fromn the .xml file and manipulated
  so it emits proper R documentation for each documented parameter.
* This change reflects the new signature the exported
  functions follow.
* Added entry to the README on the emitted the maType documentation for future
  reference.
* Instead of mining <Type>-tags, mining <Name>-tags produces more reliable
  emission of input columns.
  - All columns are now 1:1 mapped instead of a greedy approach which classifies
    unmatched columns to 'close'
* The generated R files based on Transforms with more than
  one series (See TA_CORREL) were only emitting a single 'x' instead
  of x,y pair.
* The same-ol 0 --> "SMA", 1 --> "EMA" etc. for decorating
  charts.
* MAVP has its own example to accomodate the
  additional array of periods needed in the
  underlying C-signature.
* All output is documented via roxygen2 templates
  which fails for MAVP due to missing periods column
  + The addition here avoids messing with the data-raw
    files. And documentation is generally generated once
    so its basically zero cost.
* This commit is related to 107c25b
  where arguments were changed.
* Its unclear when the CLAUDE.md files were merged into the {talib}
  repository - but R CMD check have not complained about this before now.
@serkor1 serkor1 added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 26, 2026
serkor1 added 15 commits July 26, 2026 15:27
* This is a barebone implementation without any modifications
  mainly added to supress the R CMD check errors.
  - It will be properly implemented in a later iteration.
* They are to be rewritten in a later iteration - too much AI slop
  and refactoring to do it meaningfully with the current setup.
* This is a Time Series Forecasting function. I have not studied
  the source code as per this commit - but as with the remaining regression
  related functions, I believe that R has a better available suite for this but
  I am open to include this (or similar functions) if there is demand for it.
* This is a Time Series Forecasting function. I have not studied
  the source code as per this commit - but as with the remaining regression
  related functions, I believe that R has a better available suite for this but
  I am open to include this (or similar functions) if there is demand for it.
* The function helps mapping maTypes back and forth
  to TA_MA()-functions, and map the types to characters
  for charting.
* All MA functions returns a maType-class list
  if x is missing - this functionality has always
  been in {talib} but without the explicit classes
  and dispatches.

  With the current changes so far, the S3 serves a rather
  crucial role in translating the maType-list back and forth
  from C and the charts.

  It was mainly implemented to fix ta_VOLUME which would
  crash due to the C-side extracting the first argument
  of the list that was coerced to a integer vector.

* With this new S3 helper charting and new functions
  should become easier - this is what we call positive externality
  in economics.
* All vignettes render cleanly locally.
* This vignette was written "just" to to show {tidyverse} could
  be used for future tidy-people.
  The vignette was written purely with AI, without any consideration
  for the actual use-case or necessity.
  - Off it goes!
* Some indicators requires custom examples to
  run like, for example, the ta_MAVP - the new boolean
  flag takes precedence over any auto-generated example.
* This keeps R CMD check happy!
* The helper files are run before the tests starts altogether.
  So the data can be properly prepared *once* and passed downstream.
* This is an artifact from X-macro PR where it
  seemed like a good idea to add void to the C-signature
  + This commit is mostly to satisfy R CMD check rather than
    a proper fix on anything. Most of the zzz.R functions onload and unload
    are obsolete as its handled on the C-side anyways.
@serkor1 serkor1 changed the title Polish r files Polish R-side Jul 26, 2026
@serkor1
serkor1 marked this pull request as ready for review July 26, 2026 19:19
@serkor1
serkor1 merged commit 4d67476 into refactor-codegen Jul 26, 2026
2 checks passed
@serkor1
serkor1 deleted the polish-R-files branch July 26, 2026 19:19
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.71429% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.85%. Comparing base (e78212b) to head (2bbc10e).
⚠️ Report is 32 commits behind head on refactor-codegen.

Files with missing lines Patch % Lines
R/ta_MACDEXT.R 66.66% 3 Missing ⚠️
R/ta_MAVP.R 97.00% 3 Missing ⚠️
R/ta_DEMA.R 0.00% 2 Missing ⚠️
R/ta_EMA.R 0.00% 2 Missing ⚠️
R/ta_KAMA.R 0.00% 2 Missing ⚠️
R/ta_MAMA.R 0.00% 2 Missing ⚠️
R/ta_MIDPOINT.R 97.72% 2 Missing ⚠️
R/ta_MIDPRICE.R 97.64% 2 Missing ⚠️
R/ta_STOCH.R 50.00% 2 Missing ⚠️
R/ta_T3.R 0.00% 2 Missing ⚠️
... and 11 more
Additional details and impacted files
@@                 Coverage Diff                  @@
##           refactor-codegen      #79      +/-   ##
====================================================
- Coverage             95.02%   93.85%   -1.17%     
====================================================
  Files                   153      151       -2     
  Lines                 16890    18040    +1150     
====================================================
+ Hits                  16049    16931     +882     
- Misses                  841     1109     +268     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant