-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feature(addLimitsMaxPeriod): limit start_date to its minimal allowed value #1286
base: main
Are you sure you want to change the base?
Conversation
…value depending on the interval when period is set to max
What code does is different to title. I expected this:
Btw, I think code can be simplified by doing this instead (only tested on one ticker):
|
I disagree with the first part. The code already sets start to a lower value in case of a known interval, so it is like: I don't get the second part of your comment, we are talking about a piece of code to be added to the |
First part - just me being pedantic, not really important. Your change doesn't prevent user from providing start date before minimum allowed. E.g. Second part - I've pushed a change to explain clearly, do you see any different behaviour? |
I am still confused. Also, I am not sure to understand, if you comment out the lines with the limits, how are the limits applied? |
Because |
They have default ranges that are smaller than the max allowed: Setting interval to 1h the max range allowed is 730 days, but yahoo set this by default to 60 |
3fb7d83
to
cf78698
Compare
Ah I gotcha. I've rolled back my commit, you might need to re-clone branch. |
Thanks for taking time to go over it. |
I'm only one actually approving merges currently, and a few others sometimes check in to comment/object. Not enough given size of userbase but 🤷 Rough process is:
|
I've added tests, that picked up some bugs that I fixed. If happy I will merge. |
I understand your fix make it work in cases when end is in the future. Wouldn't it be better to prevent end to be in the future? |
It should handle any end date. I added Are you familiar with test-driven development (TDD)? If you think a specific scenario should be handled a specific way, implement it in a unit test. |
@Anto95 Do you still have concern? |
Hello @ValueRaider , no more concern on my side, thanks for your explanation. |
I just noticed you're targeting |
Limit start_date to its minimal allowed value depending on the interval when period is set to max.
It was done with the use case of interval=1m, this works for all intervals