-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add in CI to check personnel database is internally consistent #74
Comments
I've got some tests for this issue. I still need to figure out the best way to hook them in but I wanted to mention, there is a member of the management team "ruthdXXX" that is not in the people.toml file. There is a "ruthhXXX" so it may be a typo but this person is likely not on the management mailing list currently either way. |
Ok, I have set up the GitHub action to run the tests when a push is made. It appears to be working and has picked up an issue. @alysbrett you may be missing from one of the project mailing lists. Hopefully what I've done is ok. If so, this issue can be closed. |
Specifically, the data.toml looks like the culprit. |
Thanks very much @nathan-cummings-ukaea . I fixed me in data and Ruth in management so hopefully it will pass now! |
It would be really great if the email on failure had the actual error in it (ie the pytest output in this case) but no idea if that's easy or hard. And if the pytest output has any options to be less verbose so the actual assertion error is what you see in the email without much else that would be even better! Only if it's easily done though - works fine as is and will get used to spotting the problem quickly if it happens often I imagine |
Yep, the tests pass as of your last commit so that’s great. I agree the test output isn’t great. I imagine it’s fairly straightforward to improve it. I’ll take a look. I bet you can make the content of the email more useful as well. I’ll let you know when I figure out how. It would be useful to know for future reference even if it isn’t strictly necessary here. |
Do close this once you've decided whether to tweak the test output. |
It would be great if we could also test that people's org labels in the I also wonder whether it's possible to check the membership list of the org - https://developer.github.com/v3/orgs/members - against the people in Finally, what happens if I add someone to the |
Sorry Richard, I've been away for the past few days but I'm back to look at this now. I'll get those tests written. As for adding someone without an email address... I honestly am not sure what it would do. It could be that it seems fine on my end but ends up being a problem when the mailing list gets populated, which I wouldn't know about. Ideally, we would have an email address for everyone. Is the issue that you just don't have them yet, or are some people not able to provide email addresses at all? |
No problem. I just wanted to add someone’s group and despite a bit of badgering I didn’t have all of their emails. However, someone else badgered them a bit more and they came through! If it was possible just to do something like ignore people without emails when populating the database that would be great? It would just allow me to add them temporarily in the future without worrying about destroying the mailing lists! |
Ok, I've changed the updatedb.py script so it simply checks "if user_data['email']" before adding a user to the database. This should work, if you put someone in with an email the CI tests will fail but the user shouldn't be added to the database. If/when you do add someone without an email, let me know and I can check the database to make sure it ran ok. |
#25 is dealing with creating a database to update our mailing lists, but it requires that the data in the https://github.com/ScottishCovidResponse/personnel repo is internally consistent.
In the first instance, the critical thing is to check that each file in the
projects/
subdirectory has aname = "XXX"
element and[people]
hash, and each[people.YYY]
element of the hash corresponds to a[YYY]
element in thepeople.toml
file at the top level, and the latter has an associated email address.This issue is to add CI to do this.
The text was updated successfully, but these errors were encountered: