#wily

Retro Game BotRetrogamebot
2025-04-15

🎮 Random Retro Game:

Title: Wily & Right no RockBoard: That's Paradise
Released: 1993-01-15
Platforms: Game Boy

&RightnoRockBoard:That'sParadise

Cover image of Wily & Right no RockBoard: That's Paradise
danzindanzin
2024-01-05

So I've created a report for one thousand Black (the Python formatter) commits.

You can see that there was a huge (and complex), 7k lines __init__.py that got broken up around May 2021.

There's a trend of increasing LOC and complexity.

This report shows me there's a lot to improve in wily's code. Hopefully I'm back at that.

@hugovk @ambv

devdanzin.github.io/black/

danzindanzin
2023-10-29

Adding JSON support for : now the results of diff, index, rank and report can be output as JSON.

If you can help with code review or tips on how to improve the output, I'm open to all suggestions.

Wily is a CLI application for tracking, reporting on complexity of Python code. It uses git to go through each revision and run complexity and code-analysis metrics over the code.

github.com/tonybaloney/wily/pu

Luís de Sousaluis_de_sousa
2023-09-12

While stage 16 is yet to start, it is not too late to celebrate this amazing performance by on stage 15. Wiliest among the .

rd.videos.sapo.pt/pPE2u0qPYNDW

danzindanzin
2023-09-10

With support from , we can then use to collect Raw (LOC, comments, blank lines, etc.) metrics from functions and methods.

After adding support for to annotate source code with these metrics, we can display them inline with help from HTML and JS, as in the attached images.

Each line displays the selected metric (or all metrics) on the left. It allows quickly finding, e.g., code with too few comments or blank lines versus lines of code.

5/5

A view of highlighted Python source code shows parts of three methods. On the left, a column of blue numbers represent line numbers, while black numbers represent the Lines of Code of each method.

On the top there are buttons labelled "Toggle", "LOC", "LLOC", "SLOC", "Comments", "Multi", "Blank", "Single", "All". The button with "LOC" in it is selected.A view of highlighted Python source code shows parts of three methods. On the left, a column of blue numbers represent line numbers, while black numbers represent the number of comments of each method.

On the top there are buttons labelled "Toggle", "LOC", "LLOC", "SLOC", "Comments", "Multi", "Blank", "Single", "All". The button with "Comments" in it is selected.A view of highlighted Python source code shows parts of three methods. On the left, a column of blue numbers represent line numbers, while seven columns of black numbers represent different metrics of each method, corresponding to the buttons above.

On the top there are buttons labelled "Toggle", "LOC", "LLOC", "SLOC", "Comments", "Multi", "Blank", "Single", "All". The button with "Comments" in it is selected (but all metrics are shown).
danzindanzin
2023-09-02

At last, submitted a proposal for a source code annotator for , by @tonybaloney.

It allows inline visualization of code metrics in source code, inspired by @coveragepy

Uses to calculate and metrics, then adds color coded metric values to a highlighted source listing and allows changing the metrics for visualization.

The code works, there are screenshots and an example in the linked issue.

github.com/tonybaloney/wily/is

danzindanzin
2023-08-31

I'm bad at writing documentation, here's my latest attempt:

"""
# `wily annotate` design and implementation

`wily annotate` is a new command being proposed for addition to . It works
on an already built wily cache and uses detailed metric information to add metric
values to source file listings. From its docs:
> The annotate command will generate annotated source and output it to
> console or save as HTML, with metric values for a revision or single file.
[...]
"""

danzindanzin
2023-08-24

Today I wrote some trivial code to convert .gitignore rules to exclude/ignore patterns. It turns out it was completely unnecessary for our project (), because we already pass a tight list of targets for radon to scan.

But it might be useful for upstream radon users, as an option to gather exclude/ignore rules from .gitignore. So I'll propose that as a new feature and see how it goes.

github.com/rubik/radon

danzindanzin
2023-08-20

Working on a source code annotator for , which uses to calculate and metrics. It adds metric values to a highlighted source listing and allows changing the metrics for visualization.

Because radon doesn't record line numbers for Halstead metrics, we do a little song and dance to add them. Will probably offer a patch to include them upstream.

🐍

devdanzin.github.io/wily/annot

danzindanzin
2023-08-17

@bmaxv @pybites Have you heard about wily, which allows you to report and graph history of Cyclomatic Complexity and other metrics (Maintenability Index, Halstead, etc.)? It used radon to get the metrics and goes through the Git history of a project using its visitors.

I'm currently adding the ability to generate annotated source files with metric values. Here's an example: devdanzin.github.io/wily/annot

github.com/tonybaloney/wily

danzindanzin
2023-08-09

Some more code quality visualization improvements for : it's now possible to annotate source code with metrics ( was already working) and select which one to display and use to color code blocks.

See a sample report here: devdanzin.github.io/wily/ (click the filenames for the annotated source code).

Code for the annotator currently lives at github.com/devdanzin/wily/tree, I hope to submit it for upstreaming soon-ish.

danzindanzin
2023-08-03

Working on wily[0] so it can generate reports and graphs on code metrics(LOC, Cyclomatic Complexity etc.) for a whole project at once.

It also annotates source code with metrics (only Cyclomatic Complexity so far).

Example bulk report: devdanzin.github.io/wily/
🐍

[0] github.com/tonybaloney/wily

An HTML table displays the result of building a bulk report using wily: a list of Python filenames and links to many code metrics on them. The headers are "Filename", "Report", "complexity", "h1", "h2", "N1", "N2", "vocabulary", "length", "volume", "difficulty", "effort", "mi", "loc", "lloc", "sloc". The first row below the headers has "global" as filename, indicating the links in it are to global graphs including many files, as opposed to one of a single file. The other rows start with a filename and repeat the words in the headers, sometimes as a hyperlink (indicating there's a graph or report of that metric for that file), sometimes as plain labels (no graph or report available).An image of highlighted Python source code with line numbers and numeric values on the left side. The code is contained in two colored blocks, the one above has green background and the one below has orange background. These colors correspond to the numeric values in the left side, which are measures of Cyclomatic Complexity and read "03" for the green block and "31" for the orange block.A table show a wily report for a single file. The headers are "Revision", "Message", "Author", "Date", "Number of Operands", "Number of Operators", "blank lines", "Multi-line comments" and "Cyclomatic Complexity". Each row begins with a string representing a Git revision and shows the data corresponding to each header.A line graph plots many colored lines representing the evolution of Cyclomatic Complexity of files. The X axis is labelled "history" and has labels for the years 2019 to 2023. The Y axis is labelled "Cyclomatic Complexity" and ranges from 0 to 45. On the right side, a legend gives the filename corresponding to each line color and marker.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst