Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graph for git tags #112

Open
18 tasks
roskakori opened this issue Jun 14, 2023 · 1 comment
Open
18 tasks

Add graph for git tags #112

roskakori opened this issue Jun 14, 2023 · 1 comment

Comments

@roskakori
Copy link
Owner

roskakori commented Jun 14, 2023

Goals

  • When a user specifies the command lines option --format=graph, the output is an image file showing how the SLOC changed over time for each git tag.
    • If the command line options for the source path are anything but a single git URL, pygount fails with the error:

      --graph requires a single git URL as source

    • The output image format is PNG.
    • The command line option --tags=REGEX allows to limit the tags to be analyzed to the ones matching the regular expression REGEX. The default is .*.
    • The order of tags to be analyzed is natural.
    • The command line option allows to specify the colors for the most popular languages as comma separated list of hex codes with white space and # being ignored. ℹ️ For example: #123456, 789abc
      • The default is ❓ TBD: Use 8 colors that look "nice" but also alternate between bright and dark to make them easy to distinguish even for people with color deficiencies.
      • If less than 2 colors are specified, the option is rejected with the message:

        At least two colors must be specified.

      • If there are more languages than colors, the last color is used to sum up the additional languages as "Other".
        • The "Other" languages are always the bottom language, even if in sum they have more lines of code than the separate languages.
      • If there are more colors than languages, only the required number of colors shows in the graph.
      • ❓ TBD: How to handle a language that was part of the repo at some point but is not at the most version. For example: *.rst is migrated to *.md.
    • In the graph, the languages are sorted in descending order from top to bottom by number of lines at the time of the final tag.
      • If lines numbers are equal, the secondary sort criteria is the display name of language.
    • The command line option --width and --height specify the size of the graph in pixels.
      • The defaults are 1024 resp. 768.

      • If the value is less than than 600 resp. 400 or more than 32,767, it is rejected with the message:

        Value for option --xxx must be between XXX and 32767.

        Note: PNG could use sizes up to 2**31 - 1.

    • ❓ TBD: General layout, percentage used, maximum length of language before cut off, font to use, how to scale font, ...

Wireframe

pygount graph wireframe

Notes

The idea is to have graphs similar to the Jenkins SlocCount pluggin:

Example SlocCount graph

@roskakori roskakori added this to the v1.6.1 milestone Jun 14, 2023
@ropapermaker ropapermaker changed the title Add grahp for git tags Add graph for git tags Jun 14, 2023
@roskakori roskakori modified the milestones: v1.6.1, 1.7.0 Jun 30, 2023
ropapermaker added a commit that referenced this issue Jul 4, 2023
@ropapermaker ropapermaker linked a pull request Jul 4, 2023 that will close this issue
ropapermaker added a commit that referenced this issue Jul 5, 2023
All tags of a cloned repo can be analyzed
with SourceAnalysis

Currently the input regex does not get compiled
correctly
@roskakori
Copy link
Owner Author

@ropapermaker Assuming you are not going to finish this any more, I'm putting it back to the backlog so it can be revisited again in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

2 participants