Open jc-umana opened 4 years ago
For example:
["meeting", "pr", "deliverable", "approved_file"]. Preview of the problem: `ALLOWED_MILESTONE_TYPES = ["meeting", "pr", "deliverable", "approved_file"]` "projecta": { "_id": "20sb_firstprojectum", "begin_date": "2020-04-28", "collaborators": ["aeinstein", "pdirac"], "deliverable": { "audience": ["beginning grad in chemistry"], "due_date": "2021-05-05", "success_def": "audience is happy", "scope": ["UCs that are supported or some other scope description " "if it is software", "sketch of science story if it is paper" ], "platform": "description of how and where the audience will access " "the deliverable. Journal if it is a paper", "roll_out": [ "steps that the audience will take to access and interact with " "the deliverable", "not needed for paper submissions"], "status": "finalized" }, "description": "My first projectum", "end_date": "2020-06-05", "grants": "SymPy-1.1", "group_members": ["ascopatz"], "kickoff": { "date": "2020-05-05", "due_date": "2020-05-06", "name": "Kick off meeting", "objective": "introduce project to the lead", "audience": ["lead", "pi", "group_members"], "status": "finished" }, "lead": "ascopatz", "log_url": "https://docs.google.com/document/d/1YC_wtW5Q", "milestones": [{ 'due_date': '2020-05-20', 'name': 'Project lead presentation', 'objective': 'lead presents background reading and ' 'initial project plan', 'audience': ['lead', 'pi', 'group_members'], 'status': 'proposed', 'type': ALLOWED_MILESTONE_TYPES, }, {'due_date': '2020-05-27', 'name': 'planning meeting', 'objective': 'develop a detailed plan with dates', 'audience': ['lead', 'pi', 'group_members'], 'status': 'proposed', 'type': ALLOWED_MILESTONE_TYPES, }], "name": "First Projectum", "pi_id": "scopatz", "status": "proposed" },
almost, but not quite. "type" means data type, such as string, integer, list. See if you can search through the schemas.py to find an example of how it is handled where there is a definite list of allowed values and you will find how to do it.
Wait, so we’re still not merging the other one, right? I spoke with Akshay about this and we think that we have to make more exemplars using different types(?) Correct me if we’re wrong, but I’ll keep looking for what you hinted towards in the file.
what is the "the other one?"
If I remember correctly I mentioned that this was the "full fix" but a workaround was to specify the ALLOWED_MILESTONE_TYPES at the top of the helper file and not change the schema at all..... I think it is probably a good idea to do that and get that work merged.
For example: