Package: burndown-chart-generator
burndown-chart-generator- a progress burndown chart generator scriptWhat it doesThe script generates a chart showing completed glyphs over time.
It does this by reading color mark info out of UFO sources, using git to see what's changed as you've been working.
Milestones can be added to the chart for ease of tracking progress towards a goal.SetupThe main thing you need to configure in order to be able to use the burndown chart generator is its config file.
You can see the example onehere, which you should copy and modify to your liking.
The expected name for the file isburndown.toml, but if you want something different that's fine.Configuration TOML[config]fields:repo_path(string, defaults to same folder as config file): the main folder for your project, where Git lives (rungit rev-parse --show-toplevelif you're not sure)commit_start(string): the git revision to start the chart at (i.e. the first commit to analyse)commit_end(string): the git revision to end the chart at, typically a branch nameufo_finder: specifies the algorithm to use to find your UFOs. There are currently three options, some requiring additional fields (see the example for syntax)glob: searches therepo_pathfor any folders with the UFO extensiondesignspace: reads UFO paths from a given designspace filegoogle-fonts: reads theGoogle Fonts Toolsconfiguration YAML file to get paths to UFOs/designspacescache(bool, defaultfalse): whether or not to save cache information to speed up subsequent runscache_path(string, default.burndown-chart-generator-cache.toml): where to save cache information. Has no effect unlesscacheistrueStatusesA status is the definition of the meaning of a given mark color & glyph type pair.
For example, a green mark on a drawn glyph should be labelled as "Ready for review (drawn)".[[status]]fields:name(string): the label for glyphs in this category (shown in the legend of the chart)plot_color(string): the hex color (with#prefix) of the area of the chart for these glyphsglyph_type(string, optional): the type of glyph. Currently "drawn" and "composite" are supportedmark_color(string or list): the color of the mark. You can give a list of 4 values between 0 and 1 (seethe UFO convention), or use one of the following pre-configured colors:redyellowgreenbluepurpleYou can omitglyph_typeand/ormark_colorto give yourself catch-all options.MilestonesA milestone is a trendline to reach number of glyphs across a number of UFOs by a certain date.
Trendlines will start at zero glyphs unlessstarts_from_previousis set toTrue.
The y axis "Number of glyph sources" is calculated by multiplyingtotal_glyphsandtotal_ufos.[[milestone]]fields:name(string): the name of the milestone (shown at the end of the trendline)plot_color(string): the hex color (with#prefix) to drawn the linestart_date(YYYY-MM-DD date, optional): the start date for the target. Can be excluded ifstarts_from_previousisTruestarts_from_previous(bool, defaultfalse): indicates whether to start the current milestone from the previous one. Can be excluded ifstart_dateis setdue_date(YYYY-MM-DD date): the deadline for the milestone (where the line will end on the x axis)total_glyphs(integer): the number of glyphs expected to be in a single master when the milestone is completetotal_ufos(integer): the number of masters/UFOs there are expected to be when the milestone is completeGlyph typesThe[glyph_types]section maps glyph names to their type, to help with status classification.
Glyphs can either be "drawn" or "composite"To save the tedium of writing this by hand, you can generate it from a UFO usingburndown-chart-generator generate-glyph-types <UFO path>, and then copy-paste it into yourburndown.tomlRunning the toolOn your local machineRunpip install burndown-chart-generator(or add to your project's requirements/dependencies)If your configuration file is calledburndown.toml, then just callburndown-chart-generatorin the same folder as it.
Otherwise, callburndown-chart-generator --config <path to config.toml>.The image will be saved into the current working directory with the nameburndown-chart.pngusage: burndown-chart-generator [-h] [-V] [-c CONFIG] {generate-glyph-types,export-env} ...

a font project burndown chart generator

options:
  -h, --help            show this help message and exit
  -V, --version         print the program's version and exit
  -c CONFIG, --config CONFIG
                        the path to the burndown generator config TOML file (defaults to ./burndown.toml)

subcommands:
  generate-glyph-types  generates the [glyph-types] table for config TOML file based on a UFO
  export-env            prints environment variable declarations to STDOUT. Useful for CIIn GitHub ActionsSeeaction-burndownfor this use case.
In short though, something like this:steps:
  - name: "Checkout repo"
    uses: actions/checkout@v3
    with:
      # This does a full checkout of the repositry, making all
      # commits/branches/tags available, which is needed for generating
      # the burndown chart, as the tool traverses Git history
      fetch-depth: 0
  - name: "Generate burndown chart"
    uses: daltonmaag/action-burndown@v0.1How it worksFor each commit in the specified range*:Create agit worktreeCount the number of glyphs with each recognised statusThen, using the status counts along with the commit dates, plots a chart to show progress(* if there are multiple commits in a single calendar day, only the last one is considered, as a time saving measure)VersioningThis project adheres tosemantic versioningBreaking changes that would require a major version increment:Making a config that was valid (passes validationandhas useful behaviour) in a previous version no longer loadChanging the names of fields (without supporting fallback to the old names)Adding new required fieldsRemoving or renaming CLI flagsChanging the default settings to be semantically differente.g. makingstarts_from_previousdefault totrueinstead offalseChanging the default graph file nameNotably this does not cover the appearance of the chartMinor version changes:Adding new, optional CLI flags or config file itemsAdding a new valid value to an existing flag/optione.g. adding a newufo_finderalgorithm