Skip to content

Commit 4f829d2

Browse files
authored
Merge pull request #33 from hpicgs/dev
Release v0.7.0
2 parents 5c19fb9 + 0d4cfd1 commit 4f829d2

31 files changed

+339
-213
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy HiViSer GitHub Pages
1+
name: Deploy Viewer to GitHub Pages
22

33
on:
44
push:
@@ -23,7 +23,7 @@ jobs:
2323
WITH_V: true
2424

2525
deploy:
26-
name: Deploy HiViSer Frontend to GitHub Pages 🚀
26+
name: Deploy Frontend to GitHub Pages 🚀
2727
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
2828
runs-on: ubuntu-latest
2929
steps:
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
cd frontend
5757
pnpm install
58-
pnpm run build
58+
pnpm run build:pages
5959
6060
- name: Deploy Frontend 🚀
6161
uses: JamesIves/github-pages-deploy-action@v4.3.3

.github/workflows/tagged-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: "ubuntu-latest"
1212

1313
steps:
14-
- name: Release HiViSer Action 🎉
14+
- name: Release Analytics Treemap Embedding Action 🎉
1515
uses: "marvinpinto/action-automatic-releases@latest"
1616
with:
1717
repo_token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Test HiViSer Action
1+
name: Test Analytics Treemap Embedding Action
22

33
on: [push]
44

55
jobs:
66
test:
7-
name: Run HiViSer Action 🧪
7+
name: Run Analytics Treemap Embedding Action 🧪
88
concurrency:
99
group: ${{ github.ref }}
1010
cancel-in-progress: true # Recommended if you intend to make multiple deployments in quick succession.
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout 🛎️
1717
uses: actions/checkout@v3
1818

19-
- name: Run HiViSer Action 🚀
19+
- name: Run Action 🚀
2020
uses: ./ # Uses the action in the root directory
2121
with:
2222
benchmark: true

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# github-software-analytics-embedding
22
Seminar Project of the Seminar "Advanced Techniques for Analysis and Visualization of Software Data" of CGS, HPI and DEF in the Summer Term 2022
33

4-
# Usage
4+
![image](https://user-images.githubusercontent.com/33397387/194839012-0c3efa5c-29cf-41b3-a686-1e9fd310c1a2.png)
5+
This project contains:
6+
- a dockerized github action to calculate typescript software metrics per commit and store them as a `.csv` file directly to the git repository under the custom ref `refs/metrics`.
7+
- a React frontend to visualize the calculated metrics in a treemap.
8+
- an embedding script to integrate the viewer into an existing webpage.
9+
10+
⚠️ Please note that this is a research prototype and not meant for use in production as of now.
11+
12+
# Integration into your Github project
513
Create a new GitHub Actions workflow in your project, e.g. at `.github/workflows/analytics-embedding.yml`. The content of the file should be in the following format:
614
```yaml
715
name: Analytics Treemap Embedding
@@ -26,15 +34,14 @@ jobs:
2634
- name: Check out Git repository
2735
uses: actions/checkout@v3
2836

29-
- name: Run Hiviser Action
30-
uses: hpicgs/hiviser-action@v0
37+
- name: Run Analytics Treemap Embedding Action 🚀
38+
uses: hpicgs/github-software-analytics-embedding@v0
3139
with:
3240
# Optional, use if you want to analyse a specific folder
3341
repository_path: ./
3442
# Optional to enable benchmarking
3543
benchmark: true
3644
```
37-
3845
## Development
3946
4047
Install `pnpm`:
@@ -52,7 +59,8 @@ pnpm i
5259
pnpm run dev
5360
```
5461
55-
Navigate to e.g. `localhost:3000/hpicgs/github-software-analytics-embedding/5b337b8409f2a2d3b1b14f85d52a97a0258fe256`
62+
Navigate to `localhost:3000` in the browser of your choice.
63+
5664
### Setup Code Anayltics Development locally
5765
Create an .env file
5866
```

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: "HiViSer - Action"
2-
description: "HiViSer visualisations for your repository"
1+
name: "Analytics Treemap Embedding Action"
2+
description: "A Github Action that provides code metrics and treemap visualisations for your typescript repository"
33
branding:
44
icon: "search"
55
color: "blue"

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
echo $(tokei ./src -o json > metrics.json)
55

66
if [[ -z "${GITHUB_TOKEN}" ]]; then
7-
echo "GITHUB_TOKEN is not set. Stopping Hiviser Action."
7+
echo "GITHUB_TOKEN is not set. Stopping Action."
88
exit 0
99
fi
1010

frontend/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers=true

frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/>
99
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/>
10-
<title>HiViser Action</title>
10+
<title>Analytics Treemap Embedding Action</title>
1111

1212
<!-- Start Single Page Apps for GitHub Pages -->
1313
<script type="text/javascript">

frontend/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
{
22
"name": "treemap-github-embedding",
3-
"version": "0.1.0",
3+
"version": "0.6.1",
44
"private": "true",
55
"homepage": "https://hpicgs.github.io/github-software-analytics-embedding/",
66
"scripts": {
77
"build": "tsc --noEmit && vite build",
8+
"build:pages": "tsc --noEmit && vite build --base /github-software-analytics-embedding/",
89
"build:embed": "tsc --noEmit && vite build --config vite.config-embed.ts",
910
"deploy": "gh-pages -d dist",
1011
"dev": "vite",
12+
"dev:pages": "vite --base /github-software-analytics-embedding/",
1113
"preinstall": "npx only-allow pnpm",
12-
"preview": "vite preview"
14+
"preview": "vite preview",
15+
"preview:pages": "vite preview --base /github-software-analytics-embedding/"
1316
},
1417
"dependencies": {
1518
"@emotion/react": "^11.9.3",
1619
"@emotion/styled": "^11.9.3",
20+
"@mui/icons-material": "^5.10.6",
1721
"@mui/material": "^5.8.6",
1822
"buffer": "^6.0.3",
1923
"isomorphic-fetch": "^3.0.0",
2024
"octokit": "^1.8.1",
2125
"papaparse": "^5.3.2",
26+
"pretty-bytes": "^6.0.0",
2227
"react": "18.1.0",
2328
"react-dom": "18.1.0",
2429
"react-router-dom": "6",

0 commit comments

Comments
 (0)