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 CI #16

Merged
merged 27 commits into from
Nov 17, 2022
109 changes: 109 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: CI

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
pull_request:
branches:
- main

jobs:
# Error: Dependency review is not supported on this repository. Please ensure that Dependency graph is enabled,
# see https://github.com/Arize-ai/arize-toolbox/settings/security_analysis
#
# dep-review:
# name: Dependency Review
# runs-on: ubuntu-latest
# permissions:
# contents: read
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v3
# - name: Dependency Review
# uses: actions/dependency-review-action@v1

documentation:
name: Docstring Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Python Interrogate Check
uses: JackMcKew/python-interrogate-check@main
with:
path: 'arize_toolbox'
fail-under: 90

code-format:
name: Code Format
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v3
- uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: "."
use-pylint: false
use-pycodestyle: false
use-flake8: false
use-mypy: false
use-isort: true
use-black: true
extra-flake8-options: ""
extra-black-options: "--check --diff --color"
extra-mypy-options: ""
extra-isort-options: "--profile black --check-only --diff"

code-lint:
name: Code Quality & Lint
runs-on: ubuntu-latest
# needs: [documentation, code-format]
steps:
# - uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v3
- uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: "."
use-pylint: false
use-pycodestyle: false
use-isort: false
use-black: false
use-flake8: true
use-mypy: true
extra-flake8-options: "--max-line-length=94 --exclude=__init__.py"
extra-mypy-options: ""
extra-isort-options: ""

# Error: Advanced Security must be enabled for this repository to use code scanning.
#
# code-ql:
# name: CodeQL Analysis
# # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
# runs-on: ubuntu-latest
# needs: [dep-review, documentation, code-format]
# permissions:
# # required for all workflows
# security-events: write
# # only required for workflows in private repositories
# actions: read
# contents: read
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# # Initializes the CodeQL tools for scanning.
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v2
# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# # If this step fails, then you should remove it and run the build manually (see below).
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v2
#
6 changes: 3 additions & 3 deletions arize_toolbox/umap/umap.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class UMAP():
def __init__ (self):
print("hello world")
class UMAP:
def __init__(self):
print("hello world")
16 changes: 13 additions & 3 deletions arize_toolbox/widgets/umapWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import arize_toolbox
import os
from IPython.core.display import display, HTML

from IPython.core.display import HTML, display # type: ignore

import arize_toolbox

BASE_PATH = arize_toolbox.__path__[0] # type: ignore
STATIC_PATH = os.path.join(BASE_PATH, "nbextension", "static")
Expand All @@ -15,7 +17,15 @@ def loadJS():
class UMAPWidget:
def template(self):
return f"""
<html><script>{loadJS()}</script><body><div id='root'></div></body><script>window.renderWidget();</script></html>"""
<html>
<script>{loadJS()}</script>
<body>
<div id='root'>
</div>
</body>
<script>window.renderWidget();</script>
</html>
"""

def show(self):
display(HTML(self.template()))