Gather projects into all three groups: harvest, known non-harvest, and unknown
This commit is contained in:
parent
379da43764
commit
7387893e57
1 changed files with 12 additions and 5 deletions
|
@ -109,7 +109,7 @@ timelog.drop(columns=['tmp_multiplier'], inplace=True)
|
||||||
timelog['description'] = timelog['description'].str.strip()
|
timelog['description'] = timelog['description'].str.strip()
|
||||||
|
|
||||||
# Replace irregular-but-known project names with ones timetracking tools use.
|
# Replace irregular-but-known project names with ones timetracking tools use.
|
||||||
replacement_project_names = {
|
harvest_project_names = {
|
||||||
"Boston Modern Orchestra Project": ["BMOP", "BMOP.org"],
|
"Boston Modern Orchestra Project": ["BMOP", "BMOP.org"],
|
||||||
"CRLA.org upgrade": ["CRLA", "CRLA upgrade"],
|
"CRLA.org upgrade": ["CRLA", "CRLA upgrade"],
|
||||||
"Contrib": ["Contributing", "Agaric contrib", "Agaric contributions"],
|
"Contrib": ["Contributing", "Agaric contrib", "Agaric contributions"],
|
||||||
|
@ -126,13 +126,19 @@ replacement_project_names = {
|
||||||
"NICHQ Data Upgrade": ["NICHQ Data"],
|
"NICHQ Data Upgrade": ["NICHQ Data"],
|
||||||
"NICHQ Support": ["NICHQ", "NICHQ support"],
|
"NICHQ Support": ["NICHQ", "NICHQ support"],
|
||||||
"NICHQ FL CMS LAN": ["FL CMS LAN", "flcmslan", "NICHQ FLCMSLAN"],
|
"NICHQ FL CMS LAN": ["FL CMS LAN", "flcmslan", "NICHQ FLCMSLAN"],
|
||||||
"Near North camp": ["Near North Camp", "Near North defense", "Encampment support", "Camp support", "NN camp defense", "NN camp", "NN defense", "Near North camp defense"],
|
|
||||||
"Internal: Network Engagement": ["Network Engagement", "network engagement", "Network engagment", "Social media", "Network building", "Agaric network engagement"],
|
"Internal: Network Engagement": ["Network Engagement", "network engagement", "Network engagment", "Social media", "Network building", "Agaric network engagement"],
|
||||||
"Personal": ["Personal/external", "Personal / external", "External"],
|
|
||||||
"SCDTDP Collaboratory Data Site System Security": ["SCDTDP", "NICHQ SCDTDP", "NICHQ security"],
|
"SCDTDP Collaboratory Data Site System Security": ["SCDTDP", "NICHQ SCDTDP", "NICHQ security"],
|
||||||
"Teachers with GUTS": ["TWIG", "GUTS"],
|
"Teachers with GUTS": ["TWIG", "GUTS"],
|
||||||
"The Propaganda Site": ["TPS", "Propaganda Site", "The Propganda Site", "Murat & Clay"],
|
"The Propaganda Site": ["TPS", "Propaganda Site", "The Propganda Site", "Murat & Clay"],
|
||||||
}
|
}
|
||||||
|
other_project_names = {
|
||||||
|
"Near North camp": ["Near North Camp", "Near North defense", "Encampment support", "Camp support", "NN camp defense", "NN camp", "NN defense", "Near North camp defense"],
|
||||||
|
"Personal": ["Personal/external", "Personal / external", "External"],
|
||||||
|
}
|
||||||
|
|
||||||
|
replacement_project_names = harvest_project_names.copy()
|
||||||
|
replacement_project_names.update(other_project_names)
|
||||||
|
|
||||||
for preferred, alternatives in replacement_project_names.items():
|
for preferred, alternatives in replacement_project_names.items():
|
||||||
# We compare all alternatives to lower case versions, and add the
|
# We compare all alternatives to lower case versions, and add the
|
||||||
# preferred output to this list for that purpose, but note that what we use
|
# preferred output to this list for that purpose, but note that what we use
|
||||||
|
@ -159,8 +165,9 @@ latest = tl.recorded.max()
|
||||||
# Filter out any blank projects and any projects we know are not in Harvest.
|
# Filter out any blank projects and any projects we know are not in Harvest.
|
||||||
# We also do the opposite to get a CSV of the excluded items.
|
# We also do the opposite to get a CSV of the excluded items.
|
||||||
non_harvest_list = ["", "Personal", "Near North camp"]
|
non_harvest_list = ["", "Personal", "Near North camp"]
|
||||||
other = tl[tl.project.isin(non_harvest_list)]
|
harvest = tl[tl.project.isin(harvest_project_names.keys())]
|
||||||
harvest = tl[~tl.project.isin(non_harvest_list)]
|
other = tl[tl.project.isin(other_project_names.keys())]
|
||||||
|
unknown = tl[~tl.project.isin(replacement_project_names.keys())]
|
||||||
|
|
||||||
|
|
||||||
if not debug:
|
if not debug:
|
||||||
|
|
Loading…
Reference in a new issue