Skip to content

Commit b26c4e1

Browse files
fallow64CannonLock
andauthored
Add detailed field of science to many projects (#4940)
* Add detailed field of science to many projects * Refine remaining projects * Update script to check for further granularity --------- Co-authored-by: Cannon Lock <clock@wisc.edu>
1 parent f038dec commit b26c4e1

File tree

101 files changed

+130
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+130
-143
lines changed

.github/scripts/check_project_fos_precision/main.py

Lines changed: 28 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,44 @@
99

1010
def get_active_projects(start_date: datetime.datetime):
1111
response = requests.get(
12-
"https://gracc.opensciencegrid.org/q/gracc.osg.summary/_search",
12+
"https://elastic.osg.chtc.io/q/ospool-summary-*/_search",
1313
json={
14-
"size": 0,
15-
"query": {
16-
"bool": {
17-
"filter": [
18-
{
19-
"term": {
20-
"ResourceType": "Payload"
21-
}
22-
},
23-
{
24-
"range": {
25-
"EndTime": {
26-
"lte": int(datetime.datetime.now().timestamp() * 1000),
27-
"gte": int(start_date.timestamp() * 1000)
28-
}
29-
}
30-
}
31-
]
32-
},
33-
},
34-
"aggs": {
35-
"projects": {
36-
"terms": {
37-
"field": "ProjectName",
38-
"size": 99999999
39-
},
40-
"aggs": {
41-
"projectJobsRan": {
42-
"sum": {
43-
"field": "Njobs"
44-
}
45-
}
46-
}
47-
}
48-
}
49-
}
14+
"size": 0,
15+
"query": {
16+
"range": {
17+
"Date": {
18+
"lte": int(datetime.datetime.now().timestamp() * 1000),
19+
"gte": int(start_date.timestamp() * 1000)
20+
}
21+
}
22+
},
23+
"aggs": {
24+
"bucket": {
25+
"terms": {
26+
"field": "ProjectName.keyword",
27+
"size": 10000
28+
},
29+
"aggs": {
30+
"NumJobs": {
31+
"sum": {
32+
"field": "NumJobs"
33+
}
34+
},
35+
}
36+
}
37+
}
38+
}
5039
)
5140

5241
data = response.json()
5342

54-
active_projects = [x['key'] for x in data['aggregations']['projects']['buckets']]
43+
active_projects = [x['key'] for x in data['aggregations']['bucket']['buckets']]
5544

5645
return active_projects
5746

5847

59-
6048
def has_detailed_precision(id: str):
61-
return get_id(id, granularity=1) is not None
49+
return get_id(id, granularity=2) is not None
6250

6351

6452
def main():

projects/AMNH.astro.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Sponsor:
1010
CampusGrid:
1111
Name: OSG Connect
1212
InstitutionID: 'https://osg-htc.org/iid/em2w05s9c1uc'
13-
FieldOfScienceID: '40.02'
13+
FieldOfScienceID: '40.0201' # Astronomy

projects/AMNH_MacLow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Sponsor:
99
CampusGrid:
1010
Name: OSG Connect
1111
InstitutionID: 'https://osg-htc.org/iid/em2w05s9c1uc'
12-
FieldOfScienceID: '40.02'
12+
FieldOfScienceID: '40.0201' # Astronomy

projects/Arcadia_Curotto.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Sponsor:
1010
CampusGrid:
1111
Name: OSG Connect
1212
InstitutionID: 'https://osg-htc.org/iid/c6ehbi2dyh8h'
13-
FieldOfScienceID: '40.05'
13+
FieldOfScienceID: '40.0501' # Chemistry, General

projects/CMU_Isayev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ PIName: Olexandr Isayev
77

88

99
InstitutionID: 'https://osg-htc.org/iid/3cqqrc2cgibl'
10-
FieldOfScienceID: '40.05'
10+
FieldOfScienceID: '40.0511' # Theoretical Chemistry

projects/CSUN_Katz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ FieldOfScience: Mathematics
55
Organization: California State University, Northridge
66
PIName: Daniel Katz
77
InstitutionID: 'https://osg-htc.org/iid/vfjpi4twqspj'
8-
FieldOfScienceID: '27.01'
8+
FieldOfScienceID: '27.0101' # Mathematics, General

projects/Columbia_Mandal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Sponsor:
1616
CampusGrid:
1717
Name: OSG Connect
1818
InstitutionID: 'https://osg-htc.org/iid/avy4x5r4jsrw'
19-
FieldOfScienceID: '40.05'
19+
FieldOfScienceID: '40.0501' # Chemistry, General

projects/Columbia_Reichman.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ FieldOfScience: Chemistry
99
Organization: Columbia University
1010
PIName: David Reichman
1111
InstitutionID: 'https://osg-htc.org/iid/avy4x5r4jsrw'
12-
FieldOfScienceID: '40.05'
12+
FieldOfScienceID: '40.0501' # Chemistry, General

projects/DUNE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Sponsor:
88
VirtualOrganization:
99
Name: Fermilab
1010
InstitutionID: 'https://osg-htc.org/iid/ik4s3ql8u1j7'
11-
FieldOfScienceID: '40.08'
11+
FieldOfScienceID: '40.0804' # Elementary Particle Physics

projects/Dearborn_Shawver.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Sponsor:
88
CampusGrid:
99
Name: OSG Connect
1010
InstitutionID: "https://osg-htc.org/iid/v8uoprmk1nb2"
11-
FieldOfScienceID: '11'
11+
FieldOfScienceID: '11.0101'

0 commit comments

Comments
 (0)