-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary packages, cleanups. #500
base: master
Are you sure you want to change the base?
Conversation
Source and tests should be distinct.
This rule is blocking files in .github for example.
0b45906
to
8722ece
Compare
It's stored as an artifact and passed into the test matrix jobs.
Use proper pytest fixtures for shared test data. Remove two unnecessary array comparison functions.
c4b4e74
to
71ca307
Compare
Cool! Let me know when you want me to review this. |
5f49bf3
to
3a6fbdf
Compare
Almost ready, just some fixes for m1 macs to go and to re-add the upload to pypi I removed while testing. This builds binary packages for py3.7-310 on arm64-linux, arm64-m1, Power-linux,, x86_64 win/mac/linux. |
That's pretty cool. What controls when it uploads? Is it tagged releases only? |
I'm using my same workflow modified from pysimdjson. This pr is currently missing half the workflow because I don't want it to actually upload while I'm testing :) When you push a tag that starts with v+number it'll make a release, push it to pypi, and create a release on GitHub adding all the build artifacts to it. Then you can just add a description. |
So far my convention has been tagging, for example |
Btw, thank you for the contributions! |
It's just a regex, easy change. |
@mrjbq7 the tests look like they're finding some precision issues on i686:
|
@mrjbq7 This is 90% of the way there, and just needs a few more fixes. This PR now bundles ta-lib (actually a The release action for building binary wheels from 3.8 to 3.10 is done and working, https://github.com/TkTech/ta-lib/actions/runs/2357646627. I've commented out support for ppc64le and aarch64 in I've removed py3.7 from the workflows as both numpy and pandas have dropped support for these. There's no version of pandas that supports both 3.7 and 3.10, so you have to chose. That said, someone else can totally add support for more versions, they just need to add another build step to install older versions of numpy+pandas for those versions of Python. What's left for this is:
|
That seems great, I wonder if we can apply those fixes to https://github.com/ta-lib/ta-lib and make that our official source. It's possible the current directory is wrong for the |
I'd like if there was one spot, but that repo definitely seemed to be abandoned. PRs and issues have been ignored for years.
AHHHH, you know what, I bet you this is exactly what's happening! pip just changed the behavior for build-in-place too and we update pip as the first step. |
We made this as a clone of the source forge repo, there was some idea of taking over maintenance, but that seemed overly ambitious. |
Ah I didn't see you on the contributor list when I took a peek. If you have commit access to it that's great, we can definitely use it instead. |
any update on this? it'd be great to have ta-lib release binaries (mainly for windows) - especially since the prior source (https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib) seems to have been archived - and didn't update since June. This makes every ta-lib update a pain for users - since installing on windows is currently really not fun. |
I've taken the liberty to play with this a bit, updating it with the current master, and testing the wheels. The CI runs on current master are available here: As mentioned above already - the "release" step has to be updated to only run on tags - and an "upload" step that publishes the wheels to pypi (if that's something you're interested in in the first step - this could also be done manually initially). I've manually tested the wheels on windows and linux, and can confirm they work fine. I've added a "test wheels" step to CI too - which is using a clean environment, only installing the wheels - to ensure they're working on windows, mac and linux. The "manual test" step here involves calling @mrjbq7 i'd make a PR out of that if you're interested - it'll include the work of this PR - but with the intend to have it merged ASAP - simplifying people's update and installation steps. |
I love this idea, not sure about using this for releases, until I understand how to only have it release tags, and also how to download and test the intermediate artifacts myself?
For test case, you could do something simple like make a 6 element numpy array and run SMA on it and assert the result, and probably do it with python -c
… On Sep 10, 2022, at 12:11 AM, Matthias ***@***.***> wrote:
I've taken the liberty to play with this a bit, updating it with the current master, and testing the wheels.
The CI runs on current master are available here:
tests: https://github.com/xmatthias/ta-lib/actions/runs/3027067796
build: https://github.com/xmatthias/ta-lib/actions/runs/3027067795
As mentioned above already - the "release" step has to be updated to only run on tags - and an "upload" step that publishes the wheels to pypi (if that's something you're interested in in the first step - this could also be done manually initially).
I've manually tested the wheels on windows and linux, and can confirm they work fine.
I've added a "test wheels" step to CI too - which is using a clean environment, only installing the wheels - to ensure they're working on windows, mac and linux.
This will ensure that wheels about to be uploaded are actually built properly (i don't fully trust wheel building - therefore prefer to test them individually) - and is basically taking the approach used in pytables CI as well.
The "manual test" step here involves calling python -m talib.abstract. It'll fail if ta-lib binaries are not properly installed / available.
If there's a better test command we can and should obviously update to that - i'd however not run pytest - as test-files are not included in the release.
@mrjbq7 i'd make a PR out of that if you're interested - it'll include the work of this PR - but with the intend to have it merged ASAP - simplifying people's update and installation steps.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
You can download the artifacts from the build all the way at the bottom (see screenshot). it's a zip file, which contains the source tarball (what you release currently) - as well as all wheels for different plattforms.
that's no problem, really - you'll always have the option to download the wheels first - inspect/test them - and then push them to pypi manually (basically with i think users will benefit from this by having the installation simplified with |
If you're basing your changes off of mine, that's already what cibuildwheel is doing. It'll build the wheels, copy them into a new env, and run the tests before allowing it to pass. |
i am aware of that - but i don't fully trust that for libraries like ta-lib (Or pytables, for that matter). the wheels would also work if ta-lib is installed system-wide - reusing the library from some place like /usr/lib or similar. |
Do we want to bundle Can we get a version of this that does everything but doesn't upload releases, and get that merged? |
You need to bundle upstream - the reason I include a |
Want to collaborate in the ta-lib/ta-lib GitHub org? We can push those patches there, and maybe move this to ta-lib/ta-lib-python?On Sep 13, 2022, at 8:04 AM, Tyler Kennedy ***@***.***> wrote:
You need to bundle upstream - the reason I include a git subtree of my fork of ta-lib is for platform compatibility, and ta-lib.org will never see updates. The fork will build on a Pinebook Pro for example, whereas ta-lib.org will not.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sure, I have no issue with this. I think we discussed this before and the reason I forked was that the repo seemed inactive.
ta-lib should never be used from the system now, we explicitly bundle it. If there's a place where we're accidentally allowing a system ta-lib to get linked in we've got a bug. There are fixes for 32bit/64bit precision and platform support that the archaic system package manager versions will not have. |
@TkTech What's the actual source for the "inlined", upstream ta-lib repository? comparing it to https://github.com/TA-Lib/ta-lib (basically did a clone - and copied the contents of upstream over the clone) - i do see quite severe differences. i've now tried to use the upstream one (branch master) - the diff this caused can be found here: edit seems like there's actually been a 0.5.0 release of TA-Lib - and a 0.6.0 dev (which represents the emaster branch). |
@xmatthias sorry, missed your reply. The upstream version I used is the official ta-lib release from https://ta-lib.org/. The version on github is an "unofficial" (but defacto official at this point) version by @mrjbq7 and friends (I believe) |
Official https://ta-lib.org/ conatins a realease of 0.4.0 and official https://ta-lib.org/ 's project at sourceforge contains unreleased 0.6.0-dev. It's not about github or unofficial forks in any case. Didn't read the whole thread - just leave here a note from my old findings from my old article about compatibility:
Thet's a most important (may be only one - don't remember) difference in my opinion. |
i've (successfully) built wheels for all versions (0.5.0, 0.6.0-dev, 0.4.0 <- all from github, 0.4.0 from orig source) i also agree with @trufanov-nok that the floating point fix should be included. a rough overview of this change can be found in this commit: xmatthias@6452708 (which also adds a testcase ensuring this fix is included). I think which version should be used initially is a decision @mrjbq7 will have to take (please let us know your thoughts). Personally, i'd recommend to go with a 0.4.0 version initially, with the float fix applied (don't care if it's the github one or the ta-lib.org one, really). Future updates to 0.5.0 or 0.6.0 can then be made as future steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2 改,其他过。 ta
-taller
Hello all, Another idea is to include the talib source as a git submodule. This way even source distributions can be built on the go by any user. This approach would simplify the management of the package and the source versions can be pinned. |
Didn't mean to make this PR against upstream just quite yet, ah well. WIP.
Changes:
Test Cleanups
assert_np_arrays_equal
andassert_np_arrays_not_equal
, replacing them with the built-innumpy.testing.assert_array_equal
python_versions * architecture
times. We still test intests.yml
, but not on releases. They're working on packaging, this can be reversed when that's done.Release