CCI-MOC / process_csv_report

Some scripts to help process our billing reports
0 stars 3 forks source link

Make sure Credit Code 0002 is only for MGHPCC Partners #94

Closed joachimweyl closed 1 month ago

joachimweyl commented 2 months ago

Motivation

Ensure the 0002 credit code $1000 is only for institutions with an MGHPCC partnership.

Completion Criteria

Update invoice script to only include the institutions with a MGHPCC partnership.

Description

Completion dates

Desired - 2024-10-02 Required - TBD

QuanMPhm commented 2 months ago

@joachimweyl By "Update script to only include institutions", do you mean that only PIs from the list of institutions you provided should receive the New-PI Credit? When I read "Update invoice script to only include", I wasn't sure if you wanted to exclude certain institutions from the invoices.

Also, what will this mean for PIs who don't belong to these institutions, who still have 1 month to use their New-PI credit? Should they still get to use the remainder of their credit?

joachimweyl commented 2 months ago

Yes. Include is easier, if we try to exclude the list will be much longer. Users who are in their first month and would normally have a 2nd will not receive the second-month discount. let's make sure this information is in the rates repo so we can add a date to it so it is clear when this comes into play in the future.

QuanMPhm commented 2 months ago

@naved001 @knikolla Do you have any thoughts on this?

knikolla commented 2 months ago

@QuanMPhm this can be a new flag, similar to https://github.com/CCI-MOC/nerc-rates/blob/04aa5ee19533370d7b97cc82e1211a36c578c4f9/rates.yaml#L45

Call it something like Limit New PI Credit to MGHPCC Partners. With a start date of whenever we want to have this effective.

As for the list of institutions, this is now an appropriate time to extend our data models. We would need the start date for being MGHPCC partners.

Turn institute_map.json into something of this format.

{
    "northeastern.edu" : 
    {
        display_name: "Northeastern University",
        mghpcc_partnership_start_date: "2022-01-01"
    },
   // all the others
}
QuanMPhm commented 2 months ago

@joachimweyl Could you confirm the start dates of the MGHPCC partnerships with our current institutes?

QuanMPhm commented 2 months ago

@knikolla Instead of having the email domain name as the key, could I use the institute name instead? This is just to prevent the mghpcc_partnership_start_date field from appearing multiple times, since several email domains map to Harvard

knikolla commented 2 months ago

@knikolla Instead of having the email domain name as the key, could I use the institute name instead? This is just to prevent the mghpcc_partnership_start_date field from appearing multiple times, since several email domains map to Harvard

@QuanMPhm Good point. In that case I recommend pushing the domains into the dictionary itself and turning the overall institute_map into a list.

[
    {
        display_name: "Northeastern University",
        domains: ["northeastern.edu"],
        mghpcc_partnership_start_date: "2022-01-01"
    },
...
]
knikolla commented 2 months ago

Oh, and at this point I think I'd rather this be YAML instead of JSON since that's easier to modify by hand. :)