-
Notifications
You must be signed in to change notification settings - Fork 23
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
Utilities for reading exported spreadsheets #102
base: main
Are you sure you want to change the base?
Conversation
Hi, thanks for this. I'm not sure this fits in this package as it doesn't seem to directly add to or use any of its code, and is outside the core purpose which is to extract data via the API; in fact it relies on having previously extracted data by other means (spreadsheet download). Could you advise if there info that can be retrieved this way that isn't available from the API? @Olen what do you think? |
I was about to ask the same. I have not had time to look at the code or docs yet, so I am not sure what this does. |
It provides 2 functions for parsing the excel sheets which spond can generate; one representing poll results, one for group members. It produces an iterator of well-defined objects in each case.
You're right that it doesn't intersect with any current functionality. However, it seemed a good idea to offer the code here as a one-stop shop for people interacting with spond data, rather than having it languish in my own minuscule repo.
There isn't currently a method for getting poll results. Getting human-readable group memberships and user info fields is also a fair bit of effort because you have to manually match up IDs. I also saw a use case for doing analysis of static snapshots of data rather than fetching the data with every run. I would understand if you prefer not to accept this contribution, but I would encourage the expansion of the scope of this repo to allow the very small intersection of spond admins / python users to have just the one package they need :) |
True - I haven't looked into it and I don't think anyone else has; not sure how easy it would be.
This was one reason I started on Spond-classes - it derives members, subgroups and roles (and their relationships) from group data.
It's not built in (yet) but I use something like https://github.com/Olen/Spond/blob/main/groups.py to dump JSON periodically, then Spond-classes to analyse and reconcile against spreadsheet data from another system without API. |
I would very much like to include spond-classes into this library, but I don't know how mature it is yet. It will be breaking change, but that will always happen from time to time. Regarding the parsing of polls etc, I think it's fine to include a script to do so. Just give it a descriptive name and please add some documentation. |
I think it's more useful as an importable function than as a standalone script, where users of this library can incorporate into their own scripts. My use case was cross-referencing two different polls with subgroup memberships - it wouldn't have been very useful to have needed one script to dump the data to JSON and then another to read that JSON into the necessary data structures. What do you think about using something like pdoc3 to generate documentation automatically based on type annotations and docstrings? The If spond-classes or something equivalent does make it in here (e.g. using pydantic, as I suggested on that repo), then the exports module could re-use the same data types. |
Self-documenting is fine, but I would also like to have at least a summary in the README to allow for a quick understanding of the possibilities without installing and running any code. |
On reflection my comments above were fairly tangential/irrelevant. I didn't mean to suggest including I shall try it out. Only thought for now is that perhaps a more specific package name like |
I had some code I found useful for parsing the human-readable (blegh) spreadsheet exports, and thought they might be a useful addition here.