pyOpenSci / pyosMeta

A package that updates pyOpenSci contributor and package metadata on our website
BSD 3-Clause "New" or "Revised" License
4 stars 17 forks source link

Date/time consistency issues in our peer review data processing workflow #179

Open lwasser opened 1 month ago

lwasser commented 1 month ago

The data in this workflow are used to populate our website via this data file. Right now our output YAML file has date fields for the following keys:

devicely return

date_accepted: '2021-08-19' created_at: 2021-04-03 19:25:41+00:00 updated_at: 2023-08-29 02:06:23+00:00 closed_at: 2022-09-07 15:40:27+00:00

pygmt return

date_accepted: 2022-9-1 created_at: 2021-07-23 00:37:07+00:00 updated_at: 2023-09-14 17:47:44+00:00 closed_at: 2023-06-12 22:47:16+00:00

We should make all of our date fields consistent across our models. NOTE: We also have date fields in the GHMeta object for reach project repo.

related to and can close #130

see pr 404 here for what the diff on the output contributor file looks like.

For our website purposes, it would be ideal if the workflow returned just the date (we don't need time) and ideally it should ouput it as a string for Jekyll processing. If you are reading this and know more about processing dates with jekyll and it doesn't have to be a string, then that is ok too. the goal here is consistency! so let's get the date field consistent via a uniform validator and datetime type for every date related field.

sneakers-the-rat commented 1 month ago

+1 and also it would be good to specify YYYY-MM-DD or YYYY/MM/DD consistently, I blv the current review template is MM/DD/YYYY

lwasser commented 1 month ago

agreed!! We can always parse the review template in it's current form.

let's go with created_at: 2024-03-06 17:08:29+00:00 this format:

we can strip the time piece as we don't need it! and use that throughout. i think that is jekyll friendly too?

sneakers-the-rat commented 1 month ago

We can just format it however we want with Jekyll :) https://shopify.github.io/liquid/filters/date/

{{ created_at | date: "%Y-%m-%d" }}
lwasser commented 1 month ago

ooooh perfect!! i forgot about filters!! 🚀