Merge lp://staging/~sinzui/charm-tools/categories-and-icons into lp://staging/~charmers/charm-tools/trunk

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 175
Proposed branch: lp://staging/~sinzui/charm-tools/categories-and-icons
Merge into: lp://staging/~charmers/charm-tools/trunk
Diff against target: 1690 lines (+1472/-0)
30 files modified
scripts/lib/proof.py (+16/-0)
templates/charm/metadata.yaml (+2/-0)
tests/charms/broken-categories/README.md (+1/-0)
tests/charms/broken-categories/copyright (+1/-0)
tests/charms/broken-categories/hooks/install (+5/-0)
tests/charms/broken-categories/hooks/start (+4/-0)
tests/charms/broken-categories/hooks/stop (+7/-0)
tests/charms/broken-categories/hooks/website-relation-broken (+2/-0)
tests/charms/broken-categories/hooks/website-relation-changed (+9/-0)
tests/charms/broken-categories/hooks/website-relation-departed (+5/-0)
tests/charms/broken-categories/hooks/website-relation-joined (+5/-0)
tests/charms/broken-categories/icon.svg (+198/-0)
tests/charms/broken-categories/metadata.yaml (+9/-0)
tests/charms/broken-categories/revision (+1/-0)
tests/charms/broken-maintainer/icon.svg (+198/-0)
tests/charms/broken-maintainer/metadata.yaml (+2/-0)
tests/charms/broken-subordinate/icon.svg (+198/-0)
tests/charms/broken-subordinate/metadata.yaml (+2/-0)
tests/charms/broken-subordinate2/icon.svg (+198/-0)
tests/charms/broken-subordinate2/metadata.yaml (+2/-0)
tests/charms/missing-maintainer/icon.svg (+198/-0)
tests/charms/missing-maintainer/metadata.yaml (+2/-0)
tests/charms/mod-spdy/icon.svg (+198/-0)
tests/charms/mod-spdy/metadata.yaml (+2/-0)
tests/charms/unknown-metadata/icon.svg (+198/-0)
tests/charms/unknown-metadata/metadata.yaml (+2/-0)
tests/create/no-package-exists/metadata.yaml (+2/-0)
tests/create/python-apt/metadata.yaml (+2/-0)
tests/proof/expected/broken-categories (+1/-0)
tests/proof/expected/test (+2/-0)
To merge this branch: bzr merge lp://staging/~sinzui/charm-tools/categories-and-icons
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+159820@code.staging.launchpad.net

Commit message

Add support for categories and icons.

Description of the change

The new UI requires charms to be categorised and have icons to present
themselves. This branch add simple support for the needed features.

RULES

    * It is not an error to include categories in the metadata.
    * A warning is raised if categories is not present.
    * Categories must be a list of one or more of
      applications, app-servers, databases, file-servers, cache-proxy, misc
      * We do not check the values because we may change them in the next 6
        months.
    * A warning is raised if icon.svg is not present in the root directory.
      * I elected not to check the size of the icon...I could check that
        the icon is 96x96, but am not sure if it is needed right now.

QA

    Proofing
    * In a charm without categories or icon.svg, run:
      charm proof
    * Verify a warning is shown about missing categories and icon.svg.
    * Add an icon.svg to the root of the charm. Add a key without a value
      to the metadata.yaml:
      categories:
      the run
      charm proof
    * Verify there is no warning about icon.svg, but there is a warning
      that categories is not a list.
    * Set categories in metadata.yaml to
      - applications
      - cache-proxy
      then run
      charm proof
    * Verify that that there are no warning.

    Creating
    * Change to a test directory, then run
      charm create pting
    * Verify the charm's metadata.yaml contains categories list with one item,
      misc.

To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM. Despite not being in the charm policy yet, I think a warning is a good level. After charm icon and categories land in the official charm policy we can move this from warning to hard error.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches