🔨 X-Macros#78
Merged
Merged
Conversation
* All lookback related functions have been removed to accomodate the new codegen that uses the exact signature of the TA_<indicato>_lookback funtions.
* It compiles and works.
* These are now deprecated in favor of the X-macros if there is any need in looking back it is always possible to back a few commits and read the code.
* This part is obsolete as well.
* TA-Lib.c includes all TA-Lib specific settings like candlestick settings. * The old implementation of candlestick settings used two steps to generate C compatible types but it seems that direct casting with Rf_asTYPE does the trick aswell.
* Reintroduced shift_array * Renamed and documented set_colnames * TA_WRAPPER instead of whatever it was before
* This is mainly to look cool and save some Lines
* The implementation are made by Claude
* Mainly a checkpoint
* They now use shift_array directly
* THe names are for <matrix> and <data.frame>
* The amount of code per file is getting out of hand.
* The functions should always return a matrix.
* This is the old attributes just with Enums
* But it does ot use TA_LOOKBACK as of now.
* The sizes of the original file were getting out of hand, and now it has been modularized and looks like the olde implementation.
* The addition is simple and straightforward. It follows the original implementation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## refactor-codegen #78 +/- ##
====================================================
- Coverage 96.47% 95.02% -1.46%
====================================================
Files 281 153 -128
Lines 23849 16890 -6959
====================================================
- Hits 23009 16049 -6960
- Misses 840 841 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
* The function macro TA_WRAPPER has been cleaned up so its flow resembles the original implementation and is a tad more readable * Spelling and consistency errors in headers and functions * Renamed talib_map --> preprocessor.h as this name is more fitting for what it actually does.
* Moved all declarations to init.c to keep the dependency tree clean: preprocessor --> wrapper --> --> init.c This is (as far as I know) the canonical way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 What?
This PR is a rewrite of the source code that binds TA-Lib to R. The overall goal is to reduce the amount of code, and simplify the C-wrappers. It has been implemented incrementally, so much of the original functionality as been deleted but is to be reintroduced in a similar fashion.
There has been no consideration for backwards compatibility which in this case means that a part of the R logic has to be re-written (This does not affect the signatures at all). All *_lookback functions, for example, now only accepts the relevant arguments in
.Call()which breaks with the current R side logic. (This should be possible by only rewriting the templates, so the PR is mainly focused on the C-side)📋
[ ] Rework *_lookback()