Skip to content
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

Missing Method List #329

Open
ArtReeX opened this issue Jul 5, 2020 · 24 comments
Open

Missing Method List #329

ArtReeX opened this issue Jul 5, 2020 · 24 comments

Comments

@ArtReeX
Copy link

ArtReeX commented Jul 5, 2020

Good day. this problem occurs in both PyCharm and VS Code. When importing talib, there are no available methods (because of which you have to use the Function method and pass the name there), which is not very convenient because you have to look at the arguments every time.

Python 3.8 / Poetry / MacOS

image

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 5, 2020 via email

@ArtReeX
Copy link
Author

ArtReeX commented Jul 5, 2020

I assume that doing something like ta.RSI(c, 10) works but this is an issue with their code completion?

On Jul 5, 2020, at 5:34 AM, Артур Лазаренко @.***> wrote:  Good day. this problem occurs in both PyCharm and VS Code. When importing talib, there are no available methods (because of which you have to use the Function method and pass the name there), which is not very convenient because you have to look at the arguments every time. Python 3.8 / Poetry / MacOS — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

I have tried all the various IDEs, as well as versions of Python 3 and above.
Not in one other library, such a problem does not arise.

I also tried to find similar answers, but it did not bring success.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 5, 2020 via email

@xtracool
Copy link

Hi John,

I'm using PyCharm Professional 2020.1 and I don't get any method suggestions either. I tried your example above for RSI, after typing in ta. or ta.R, I don't get a list of methods or suggestions.

I tried to use the Abstract API and using the example from your page:

sma = abstract.SMA # SMA is not suggested
sma = abstract.Function # Function is suggested, see screenshot

image

Any guidance/help would be greatly appreciated. Also, since I can't get the auto suggest/complete to work, what is the best way to see what parameters the methods require. I went back to SourceForge and original author's website and can't find a document.

-Ven

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 18, 2020 via email

@xtracool
Copy link

Amazing John, they do! Both the function and abstract APIs do, any further thoughts on why the IDE isn't working?
image

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 18, 2020 via email

@xtracool
Copy link

Thx, I'll go look thru the talib code and see if I can figure it out if there is some non-ascii character.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 18, 2020 via email

@xtracool
Copy link

xtracool commented Jul 18, 2020

I have a similar problem with one other package I use called pyEX (an interface for IEX Cloud for stock data). Never seen this issue otherwise.

I'm wondering if the issue is caused by the file that seems to be auto-generated called _ta_lib.py

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 18, 2020 via email

@xtracool
Copy link

Thank you, appreciate your support for the product! If there is a way to donate $ please LMK

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 19, 2020

No need for donations, thanks!

I was able to reproduce, and I believe that it's not working because of how we use __import__ to load and then wrap the functions to allow pandas compatibility.

Let me work on a fix.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 20, 2020

Can you test the master branch?

I changed how I do the imports slightly to make it more friendly to PyCharm's code completion. It seems to work for me?

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 20, 2020

I apologize that it took me 2 weeks to get around to looking at this.

If it works for you, I might do a little bit more cleanup and then maybe I should push a new release just so others don't have this problem. Nothing functional changed, just how the imports looked.

@ArtReeX
Copy link
Author

ArtReeX commented Jul 20, 2020

I apologize that it took me 2 weeks to get around to looking at this.

If it works for you, I might do a little bit more cleanup and then maybe I should push a new release just so others don't have this problem. Nothing functional changed, just how the imports looked.

I am waiting for a solution to this problem, just the same. All my friends do not have a list of functions.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 20, 2020 via email

@xtracool
Copy link

Will do a check out and try it.

@xtracool
Copy link

Hey John,
I reinstalled and here is what I got, looks like it is working! Is there a way of getting the argument list for the methods or is that not possible because of this being a wrapper for the C code? I don't get the arguments list in the console either. If that is a limitation, can you point me to a place (code or website) where I can look those up. I did do a search for the RSI method and found python code; one example just used talib.RSI and called the method with stock closing prices. I can across another website from someone who rewrote many of the C functions into python. That person's RSI function requires the df to have open and close prices and not the closing prices. So knowing the parameters would be greatly helpful.

Again thanks for the help!

image

@xtracool
Copy link

I think I found the link to the methods :)

https://mrjbq7.github.io/ta-lib/doc_index.html

@at-cf
Copy link

at-cf commented Sep 27, 2020

Hate to be the guy that asks this but any idea when the fix will be published under release? I try to avoid installing modules from branches, but if there is no plan to release soon then I will ☺️

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Sep 27, 2020 via email

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Sep 28, 2020

Released 0.4.19.

I would still like to fix the issue where it shows (args, kwds) instead of the actual arguments.

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 20, 2023

Can you see if this is fixed in the master branch?

I found a setting that I had not noticed in cython to embed function signatures.

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

No branches or pull requests

4 participants