File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 6
6
domains :
7
7
- bu.edu
8
8
mghpcc_partnership_start_date : " 2013-06"
9
+ include_in_NERC_total_invoice : True
9
10
- display_name : Bentley
10
11
domains :
11
12
- bentley.edu
12
13
- display_name : University of Rhode Island
13
14
domains :
14
15
- uri.edu
16
+ include_in_NERC_total_invoice : True
15
17
- display_name : Red Hat
16
18
domains :
17
19
- redhat.com
38
40
- harvard.edu
39
41
- chemistry.harvard.edu
40
42
mghpcc_partnership_start_date : " 2013-06"
43
+ include_in_NERC_total_invoice : True
41
44
- display_name : Worcester Polytechnic Institute
42
45
domains :
43
46
- wpi.edu
Original file line number Diff line number Diff line change @@ -12,12 +12,6 @@ class NERCTotalInvoice(invoice.Invoice):
12
12
- NewPICreditProcessor
13
13
"""
14
14
15
- INCLUDED_INSTITUTIONS = [
16
- "Harvard University" ,
17
- "Boston University" ,
18
- "University of Rhode Island" ,
19
- ]
20
-
21
15
export_columns_list = [
22
16
invoice .INVOICE_DATE_FIELD ,
23
17
invoice .PROJECT_FIELD ,
@@ -51,9 +45,15 @@ def output_s3_archive_key(self):
51
45
return f"Invoices/{ self .invoice_month } /Archive/NERC-{ self .invoice_month } -Total-Invoice { util .get_iso8601_time ()} .csv"
52
46
53
47
def _prepare_export (self ):
48
+ included_institutions = list ()
49
+ institute_list = util .load_institute_list ()
50
+ for institute_info in institute_list :
51
+ if institute_info .get ("include_in_NERC_total_invoice" ):
52
+ included_institutions .append (institute_info ["display_name" ])
53
+
54
54
self .export_data = self .data [
55
55
self .data [invoice .IS_BILLABLE_FIELD ] & ~ self .data [invoice .MISSING_PI_FIELD ]
56
56
]
57
57
self .export_data = self .export_data [
58
- self .export_data [invoice .INSTITUTION_FIELD ].isin (self . INCLUDED_INSTITUTIONS )
58
+ self .export_data [invoice .INSTITUTION_FIELD ].isin (included_institutions )
59
59
].copy ()
You can’t perform that action at this time.
0 commit comments