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

Observable_interval function added and months_observable aliased #531

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tygger7
Copy link

@tygger7 tygger7 commented Nov 2, 2022

Added a generic version months_observable called observable_interval. I also aliased months_observable to maintain backwards comparability, and help clean the code base. weeks_observable and days_observable aliases were also added; I felt it appropriate with months_observable remaining 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.

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
@tygger7
Copy link
Author

tygger7 commented Nov 4, 2022

I have fixed the code style issues that were preventing check completion.

minor white space errors removed in aliased functions and between aliased function
@tygger7
Copy link
Author

tygger7 commented Nov 16, 2022

I have correct the issues that were indicated in the workflow.

@bmorris3
Copy link
Contributor

This is looking good. Could you please add tests for the new methods days_observable and weeks_observable?

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

Successfully merging this pull request may close these issues.

2 participants