Skip to content

Conversation

@markcoatsworth
Copy link
Collaborator

PR Type

[Feature]

Short Description

Adds a new row of data into the /analytics page, showing more detailed insights about usage of our github account.

Tests Added

None so far.

Copy link
Member

@amrit110 amrit110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, left a few comments to address. Great work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the name of the file to code-config-chart.tsx and update imports. We are using kebab-case for the module names.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the name of the file to geographic-chart.tsx and update imports. We are using kebab-case for the module names.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the name of the file to meaningfulness-chart.tsx and update imports. We are using kebab-case for the module names.

</div>
<div className="text-xs text-gray-600 dark:text-gray-400 mt-1">Code Files</div>
<div className="text-xs text-gray-500 dark:text-gray-500">
({forkData ? ((forkData.summary.code_files / (forkData.summary.code_files + forkData.summary.config_files)) * 100).toFixed(1) : 72.2}%)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is some bug here. Shows NaN% when i tried it on my end.

import sys
from collections import Counter
from pathlib import Path
from typing import Any, Dict, List
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing Dict and List types with built-in types. Use of typing.Dict and typing.List is now deprecated since python 3.9. (https://stackoverflow.com/questions/37087457/difference-between-defining-typing-dict-and-dict)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants