-
Notifications
You must be signed in to change notification settings - Fork 134
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
Community Surveys and Scoring #1984
base: master
Are you sure you want to change the base?
Conversation
Would be nice to add a data migration reading the existing static data on https://galaxy.ansible.com/static/scores/role.json and https://galaxy.ansible.com/static/scores/collection.json and adding to the new datamodels. |
@rochacbruno these models require the full survey data rather than the final computed scores. I've dumped everthing required and made scripts to import the old data here: https://github.com/jctanner/galaxy-hacking/blob/main/beta.surveys/load_data.py |
3385e83
to
b3d7211
Compare
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
b3d7211
to
6f87764
Compare
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some prints found
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
Community scoring in old galaxy was based on a computed average of survey responses from the UX users. On each role or collection, they could rate aspects of the content on a 1-5 scale or a yes/no (which translated to 1 or 5). A user could change their answers at will, but could not delete them. After the POST call to provide their responses, a new score for the content would be computed and displayed in the UX.
There was also a scoring component that derived from ansible-lint outputs, which was called "quality score". This PR does not attempt to re-implement that function.
The new endpoints are in api/v1 for multiple reasons:
Example survey payload ...
For a role, the payload should be POST'ed to /api/v1/surveys/roles/
<roleid>
/For a collection, the payload should be POST'ed to /api/v1/surveys/collections/
<namespace>
/<name>
/ ... because we have no way of getting the pulp_id for a collection from the API right now.Computed scores come from these endpoints ...
Scores have namespace and name filtering ...
Both the role and the collection scores can be filtered by their roleid or collectionid, if known.