Skip to content

Commit

Permalink
adding few new items to people schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sbillinge committed Jul 27, 2019
1 parent 0b51e18 commit 8a86486
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 4 deletions.
18 changes: 18 additions & 0 deletions news/clean_people_schema.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**Added:** None

* Google profile URL to people schema
* Research Focus Areas to people schema
* status to employment which will be selected from a list for sorting on the
website

**Changed:**

* All months can now be integers or strings in the schemas

**Deprecated:** None

**Removed:** None

**Fixed:** None

**Security:** None
38 changes: 34 additions & 4 deletions regolith/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@
"end_year": 2015,
"location": "Madison, WI",
"organization": "CNERG, The University of " "Wisconsin-Madison",
"department": "Physics",
"other": [
"Cyclus: An agent-based, discrete time nuclear fuel "
"cycle simulator.",
Expand Down Expand Up @@ -404,6 +405,7 @@
"Website: http://flash.uchicago.edu/site/",
],
"position": "Research Scientist, Postdoctoral Scholar",
"status": "PI"
},
],
"funding": [
Expand All @@ -415,6 +417,7 @@
{"name": "NIF User's Group Travel Award", "value": 1150,
"year": 2013},
],
"google_scholar_url": "https://scholar.google.com/citations?user=dRm8f",
"home_address": {
"street": "123 Wallabe Ln",
"city": "The big apple",
Expand All @@ -437,6 +440,10 @@
"name": "Anthony Scopatz",
"orcid_id": "0000-0002-9432-4248",
"position": "professor",
"research_focus_areas": [
{"begin_year": 2010, "description": "software applied to nuclear "
"engineering and life" }
],
"skills": [
{"category": "Programming Languages", "level": "expert",
"name": "Python"},
Expand Down Expand Up @@ -1368,6 +1375,7 @@
"anyof_type": ["string", "integer"],
},
"begin_year": {"required": True, "type": "integer"},
"department": {"required": False, "type": "string"},
"end_month": {"required": False,
"anyof_type": ["string", "integer"],
},
Expand All @@ -1382,6 +1390,8 @@
"organization": {"required": True, "type": "string"},
"other": {"required": False, "type": "list"},
"position": {"required": True, "type": "string"},
# TODO this should be select from in the long run
"status": {"required": False, "type": "string"},
},
},
"type": "list",
Expand All @@ -1407,6 +1417,9 @@
},
"type": "list",
},
"google_scholar_url": {"required": False, "type": "string",
"description": "URL of your Google Scholar "
"rofile"},
"home_address": {
"description": "The person's home address",
"type": "dict",
Expand Down Expand Up @@ -1478,6 +1491,20 @@
"type": "string",
"eallowed": list(SORTED_POSITION),
},
"research_focus_areas": {
"description": "summary of research projects that are ongoing. Used"
"in Annual appraisal for example",
"required": False,
"schema": {
"type": "dict",
"schema": {
"begin_year": {"required": False, "type": "integer"},
"end_year": {"required": False, "type": "integer"},
"description": {"required": False, "type": "string"}
},
},
"type": "list"
},
# TODO: need to handle year vs. begin_year stuff
"service": {
"description": "Service that this group member has provided",
Expand All @@ -1487,8 +1514,11 @@
"schema": {
"description": {"required": False, "type": "string"},
"duration": {"required": False, "type": "string"},
"month": {"required": False,
"anyof_type": ["string", "integer"],
"month": {"description": "Use month and year if the service"
"doesn't extend more than one year."
"Otherwise use begin_year and end_year",
"required": False,
"anyof_type": ["string", "integer"]
},
"name": {"required": True, "type": "string"},
"year": {"required": False, "type": "integer"},
Expand Down Expand Up @@ -1701,11 +1731,11 @@
"schema": {
"type": "dict",
"schema": {
"begin_month": {"required": False, "anyof_type": ["string", "integer"],
"begin_month": {"required": False,
"anyof_type": ["string", "integer"],
},
"begin_year": {"required": True, "type": "integer"},
"end_month": {"required": False, "anyof_type": ["string", "integer"],
"end_month": {"required": False,
"anyof_type": ["string", "integer"],
},
"end_year": {"required": False, "type": "integer"},
Expand Down

0 comments on commit 8a86486

Please sign in to comment.