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

dump lower bounds for packages in schedule.json #374

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

Conversation

savente93
Copy link

Fixes #373

I got a few thrumbs up on the issue, so I just went ahead and did it. The structure of schedule.json I came up with is a little different to the table but not by much. it is: {first_day_of_quarter: {package:new_lower_bound}}. The idea behind this is that things like CIs could do something like:

  1. fetch schedule.json
  2. look up max date that is smaller than current date
  3. for packages in that record, update your prefered env specification with package = >new_lower_bound
  4. done

I decided to just put everything in there as strings, so it would be easily parable, and put the first date of the quarter in there rather than "naming" the quarter (e.g. 2025Q1) to make step 2 easier. Since people might also have higher bounds, I just opted to put the new lower bound in there (i.e. the max version that support should be dropped for) so people can just slap a > in front of it if they don't care, or use it for more complex logic if they do.

This is the quick first version, so we could get more complex later if we need to. If anything should be handled differently, let me know and I'll be happy to adjust it.

@stefanv
Copy link
Member

stefanv commented Feb 5, 2025

Thanks @savente93!

I wonder if we could also provide code for users who want to use this in CI, or from the web, to see how their dependencies are updated (we could do that as a follow-up).

For this PR, we probably want to ensure the machine readable version is published, and link to it from the SPEC.

@savente93
Copy link
Author

Sounds good! I'll at least add the file, and mention it in the SPEC as you mentioned. I'll see if I can make a small prototype for using it to update dependencies, I think that's a good idea for making sure the structure is also actually useful.

@stefanv
Copy link
Member

stefanv commented Feb 5, 2025

Sorry, just realized the .json build would have to be part of the build process for scientific-python/scientific-python.org. +1 for making sure it's usable for some practical purpose :)

@savente93
Copy link
Author

@stefanv re it being part of the build process. I wasn't able to find any place where the python script was invoked automatically, so I don't know if I should include a trigger or something for it, if so let me know.

@savente93
Copy link
Author

@stefanv well I'm glad I did the small prototype because the original format turned out to not be super easy to parse. I've added some explanations and a small example of how you could update the dependencies, though honestly that part is very dependant on what package manager you use, so I didn't make that very expansive.

One note is that because I calculate the next version and then drop the NaNs we end up with one quarter less at the end, but given that that one is quite a few years into the future I didn't think that mattered all that much, but let me know if it is and we'll see what we can do.

One other bit that would be worth discussing, is how this file will be served, and whether we need any metadata. For this mvp, in the examples I just pull the file directly from main, but I will say that that can give quite the headache down the line if the structure every needs to change. I'm not sure how that will be the case, or if we have another way to serve it. In my experience, at least adding a version number to the format (.e.g. "format": 1) and at least offer a bit more flexibility. What do people think? is that useful?

Other than those points, I think this is mostly done, so I'll be looking forward to the review!

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.

Publish SPEC 0 in machine readable format
2 participants