Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation rules for reformatted cadres_ sheets #254

Closed
rhanIDM opened this issue Mar 29, 2023 · 4 comments · Fixed by #255
Closed

Validation rules for reformatted cadres_ sheets #254

rhanIDM opened this issue Mar 29, 2023 · 4 comments · Fixed by #255
Assignees

Comments

@rhanIDM
Copy link
Collaborator

rhanIDM commented Mar 29, 2023

"StartYear" + cadre role + ScenarioID from "CadreRoles" sheet should uniquely identify a column of workload allocation on the "Cadres_Scenario" sheets.

@MeWu-IDM
Copy link
Collaborator

@rhanIDM let's calrify this
For example: if CadreRoles sheet define a startYear = 2020 endYear=2029 for RoleID=HEW1 for BasicModel (Cadres_Basic)
We should anticipate these columns appear in Cadres_Basic to cover all years , correct?
startYear2020/HEW1
startYear2025/HEW1
startYear2030/HEW1

@rhanIDM
Copy link
Collaborator Author

rhanIDM commented Apr 12, 2023

The validations rules are:
1.) Sheet CadreRoles: columns StartYear and EndYear can not be outside of the model default range. (Error, "unable to finish", print the rows violating this rule)
2.) Sheet CadreRoles: for each "ScenarioID", (EndYear+1) must appear in StartYear (Error, "unable to finish", print the rows with EndYear violating this rule)
3.) Sheet CadreRoles: columns "ScenarioID" + "RoleID" + "StartYear" must appear in the corresponding cadre_ sheets' headers (Error, continue)
4.) Sheet CadreRoles: for each "ScenarioID", rows with no "EndYear" must appear in the max(StartYear) section in the corresponding cadre_ sheets' (Error, print the row violating this rule)
5.) Range check: each "RoleID" should appear in continuous sections on the cadre_ sheets' headers in between StartYear and EndYear.

@MeWu-IDM MeWu-IDM linked a pull request Apr 15, 2023 that will close this issue
@MeWu-IDM MeWu-IDM added this to the V1.1 - PACE-HRH refresh milestone Apr 18, 2023
@rhanIDM
Copy link
Collaborator Author

rhanIDM commented Apr 19, 2023

Revision for rule 5.) Also include CadreRoles rows with no "EndYear".
Add rule 6.) [the inverse of rule 3] on each scenario-specific cadre_sheet, the pair "StartYear" + "RoleID" must appear in CadreRoles for the corresponding ScenarioID (Error, print the StartYear and RoleID)

@rhanIDM
Copy link
Collaborator Author

rhanIDM commented Jun 6, 2023

Successfully implemented in v1.0.7.

@rhanIDM rhanIDM closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants