mingrammer / diagrams

:art: Diagram as Code for prototyping cloud system architectures
https://diagrams.mingrammer.com
MIT License
39.11k stars 2.52k forks source link

autogen.sh failing with KeyError: 'programming' #146

Closed maruina closed 4 years ago

maruina commented 4 years ago

Hello, thanks for the awesome tool! I'm trying to open a PR to add some gitops icons, but I can't get autogen.sh to work

❯ ./autogen.sh
converting the svg to png using inkscape for provider 'onprem'
cleaning the resource names for provider 'onprem'
cleaning the resource names for provider 'aws'
rounding the resources for provider 'aws'
converting the svg to png using inkscape for provider 'azure'
cleaning the resource names for provider 'azure'
cleaning the resource names for provider 'gcp'
cleaning the resource names for provider 'k8s'
cleaning the resource names for provider 'alibabacloud'
converting the svg to png using image magick for provider 'oci'
cleaning the resource names for provider 'oci'
cleaning the resource names for provider 'programming'
Traceback (most recent call last):
  File "/Users/ruio/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/ruio/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/ruio/github/third-party/diagrams/scripts/resource.py", line 168, in <module>
    commands[cmd](pvd)
  File "/Users/ruio/github/third-party/diagrams/scripts/resource.py", line 105, in clean_png
    [_rename(root, png) for png in pngs]
  File "/Users/ruio/github/third-party/diagrams/scripts/resource.py", line 105, in <listcomp>
    [_rename(root, png) for png in pngs]
  File "/Users/ruio/github/third-party/diagrams/scripts/resource.py", line 98, in _rename
    new = cleaners[pvd](png)
KeyError: 'programming'

I just forked the repo

❯ git l
* c046b8a (HEAD -> gitops, origin/master, origin/HEAD, master) generate tableau and metabase nodes (#142)
* 5c747f6 Added Github Star badge instead of dummy badge and github link (#144)
* cf0141a Add programming languages and frameworks (#112)
* 6a778fd Add: Loki to onprem.logging (#139)
* 248ad69 Added news icons to aws network resource (#135)
* b446cb5 Rename Cloudfront to CloudFront (#129)
* 353e7eb (tag: v0.10.0) bump: up to version 0.10.0
[...]

and I only added my 2 new icons

❯ git status
On branch gitops
Untracked files:
  (use "git add <file>..." to include in what will be committed)
    resources/onprem/gitops/flagger.png
    resources/onprem/gitops/flux.png

nothing added to commit but untracked files present (use "git add" to track)

I follow the CONTRIBUTING guide but I don't understand if I'm missing a dependency or if it's something else.

mingrammer commented 4 years ago

Sorry for the inconvenience. Try with the latest commit, please. (just git pull)

maruina commented 4 years ago

It works now, thanks. I was able to raise https://github.com/mingrammer/diagrams/pull/147