Closed BSchilperoort closed 2 years ago
@Peter9192 , @geek-yang
I have currently implemented allow_overlap
as a kwarg for the calendars. However, this starts to make the amount of arguments for a calendar quite extensive (pylint complains, although it already counts 'self' as an argument in the max number).
An alternative way I can implement this would be by implementing a setter, e.g.:
calendar = AdventCalendar(anchor=(12, 31), freq='1d', max_lag=400)
calendar = calendar.set_allow_overlap(True)
@Peter9192 , @geek-yang I have currently implemented
allow_overlap
as a kwarg for the calendars. However, this starts to make the amount of arguments for a calendar quite extensive (pylint complains, although it already counts 'self' as an argument in the max number).An alternative way I can implement this would be by implementing a setter, e.g.:
calendar = AdventCalendar(anchor=(12, 31), freq='1d', max_lag=400) calendar = calendar.set_allow_overlap(True)
To me, it makes more sense to have this allow_overlap
as a kwarg, since it is one of the choices that the user needs to make to have the desired calendar. The setter thingy sounds more logical for an added feature. I would prefer to keep it the way it is implemented now.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Kudos, SonarCloud Quality Gate passed!
This PR aims to close a few backlog issues about the Calendar/resampling functionality:
List of changes:
./utils.py
to avoid cluttering_resample.py
.allow_overlap
kwarg to allow overlapping intervals between anchor_years (and thus not skip years).Closes AI4S2S/s2spy#67 Closes AI4S2S/s2spy#44