Skip to content

Commit

Permalink
Merge pull request #42 from Zerohertz/dev-v0.1.10
Browse files Browse the repository at this point in the history
[v0.1.10] 🎨 Add: Before After, Grid, Scatter, Issue PR Labeler & πŸ“ Fix: Pie Chart
  • Loading branch information
Zerohertz authored Nov 14, 2023
2 parents 041d229 + 4741ccd commit 0a14961
Show file tree
Hide file tree
Showing 32 changed files with 579 additions and 48 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/issue-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Issue Controller

on:
issues:
types: [opened, edited]

jobs:
add-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Assign Zerohertz to issue
if: github.event_name == 'issues' && github.event.action == 'opened'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: ['Zerohertz']
})
- name: Add 'fix' label
if: contains(github.event.issue.title, '[Bug]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['fix']
})
- name: Add 'chore' label
if: contains(github.event.issue.title, '[Chore]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['chore']
})
- name: Add 'style' label
if: contains(github.event.issue.title, '[Style]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['style']
})
- name: Add 'docs' label
if: contains(github.event.issue.title, '[Docs]')
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['docs']
})
94 changes: 94 additions & 0 deletions .github/workflows/pr-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: PR Controller

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
add-labels:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Assign Zerohertz to PR
if: github.event_name == 'pull_request' && github.event.action == 'opened'
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
github.rest.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: ['Zerohertz']
})
- name: Add labels based on file path and branch
uses: actions/github-script@v6
with:
github-token: ${{secrets.GH_TOKEN}}
script: |
const baseBranch = context.payload.pull_request.base.ref;
const headBranch = context.payload.pull_request.head.ref;
const issueNumber = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
let labelsToAdd = [];
// Check for PR from dev* to master
if (baseBranch === 'master' && headBranch.startsWith('dev')) {
const files = await github.rest.pulls.listFiles({
owner,
repo,
pull_number: issueNumber
});
files.data.forEach(file => {
if (file.filename.startsWith('Jenkins') || file.filename.startsWith('.github/workflows')) {
labelsToAdd.push('chore');
}
if (file.filename.startsWith('docs')) {
labelsToAdd.push('docs');
}
if (file.filename.startsWith('zerohertzLib/algorithm/')) {
labelsToAdd.push('feat/algorithm');
}
if (file.filename.startsWith('zerohertzLib/api/')) {
labelsToAdd.push('feat/api');
}
if (file.filename.startsWith('zerohertzLib/logging/')) {
labelsToAdd.push('feat/logging');
}
if (file.filename.startsWith('zerohertzLib/mlops/')) {
labelsToAdd.push('feat/mlops');
}
if (file.filename.startsWith('zerohertzLib/monitoring/')) {
labelsToAdd.push('feat/monitoring');
}
if (file.filename.startsWith('zerohertzLib/plot/')) {
labelsToAdd.push('feat/plot');
}
if (file.filename.startsWith('zerohertzLib/vision/')) {
labelsToAdd.push('feat/vision');
}
});
}
// Check for PR from docs to dev*
if (baseBranch.startsWith('dev') && headBranch === 'docs') {
labelsToAdd.push('docs');
}
// Remove duplicates
labelsToAdd = [...new Set(labelsToAdd)];
if (labelsToAdd.length > 0) {
await github.rest.issues.addLabels({
issue_number: issueNumber,
owner,
repo,
labels: labelsToAdd
});
}
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b86311c7586fa57666c7690e5c70b7bc
config: 6fbcbe72d420881baa277b9abae1647f
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/_sources/zerohertzLib.monitoring.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
zerohertzLib.monitoring package
==============================
=================================

Module contents
---------------
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: 'v0.1.9',
VERSION: 'v0.1.10',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
14 changes: 11 additions & 3 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; zerohertzLib v0.1.9 documentation</title>
<title>Index &mdash; zerohertzLib v0.1.10 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=0589a96a"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=46c0c710"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
Expand Down Expand Up @@ -114,10 +114,12 @@ <h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zerohertzLib.plot.html#zerohertzLib.plot.bar">bar() (in module zerohertzLib.plot)</a>
</li>
<li><a href="zerohertzLib.plot.html#zerohertzLib.plot.barh">barh() (in module zerohertzLib.plot)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zerohertzLib.plot.html#zerohertzLib.plot.barh">barh() (in module zerohertzLib.plot)</a>
<li><a href="zerohertzLib.vision.html#zerohertzLib.vision.before_after">before_after() (in module zerohertzLib.vision)</a>
</li>
<li><a href="zerohertzLib.algorithm.html#zerohertzLib.algorithm.bfs">bfs() (in module zerohertzLib.algorithm)</a>
</li>
Expand Down Expand Up @@ -164,6 +166,10 @@ <h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zerohertzLib.api.html#zerohertzLib.api.gpt">gpt() (in module zerohertzLib.api)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zerohertzLib.vision.html#zerohertzLib.vision.grid">grid() (in module zerohertzLib.vision)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -256,6 +262,8 @@ <h2 id="P">P</h2>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="zerohertzLib.plot.html#zerohertzLib.plot.scatter">scatter() (in module zerohertzLib.plot)</a>
</li>
<li><a href="zerohertzLib.api.html#zerohertzLib.api.send_discord_message">send_discord_message() (in module zerohertzLib.api)</a>
</li>
</ul></td>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Indices and tables &mdash; zerohertzLib v0.1.9 documentation</title>
<title>Indices and tables &mdash; zerohertzLib v0.1.10 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=0589a96a"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=46c0c710"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions docs/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>zerohertzLib &mdash; zerohertzLib v0.1.9 documentation</title>
<title>zerohertzLib &mdash; zerohertzLib v0.1.10 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=0589a96a"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=46c0c710"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
Expand Down
Binary file modified docs/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; zerohertzLib v0.1.9 documentation</title>
<title>Python Module Index &mdash; zerohertzLib v0.1.10 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=0589a96a"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=46c0c710"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions docs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; zerohertzLib v0.1.9 documentation</title>
<title>Search &mdash; zerohertzLib v0.1.10 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />

<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=0589a96a"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=46c0c710"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
Expand Down
Loading

0 comments on commit 0a14961

Please sign in to comment.