ci: test dev against TA-Lib C's dev branch - #760
Merged
Conversation
The dev line requires a TA-Lib C that has no release yet, so a PR into dev could not build -- and in fact ran nothing at all, since tests.yml triggers on master only. This adds tests-dev.yml, which triggers on dev, builds the C library from source at the tip of its dev branch and caches it by commit, then runs the same steps tests.yml does. tests.yml is untouched: master keeps installing the published release. It resolves the commit with git ls-remote rather than api.github.com, which is rate limited per runner IP and answers 403 often enough to redden a job for a reason unrelated to the code under test. TA-Lib C has since retired the Metastock compatibility behaviour and made the setter inert, so test_compatibility pins only the default; asserting what the setter used to change would pass on one C release and fail on the next.
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.
Adds
.github/workflows/tests-dev.yml.tests.ymlis untouched —masterkeeps installing the published TA-Lib C release, exactly as today.
Why
devrequires a TA-Lib C that has no release yet: the latest tag isv0.7.1,while
talib/__init__.pyondevalready declaresTA_LIB_C_REQUIRED = '0.8.1'and its committed_ta_lib.ccallsTA_CMF_Lookback. So a PR intodevcannot build against the released library.It also never tried:
tests.ymltriggers onmasteronly, so across the last 40runs of that workflow
devdoes not appear once. Every PR intodevhasbeen merging with no checks at all.
What it does
Triggers on
dev, resolves the tip of TA-Lib C'sdevbranch, builds it fromsource and caches it by commit, then runs the same steps
tests.ymlruns. Thetwo dev lines therefore move in lockstep, and a C change that breaks the wrapper
shows up here rather than at release time.
The commit is resolved with
git ls-remote, notapi.github.com. The API israte limited per runner IP, and its 403 had already reddened an unrelated job on
this repo while I was preparing #759.
One adaptation
TA-Lib C
#388retired the Metastock compatibility behaviour and made the setterinert.
tests/test_func.py::test_compatibilityasserted the Metastock EMA values,so it now pins only the default — asserting what the setter used to change would
pass on one C release and fail on the next.
Verified
Built
devplus this change against TA-Lib Cdev(1487072): builds clean,81 passed.
Merge this before #759
#759 (the streaming API) targets
devand needs this workflow to exist ondevbefore it can be checked at all. Once this lands I will rebase #759 onto it.