Skip to content

Commit 5a1d750

Browse files
authored
Merge pull request #53 from mitre/develop
Merge develop to main
2 parents 0d6450c + 90f4681 commit 5a1d750

32 files changed

+87748
-2599
lines changed

.github/workflows/python-package.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: [3.7, 3.8, 3.9]
17+
exclude:
18+
- os: macos-latest
19+
python-version: [3.7]
20+
- os: windows-latest
21+
python-version: [3.7]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies
30+
run: |
31+
python3 -m pip install --upgrade pip
32+
python3 -m pip install flake8
33+
python3 -m pip install -r requirements.txt
34+
- name: Lint with flake8
35+
run: |
36+
# Note: ignore .py versions of notebooks; too many formatting issues
37+
# stop the build if there are Python syntax errors or undefined names
38+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=GrowthViz-*.py
39+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=GrowthViz-*.py
41+
- name: Test with unittest
42+
run: |
43+
python3 -m unittest

.gitignore

+11-1
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,14 @@ dmypy.json
135135
.pytype/
136136

137137
# Cython debug symbols
138-
cython_debug/
138+
cython_debug/
139+
140+
# VSCode environment
141+
.history
142+
.vscode
143+
144+
# Other local additions
145+
*.swo
146+
*.swp
147+
.DS_Store
148+
output

Dockerfile

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
FROM jupyter/minimal-notebook
1+
FROM jupyter/scipy-notebook
22

3-
3+
LABEL maintainer="Robi Scalfani <[email protected]>"
44

5-
WORKDIR /usr/src/app
6-
7-
RUN pip install pandas
8-
RUN pip install matplotlib
9-
RUN pip install ipywidgets
10-
RUN pip install seaborn
11-
RUN pip install qgrid
12-
13-
COPY . ./
145
COPY LICENSE /LICENSE
156
COPY README.md /README.md
167

8+
# Switch to root; minimal-notebook switches away, so we have to switch back
9+
# https://github.com/jupyter/docker-stacks/blob/master/minimal-notebook/Dockerfile
10+
USER root
11+
12+
WORKDIR /app
13+
COPY . /app
14+
15+
RUN pip install -r requirements.txt
16+
17+
RUN chown -R jovyan /app
18+
1719
EXPOSE 8888
1820

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

21-
CMD jupyter notebook
23+
# Switch back to regular user
24+
USER jovyan
25+
26+
CMD jupyter notebook

0 commit comments

Comments
 (0)