Skip to content

Commit

Permalink
LeanPub book and updated website (#147)
Browse files Browse the repository at this point in the history
* Update numpy from 1.15.3 to 1.15.4

Former-commit-id: afdbd7516dadb529191f8f72e653df42f5b9f710

* Update matplotlib from 3.0.1 to 3.0.2

* Update matplotlib from 3.0.1 to 3.0.2

Former-commit-id: 945d24135d9dc168dbd9d57d79e9f5e274d9862c

* Added link to DataCamp course

* Added link to DataCamp course

Former-commit-id: 7dbcc2e017892a76077dd743d2ebad52c965d4af

* Update nxviz from 0.5.0 to 0.6.0

* Update nxviz from 0.5.0 to 0.6.0

Former-commit-id: dbfc8f79de4085a9920744055ae3cf13ef9c17b1

* Update scipy from 1.1.0 to 1.2.0

* Update scipy from 1.1.0 to 1.2.0

Former-commit-id: d2901678efd102004b28c1f47297904a5c1053f3

* Update python-louvain from 0.11 to 0.13

* Update python-louvain from 0.11 to 0.13

Former-commit-id: 7ccd135189168155147f33161122ade916b57314

* Update tqdm from 4.28.1 to 4.29.0

* Update tqdm from 4.28.1 to 4.29.0

Former-commit-id: fea877262946430bf2f927ec4421166bd8d7629f

* Update numpy from 1.15.4 to 1.16.0

* Update numpy from 1.15.4 to 1.16.0

Former-commit-id: 5c0268db9f4dcb7d3c895afa537a1d60ae38a211

* Update tqdm from 4.29.0 to 4.29.1

* Update tqdm from 4.29.0 to 4.29.1

Former-commit-id: 0cf5143e3b7e2d3d658593249660841633e55b31

* Update pandas from 0.23.4 to 0.24.0

* Update pandas from 0.23.4 to 0.24.0

Former-commit-id: 578ae3ec5c74e28833035d715810cf3addb66d39

* Update tqdm from 4.29.1 to 4.30.0

* Update tqdm from 4.29.1 to 4.30.0

Former-commit-id: 408c49d7cc389d3f4b42667ecae452454dc7b9ae

* Update pandas from 0.24.0 to 0.24.1

* Update pandas from 0.24.0 to 0.24.1

Former-commit-id: b616e16ca71febdb8b382357c09d549a69b587bc

* Update numpy from 1.16.0 to 1.16.1

* Update numpy from 1.16.0 to 1.16.1

Former-commit-id: d1228f64ad94a6c21b97c4a06c39e598f216449f

* Update scipy from 1.2.0 to 1.2.1

* Update scipy from 1.2.0 to 1.2.1

Former-commit-id: e140df9b9df001d91e1e0e2c179181b0f185225d

* Update tqdm from 4.30.0 to 4.31.1

* Update tqdm from 4.30.0 to 4.31.1

Former-commit-id: e9448355422122ecefff7b540563a8cea7ed20ea

* Update matplotlib from 3.0.2 to 3.0.3

* Update matplotlib from 3.0.2 to 3.0.3

Former-commit-id: c7364c46e469a333d64c4c6bed498305fd75fdb8

* Update numpy from 1.16.1 to 1.16.2

* Update numpy from 1.16.1 to 1.16.2

Former-commit-id: 9921b3940869fbec98df6875fcd17c94a1d54edc

* Update pandas from 0.24.1 to 0.24.2

* Update pandas from 0.24.1 to 0.24.2

Former-commit-id: 4fd0212d46f43bd716fc838eff826817257295e5

* Update networkx from 2.2 to 2.3

* Update networkx from 2.2 to 2.3

Former-commit-id: bd01d180b955c3437d97effee6c323bc03ca890c

* Update nxviz from 0.6.0 to 0.6.1

* Update nxviz from 0.6.0 to 0.6.1

Former-commit-id: 8582326fbb92a96162a153905f5b95e22bb4cef6

* Update numpy from 1.16.2 to 1.16.3

* Update numpy from 1.16.2 to 1.16.3

Former-commit-id: 8d486146fb4ef5572b61ba6f227ef8c6f132b371

* Update matplotlib from 3.0.3 to 3.1.0

* Update matplotlib from 3.0.3 to 3.1.0

Former-commit-id: 8755090b30d4b28a43bcd0c001366dda224c3023

* Update scipy from 1.2.1 to 1.3.0

* Update scipy from 1.2.1 to 1.3.0

Former-commit-id: 7e86377f68e88361588622164de07de35d15ec18

* Update tqdm from 4.31.1 to 4.32.1

* Update tqdm from 4.31.1 to 4.32.1

Former-commit-id: cdc8856d52a657fe8279ad885f06a2beb323b227

* Update numpy from 1.16.3 to 1.16.4

* Update numpy from 1.16.3 to 1.16.4

Former-commit-id: 6ad31740e4cf9ff1d0373c0e289ed57d8af1e5fa

* Update tqdm from 4.32.1 to 4.32.2

* Update tqdm from 4.32.1 to 4.32.2

Former-commit-id: f41370384743d84976ab4e36bf737b707ce7fb53

* add ffmpeg to env spec

* add ffmpeg to env spec

Former-commit-id: 7364f0514109402bb7f4bd87041d4d0f57a3b5e7

* Update matplotlib from 3.1.0 to 3.1.1

* Update matplotlib from 3.1.0 to 3.1.1

Former-commit-id: 4da6add03eb96c72faf7016e51154ce234f17652

* Update pandas from 0.24.2 to 0.25.0

* Update pandas from 0.24.2 to 0.25.0

Former-commit-id: ed65351257a790f22f8a8b5055ee004b11ecb878

* Update numpy from 1.16.4 to 1.17.0

* Update numpy from 1.16.4 to 1.17.0

Former-commit-id: dd31704b753578c763e04715112a5d8f688a1676

* Update pandas from 0.25.0 to 0.25.1

* Update pandas from 0.25.0 to 0.25.1

Former-commit-id: 4e71b7c8631a47f28dca7021ae29cb8cbcdbb7d6

* Update scipy from 1.3.0 to 1.3.1

* Update scipy from 1.3.0 to 1.3.1

Former-commit-id: fa838d58cb766361468d8904ee44b6b880382e96

* Update tqdm from 4.32.2 to 4.35.0

* Update tqdm from 4.32.2 to 4.35.0

Former-commit-id: 9e06be8d617400611b165b22c94bdf98c1585281

* Update numpy from 1.17.0 to 1.17.1

* Update numpy from 1.17.0 to 1.17.1

Former-commit-id: 27090871dce3d379289d5dcbe2f8065429218ad3

* Update numpy from 1.17.1 to 1.17.2

* Update numpy from 1.17.1 to 1.17.2

Former-commit-id: 778399db274598ae278fb7e8552d74d18d10dc82

* Networkx v2 (#133)

* Add nbstripout

* update to networkx v2 API

* install ffmpeg from native ubuntu repo

* comment out xvfb

* change python to 3.8

* switch to py37

* manual listing of notebooks to execute

* Networkx v2 (#133)

* Add nbstripout

* update to networkx v2 API

* install ffmpeg from native ubuntu repo

* comment out xvfb

* change python to 3.8

* switch to py37

* manual listing of notebooks to execute

Former-commit-id: 25d84cf4c06d9a1a020af53e2e9c2a44e2b4905c

* Moved notebooks into notebooks directory

* Moved notebooks into notebooks directory


Former-commit-id: 91c3c5f41c4b7731809d284c9a40a1d495a25ce9

* Add @MridulS to copyright

* Add @MridulS to copyright


Former-commit-id: 7030d8d2e268c68e034b85b76bdd88d2057de06a

* Add jupyter-book to environment spec

* Add jupyter-book to environment spec


Former-commit-id: 69b5484f9ae4272f84a4eb2a4b521a17abfb5d12

* mkdocs first commit

* mkdocs first commit


Former-commit-id: ae0ea364fe28845a22e1d65bd30ad04c5159fddd

* Sneaking in Python gitignore

* Sneaking in Python gitignore


Former-commit-id: 01e8e31413cd05ed09bd2d00238113d9fcb2e588

* committing data before moving to another computer

* committing data before moving to another computer


Former-commit-id: 20a91bf69b0a50b7ce023cdd5302926915ac6198

* finished chapter 1

* finished chapter 1


Former-commit-id: 3211f2a7d2453e5f7fc4d2fb948c65f11ae39c48

* added static site pieces

* ran bfg cleaner

* took out comment line in .buildpacks

* Trigger commit for Dokku

* fixed config file name

* Switching over to Dockerfile-based deploy

* fixed copy error

* Added command to activate bash

* add dockerignore

* Add command to source bashrc

* change source cmd

* change conda activate to . activate

* add diagnostic which conda

* modify dockerfile

* manually configure path

* fixed docker install command'

* Add entrypoint for Docker container

* Add headers for feedback and supporting

* restricted initial setup

* removed custom source from environment spec file

* fixed Dockerfile

* ignoring ipynb_checkpoints

* commit to move to different computer

* midway commit on hubs chapter

* finished up degree centrality

* finished hubs (degree centrality) notebook

* Added style guide

* Add style guide

* removed 1st level heading

* Moved exercises solution info to correct place

Was in "exercises" section,
should instead be in "solutions" section.

* starting pre-commit

* Finished chapter on paths

* finished chapter on paths

* Fixed missing import in paths notebook.

* Finished chapter 6

* Docs for structures

* Added docstrings to structures.py

- Sneaking in black and isort fix on paths.py

* Added docstrings to all paths.py functions

* Docstrings added to each of the chapter solutions.

* Added mkdocstrings to environment spec

* Added solutions API docs

This is a pretty neat hack!
Use functions to house the answers
and then expose them all at once in an API docs page.

* Added special CSS for API docs

* Upgraded docs with API docs for solutions

* Added docstrings to all hubs solutions.

* Found out that mkdocstrings borks mknotebooks

* started graph io notebook

* made output HTML also use overflow

* Updated with admonition

* added chapter on testing

* Add page to learn more stuff

* whitespace changes

* switching to other computer

* Updated "learn more"

* Minor phrasing change to index

* Commented out advanced topics until it is made

* Added comments on first PDF compilation attempt

* Finished prototype of PDF compiler

Still left to do:

- Separate out chapters such that they start on new pages.

* configured mkdocs to execute notebooks

* added hypothes.is

* Finished PDF builder prototype

* Adding more chapters in

* add NB7 and 8 to mkdocs (#140)

h/t @MridulS!

* Updated gitignore

* Changed port for Makefile

* Finished up to 2nd exercise of bipartite notebook

* EOD commit 6 May 2020

* Finished bipartite first draft

* Update devdocs with render_html function

* Added a render_html convenience function

* Switched to using render_html

* Switched to using render_html for answers to questions

* Switched to using render_html for answers to questions

* Finished linear algebra draft

* Got rid of top level header

* Fixed up linear algebra chapter

* Started drafting statistical inference on graphs section

* Changed bipartite graph figure to matplotlib-generated one.

* Changed links to inline ones

* Added figure generation code

* Finished more prototyping

- Page breaks recognized! Amazing!
- Reconfigured book content.

It's time to put this one into action in the Dockerfile.

* Add dev container specification

* Add updated stats notebook

* Add content to chapter on GOT case study (#146)

* initial work on GoT

* GOT finsh up

* fix for docs build

* strip nboutput

* add load_data method for GOT data

* update dataset

* More stats content

* Minor update

* Finished stats notebook

* Add preface

* Building Markua collection of files

* Adding in test manuscript for leanpub

* Removed python script

* Testing travis deploy

* Deploying whole repo

* Now inserting top level markdown header

* Trying alternative output directory

* Trying a different build structure

* Add tabulate to environment

* fixed latex output for LFM

* Fixed inline LaTeX to LFM LaTeX

* Converting pandas head() to to_markdown()

* Fixed up images LFM compatibility

* preprocessing markdown tables

* swap image with new custom image instead of using the one from the article

* Fixed issue with long outputs

* I think I got markdown tables working finally

* set logging level to INFO

* Getting rid of more HTML

* Getting rid of more HTML

* restored cell content

* more fixes

* Added a few more automated validations

* Fixed final table output

* Add deploy to main branch

* Move Dockerfile into scripts

* Changed README

* Update index page

* moved notebooks into archive

* moved tutorial proposals to archive

* Moved images to archive

* Removed nbstripout commands from Makefile

* previewing deploy on jupyterbook branch

* Targeting deploys from main branch rather than jupyterbook branch

Co-authored-by: pyup-bot <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
Co-authored-by: Mridul Seth <[email protected]>
  • Loading branch information
5 people authored Jul 8, 2020
1 parent 6459ae8 commit 09a8482
Show file tree
Hide file tree
Showing 136 changed files with 15,436 additions and 176,059 deletions.
4 changes: 4 additions & 0 deletions ..bfg-report/2020-04-26/01-12-14/cache-stats.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(apply,CacheStats{hitCount=317, missCount=1691, loadSuccessCount=1691, loadExceptionCount=0, totalLoadTime=2486932100, evictionCount=0})
(tree,CacheStats{hitCount=4422, missCount=1025, loadSuccessCount=1004, loadExceptionCount=0, totalLoadTime=1990683381, evictionCount=0})
(commit,CacheStats{hitCount=1024, missCount=900, loadSuccessCount=900, loadExceptionCount=0, totalLoadTime=479345688, evictionCount=0})
(tag,CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=0})
7 changes: 7 additions & 0 deletions ..bfg-report/2020-04-26/01-12-14/deleted-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
b4774757267ae959f68d06133ade0b309c5f5ec1 14445485 divvy_2013.zip
45d4cb7414b1d10f5d0877f6f3c470b979708e5f 24814137 higgs-activity_time.txt
12444d9b45163b14a75c2f9d19944968bb2684e7 11425361 out.munmun_twitter_social
12444d9b45163b14a75c2f9d19944968bb2684e7 11425361 out.munmun_twitter_social.txt
9b0f5613e84a153710ad8e37db5d38b926e1ab05 36103712 passengers.csv
ede768753ecba62fb0069a181a89f05675e92745 88964528 reviews_Digital_Music_5-checkpoint.json
10d84b4fb6c3294421ebe5e30ae9c7f9c2e61014 32052614 reviews_Digital_Music_5.json.gz
1,645 changes: 1,645 additions & 0 deletions ..bfg-report/2020-04-26/01-12-14/object-id-map.old-new.txt

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions .devcontainer/devcontainer.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM continuumio/miniconda3

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Copy environment.yml (if found) to a temp locaition so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git openssh-client less iproute2 procps iproute2 lsb-release \
#
# Install pylint
&& /opt/conda/bin/pip install pylint \
#
# Update Python environment based on environment.yml (if present)
&& if [ -f "/tmp/conda-tmp/environment.yml" ]; then /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
# [Additional Customization]
&& apt-get install -y nano vim emacs \
&& python -m ipykernel install --user --name "Network Analysis Made Simple"
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "./devcontainer.Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": null
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": []
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Uncomment the next line to run commands after the container is created - for example installing git.
// "postCreateCommand": "apt-get update && apt-get install -y git",
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-in-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

123 changes: 122 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,132 @@
# Custom

docs/introduction/.ipynb_checkpoints/*
docs/*/.ipynb_checkpoints/*
*.csv
*.edgelist
twitter_higgs/*
datasets/divvy_2013/*
datasets/amazon_reviews/*.json
network
__pycache__/*
*.ipynb_checkpoints/*
scripts/pdfbuilder/.ipynb_checkpoints/*
*.pyc
custom/__pycache__/*
.DS_Store
*.md.tmp
*/.ipynb_checkpoints/*
.vscode/*

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# End of https://www.gitignore.io/api/python

.ipynb_checkpoints
*.pdf
*.profraw
Empty file added .here
Empty file.
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
- repo: https://github.com/kynan/nbstripout
rev: master
hooks:
- id: nbstripout
files: ".ipynb"
41 changes: 26 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,33 @@ install:
- python -m ipykernel install --user --name nams

script:
# Your test script goes here
# - command -v jupyter
# - |
# for nb in $(ls *-instructor.ipynb); do
# jupyter nbconvert --config nbconvert_config.py --execute $nb
# Build LeanPub files
- jupyter nbconvert --to python scripts/bookbuilder/markua.ipynb
- python scripts/bookbuilder/markua.py

# Build official website
- mkdocs build

deploy:
# Publish the LeanPub files
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: false
on:
branch: master
target_branch: leanpub

# Publish the official website
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: false
on:
branch: master
local_dir: site/
target_branch: gh-pages

# done
- jupyter nbconvert --config nbconvert_config.py --execute 2-networkx-basics-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 3-hubs-and-paths-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 4-cliques-triangles-structures-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 5-graph-input-output-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 6-bipartite-graphs-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 7-game-of-thrones-case-study-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute 8-US-airports-case-study-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute bonus-1-network-statistical-inference-instructor.ipynb
- jupyter nbconvert --config nbconvert_config.py --execute bonus-3-matrices-instructor.ipynb

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Eric Ma
Copyright (c) 2014-Present Eric J. Ma and Mridul Seth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

25 changes: 14 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
NBS = $(wildcard *instructor.ipynb)
NBHTML = $(wildcard *.html)

.PHONY = serve

all: clean nbhtml readme

nbhtml:
jupyter nbconvert --to html --ExecutePreprocessor.timeout=600 --ExecutePreprocessor.kernel_name="nams" --execute $(NBS) 1-introduction.ipynb bonus-2-one-more-thing.ipynb
jupyter nbconvert --to html --ExecutePreprocessor.kernel_name="nams" 0-pre-tutorial-exercises.ipynb
mv *.html docs/.

readme: README.md
pandoc README.md -o docs/index.html -c gh.css
cp ./images/custom-logo.png ./docs/images/custom-logo.png

clean:
rm docs/*.html

conda:
set -ex
conda env create -f environment.yml
source activate nams
conda activate nams
python checkenv.py

updateconda:
conda env update -f environment.yml

venv:
set -x
VENV="$(which virtualenv)"
Expand All @@ -42,3 +34,14 @@ venv:

check:
python checkenv.py

docs:
mkdocs build

serve:
mkdocs build
python -m http.server 8149 -d site/

format:
isort -rc -y .
black -l 79 .
Loading

0 comments on commit 09a8482

Please sign in to comment.