Skip to content

Commit

Permalink
Add content scoring docs page (#1418)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Crosby <[email protected]>
  • Loading branch information
awcrosby authored Dec 13, 2018
1 parent 20822f0 commit 4b466d4
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
68 changes: 68 additions & 0 deletions docs/docsite/rst/contributing/content_scoring.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _content_scoring:

***************
Content Scoring
***************

.. contents:: Topics


This topic describes how content is scored.

Scores displayed when browsing content are the average of
the content's Community Score and Quality Score.
Content Scoring is in early iterations, to be improved with
user feedback and future additions to ansible-lint.

Community Score
===============

* The Community Score is calculated from community surveys submitted by Galaxy users
* Maximum score of ``5.0``

Quality Score
=============

* The Quality Score is based on analysis from ``yamllint`` ``ansible-lint`` and import-time checks
* Maximum score is ``5.0``
* The Quality Score is the average of `Syntax Score <syntax-score_>`_ and `Metadata Score <metadata-score_>`_

.. note::
Scoring is only done at import, to re-score please re-import

Linters Used
------------

* ``yamllint`` is run with a `custom config <https://github.com/ansible/galaxy/blob/devel/galaxy/importer/linters/yamllint.yaml>`_
* ``ansible-lint`` is run using its default rules, for information on how to fix Ansible Lint issues, see the descriptions in the `default rules <https://docs.ansible.com/ansible-lint/rules/default_rules.html>`_
* import-time checks reference the Galaxy database, checking for valid platforms, valid cloud platforms, and loadable dependencies

.. _syntax-score:

Syntax Score
------------
Linter issues applied to the Syntax Score are ``yamllint`` and non-metadata ``ansible-lint``

Each linter issue is subtracted from a max score of ``5.0``:

* Issue severity of "VERY_HIGH" reduces the score by ``1.0``
* Issue severity of "HIGH" reduces the score by ``0.5``
* Issue severity of "MEDIUM" reduces the score by ``0.25``
* Issue severity of "LOW" reduces the score by ``0.125``
* Issue severity of "VERY_LOW" reduces the score by ``0.075``
* Issue severity of "INFO" does not reduce the score

.. _metadata-score:

Metadata Score
--------------
Linter issues applied to the Syntax Score are metadata ``ansible-lint`` and import-time checks

Each linter issue is subtracted from a max score of ``5.0``:

* Issue severity of "VERY_HIGH" reduces the score by ``1.0``
* Issue severity of "HIGH" reduces the score by ``0.5``
* Issue severity of "MEDIUM" reduces the score by ``0.25``
* Issue severity of "LOW" reduces the score by ``0.125``
* Issue severity of "VERY_LOW" reduces the score by ``0.075``
* Issue severity of "INFO" does not reduce the score
1 change: 1 addition & 0 deletions docs/docsite/rst/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Contributing Content
creating_apb
version
importing
content_scoring
deprecate

0 comments on commit 4b466d4

Please sign in to comment.