fix: take past quarters into account for updates #22
+65
−49
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.
The current logic to apply updates was a bit surprising to me when I applied it to a repository that I wanted to convert to SPEC-0 dependencies: it applies updates to minimal dependencies from the current quarter but does not take previous quarters into account. For example, a project depending on
pandas>=2.1, will not see its minimum dependency updated, even though it is out of date, since the update to usepandas>=2.2already dates from the previous quarter. This does not matter for the ongoing usage of this action, once SPEC-0 is already in place, but I think new users would expect that it updates all outdated dependencies on its first usage (as e.g.dependabotwould do).With this PR, it scans through the schedule and uses the most recent applicable minimum dependency for each package. This requires a change to the test suite as well, since the previous test relied on the fact that it would always update based on the very first schedule entry, regardless of the current date.