{"id":16130220,"url":"https://github.com/lambdacasserole/helium","last_synced_at":"2026-04-27T22:31:23.998Z","repository":{"id":228268724,"uuid":"295030474","full_name":"lambdacasserole/helium","owner":"lambdacasserole","description":"A fast and focused report-generation tool for lifting the quality of Python codebases.","archived":false,"fork":false,"pushed_at":"2026-01-18T13:13:22.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-18T20:47:01.522Z","etag":null,"topics":["code-quality","cyclomatic-complexity","python","report-generator","utils"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdacasserole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-12T21:38:33.000Z","updated_at":"2026-01-18T13:13:25.000Z","dependencies_parsed_at":"2024-03-18T00:23:11.540Z","dependency_job_id":"7c47e9e6-02b3-4c18-847a-7d8388eddb24","html_url":"https://github.com/lambdacasserole/helium","commit_stats":null,"previous_names":["lambdacasserole/helium"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lambdacasserole/helium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fhelium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fhelium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fhelium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fhelium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdacasserole","download_url":"https://codeload.github.com/lambdacasserole/helium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdacasserole%2Fhelium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","cyclomatic-complexity","python","report-generator","utils"],"created_at":"2024-10-09T22:15:01.361Z","updated_at":"2026-04-27T22:31:23.977Z","avatar_url":"https://github.com/lambdacasserole.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Helium\nA fast and focused report-generation tool for lifting the quality of Python codebases.\n\n![Logo](he_logo.svg)\n\n## Overview\nHelium is a report generation tool designed to focus on the parts of your code with the lowest maintainability indices\nand highest cyclomatic complexities. It's a well-known fact that metrics like these can be a bit of a blunt instrument\nwhen it comes to measuring code quality, but they can provide useful insight into which areas of your code could do\nwith more documentation, or a bit of a refactor.\n\nHelium computes quantitative metrics from your code using the [Radon](https://github.com/rubik/radon) library and\nrenders a single-page report from these by filling an SVG template and converting this to a PDF.\n\n## Installation\nIf you're on Linux, you'll need to set up the virtual environment for the project like so:\n\n```bash\nbash setup_venv.sh\n```\n\nNote that you'll need to set up the virtual environment, activate it, upgrade pip and install the dependencies in\nrequirements.txt manually if you're on Windows:\n\n```bash\npython3 -m venv venv\nsource ./venv/Scripts/activate\npip install --upgrade pip\npip install -r requirements.txt\n```\n\nNow you can run Helium, like so:\n\n```bash\npython3 helium.py\n```\n\nIt is advised that you do this from the root of your project, as a `.heliumrc` file will be generated containing\nconfiguration options for your project including a list of files to ignore and configuration options for the\n[Radon harvesters](https://radon.readthedocs.io/en/latest/api.html#module-radon.cli.harvest) that do the actual code\nmetric computation.\n\n### Configuration\nParameters currently supported in the `.heliumrc` file include:\n\n| Name               | Type    | Description                                                                                                                                                                                                           |\n|--------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name`             | `str`   | The name of the project (will be included in the report).                                                                                                                                                             |\n| `pattern`          | `str`   | The pattern to match files to include in the report.                                                                                                                                                                  |\n| `separate_metrics` | `bool`  | If true, maintainability indices and cyclomatic complexities will be computed and listed separately. If false, cyclomatic complexities will be computed only for those files with the lowest maintainability indices. |\n| `excludes`         | `[str]` | Files to exclude. Must be individual relative file or directory paths starting with `./`.                                                                                                                             |\n| `mi_config`        | `obj`   | A Radon maintainability index harvester configuration object (see Radon docs).                                                                                                                                        |\n| `cc_config`        | `obj`   | A Radon cyclomatic complexity harvester configuration object (see Radon docs).                                                                                                                                        |\n\n## Templates\nThe templating that Helium uses is very simple, and you can see exactly how it's done by taking a look at the\n`report_template.svg` file included in the repo using a free editor like [Inkscape](https://inkscape.org/). Values\nthat will be filled by Helium by default include:\n\n+ `m1... m3` - The 3 lowest (worst) maintainability index grades (A-C) computed by Radon for your codebase (per file).\n+ `mq1... mq3` - The 3 lowest (worst) maintainability indices (numeric) computed by Radon for your codebase (per file).\n+ `mf_1... mf_3` - The names of the 3 files with the lowest (worst) maintainability indices computed by Radon for your\n  codebase (per file).\n+ `cc1... cc8` - The 8 highest (worst) cyclomatic complexity grades (A-F) computed by Radon for your codebase (per\n  function).\n+ `ccq1... ccq8` - The 8 highest (worst) cyclomatic complexities (numeric) computed by Radon for your codebase (per\n  function).\n+ `ccn1... ccn8` - The names of the 8 functions with the highest (worst) cyclomatic complexities computed by Radon for\n  your codebase (per function).\n+ `ccf1... ccf8` - The names of the 8 files containing the functions with the highest (worst) cyclomatic complexities\n  computed by Radon for your codebase (per function).\n\nYou can add more maintainability indices and cyclomatic complexities to the template, but for them to be filled you'll\nneed to adjust the `DISPL_MI_RESULTS` and `DISPL_CC_RESULTS` constants in `helium.py`.\n\nTemplate highlight colours are filled by searching for shades of magenta (`#ff00ff`) with the middle byte incremented\nfor each colour region. For example, the highlight colour corresponding to maintainability index 1 is `#ff01ff`, for\nmaintainability index 2 `#ff02ff` and so on. Cyclomatic complexity highlight colours start where maintainability index\nhighlight colours leave off. Very hacky, but works in a pinch.\n\n## Packing\nIt's possible to pack the file `report_template.svg` into the `helium.py` script in order to create one portable script\nfile for report generation. This can be useful if you want the `helium.py` file to stand alone without any dependency\non other files in the same directory. To do this, make any adjustments you like to `report_template.svg`, ensure you've\nset up your virtual environment and run:\n\n```bash\nbash he_pack.sh\n```\n\nYou'll end up with a file called `helium_packed.py` which contains the `report_template.svg` file as a base64 string\nready to write back to disk as-needed.\n\n## Acknowledgements\n\n+ The Radon library is awesome for extracting quantitative code metrics from Python codebases, and what's more its\n  [hosted right here on GitHub](https://github.com/rubik/radon).\n* The font used in the logo is [Monofur](https://www.dafont.com/monofur.font) by Tobias Benjamin Köhler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fhelium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdacasserole%2Fhelium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdacasserole%2Fhelium/lists"}