Conversation
|
This is very very nice! Just a few notes after testing. In the icon spec txt list:
Also, it doesn't seem to list all missing icons. This might be the case when the symbolic version exists? For example, Maybe helpful, maybe not... I did a script similar to this a while back here (as Also when trying that "fd.o-only theme" experiment, I did add more fd.o icons to |
|
I guess that's what I get for hand-writing the spec file... Symbolic files were being counted when calculating results for the report, but I've now changed it to not use them. They aren't shown in out-of spec, though, as I figure they are common practice enough that rules-lawyering them out would be pointless and make the report larger than it needs to. |
|
I feel like this is a tool which could benefit the larger Linux community |
|
Now has support for optionally pulling the specification directly from FreeDesktop.org, if |
danirabbit
left a comment
There was a problem hiding this comment.
When running the script I get:
(.venv) dani@mini:~/Projects/icons$ python3 scripts/audit.py .
Found bs4 and requests dependencies, pulling spec from the web
Traceback (most recent call last):
File "/home/dani/Projects/icons/scripts/audit.py", line 123, in <module>
specList.extend(get_iso_3166())
^^^^^^^^^^^^^^
File "/home/dani/Projects/icons/scripts/audit.py", line 77, in get_iso_3166
table = soup.find_all("table", class_="wikitable")[4].tbody
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
sivy
left a comment
There was a problem hiding this comment.
The script works, and does what it says on the tin!
The comments I've left are based on python style, some personal preferences, and trying to envision the developer experience. Hope this helps.
anticipating removal from fdo spec, and we don't intend to ship these
danirabbit
left a comment
There was a problem hiding this comment.
It looks like this script is also checking for -symbolic, but -symbolic icons are not in the fd.o spec
It's also reporting a missing start-here and folder-drag-accept but those icons do exist as symlinks
I also don't really think this should create a file by default. If you want a file you can pipe output to a file 🤷
|
@danirabbit I've been considering symbolics as a de-facto part of the standard so far, but I've gated it behind a flag for now. I'm not sure if that code should be removed fully, as symbolics could become a legit part of the standard in the future. File output has also been put behind a flag, as the csv output will be different from piping the textual output to a file. Are you testing the script on the source directories or on the built theme? This script isn't aware of any symlinks created in meson, so it has to be run on the built theme to pick up those files. That should probably be documented somewhere… |
Adds a no dependencies Python script and Specification file to the
/scriptsdirectory. The intention is to ease monitoring coverage of the fd.o icon name specification, and provide a CSV report telling us what was found, what is still missing, and what is included that is out of spec. I believe this can be automated to run on any PR, but this request does not do that, as I don't think it's actually necessary to run that often.