Observable_interval function added and months_observable aliased#531
Open
tygger7 wants to merge 7 commits intoastropy:mainfrom
Open
Observable_interval function added and months_observable aliased#531tygger7 wants to merge 7 commits intoastropy:mainfrom
Observable_interval function added and months_observable aliased#531tygger7 wants to merge 7 commits intoastropy:mainfrom
Conversation
added a generic function of `months_observable` called `observable_interval` that takes 'days','weeks',or 'months' and returns the same results.
old version was not including the 31st of December in its calculations for `months_observable`. This was the only function to use this, so it is an easy update, and with `observable_interval` added is needed.
Made `months_observable` an alias of `observable_interval` to maintain backwards compatibility. Also added `weeks_observable` and `days_observable` aliases.
I also made a small change to `observable_interval` to enhance output readability in the case a target is never visible given the constraints. (would have been "set()" now is "{}")
fixed the issues that were noted with the tox check
Author
|
I have fixed the code style issues that were preventing check completion. |
minor white space errors removed in aliased functions and between aliased function
Author
|
I have correct the issues that were indicated in the workflow. |
Contributor
|
This is looking good. Could you please add tests for the new methods |
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.
Added a generic version
months_observablecalledobservable_interval. I also aliasedmonths_observableto maintain backwards comparability, and help clean the code base.weeks_observableanddays_observablealiases were also added; I felt it appropriate withmonths_observableremaining in the code. Lastly, I fixed a small issue with the "_current_year_time_range" as I noticed that it was not calculating visibility for December 31st in its current form.Let me know if there is anything you think might need changed.