Skip to content

Commit

Permalink
Merge pull request #53 from mitre/develop
Browse files Browse the repository at this point in the history
Merge develop to main
  • Loading branch information
dchud authored Jul 2, 2021
2 parents 0d6450c + 90f4681 commit 5a1d750
Show file tree
Hide file tree
Showing 32 changed files with 87,748 additions and 2,599 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
exclude:
- os: macos-latest
python-version: [3.7]
- os: windows-latest
python-version: [3.7]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8
python3 -m pip install -r requirements.txt
- name: Lint with flake8
run: |
# Note: ignore .py versions of notebooks; too many formatting issues
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=GrowthViz-*.py
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=GrowthViz-*.py
- name: Test with unittest
run: |
python3 -m unittest
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,14 @@ dmypy.json
.pytype/

# Cython debug symbols
cython_debug/
cython_debug/

# VSCode environment
.history
.vscode

# Other local additions
*.swo
*.swp
.DS_Store
output
29 changes: 17 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
FROM jupyter/minimal-notebook
FROM jupyter/scipy-notebook

MAINTAINER [email protected]
LABEL maintainer="Robi Scalfani <[email protected]>"

WORKDIR /usr/src/app

RUN pip install pandas
RUN pip install matplotlib
RUN pip install ipywidgets
RUN pip install seaborn
RUN pip install qgrid

COPY . ./
COPY LICENSE /LICENSE
COPY README.md /README.md

# Switch to root; minimal-notebook switches away, so we have to switch back
# https://github.com/jupyter/docker-stacks/blob/master/minimal-notebook/Dockerfile
USER root

WORKDIR /app
COPY . /app

RUN pip install -r requirements.txt

RUN chown -R jovyan /app

EXPOSE 8888

RUN jupyter nbextension enable --py --sys-prefix qgrid

CMD jupyter notebook
# Switch back to regular user
USER jovyan

CMD jupyter notebook
Loading

0 comments on commit 5a1d750

Please sign in to comment.