Skip to content

Commit 55a0730

Browse files
authored
Merge pull request #86 from darribas/move2lite
Move2lite
2 parents c86bd66 + 8424fde commit 55a0730

File tree

529 files changed

+187359
-54136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

529 files changed

+187359
-54136
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
book/*
33
notebooks/*
44
.ipynb_checkpoints/*
5+
lib/.ipynb_checkpoints/*
6+
*/*/.ipynb_checkpoints/*
7+
*.swp
58
lib/__pycache__/*

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
FROM darribas/gds_py:2.0
2-
3-
RUN pip install deprecated
4-
RUN pip install --no-deps git+https://github.com/pysal/pysal.git
1+
FROM darribas/gds_py:4.0
52

63
# Local docs
74
RUN rm -R work/

README.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ you want to build the book locally, you will need the following:
1717
* `git`
1818
* Python libraries listed in [`build-requirements.txt`](lib/jupyter-book-master/build-requirements.txt)
1919

20+
A recommended route is to run this repository inside a [`gds_env`](https://github.com/darribas/gds_env)
21+
(use the `gds_dev` flavour) container, which is the platform used to build it. If you have it installed,
22+
you can launch it from the `notebooks` folder by running:
23+
24+
```
25+
> docker run --rm -ti -p 8888:8888 -p 4000:4000 -v ${PWD}:/home/jovyan/work darribas/gds_dev:4.0
26+
```
27+
2028
## Build process
2129

2230
The current build process involves two main steps:
@@ -28,14 +36,6 @@ The current build process involves two main steps:
2836

2937
This will generate a `notebooks` folder that contains all the files
3038
required to build the book.
31-
1. Test all the `.ipynb` files are well-formated and can be converted:
32-
33-
`> python lib/build.py --test_no_run`
34-
35-
1. Execute all the `.ipynb` files:
36-
37-
`> python lib/build.py --test_run`
38-
3939
1. Build the book from the downloaded notebooks. This can be done by running
4040
the following command from the root folder:
4141

@@ -44,6 +44,34 @@ The current build process involves two main steps:
4444
This will create/update the `docs` folder in the root folder so it contains
4545
everything needed for the hosting server to serve the book. Commit the
4646
changes and the updated book will be available online shortly.
47+
48+
The built website is available on the `./docs` folder and is ready to be pushed to the repository
49+
for serving on Github Pages. If you want to serve it locally, you will need to:
50+
51+
1. Navigate into the `./docs` directory:
52+
53+
`> cd docs`
54+
55+
1. Serve the site:
56+
57+
`> jekyll serve`
58+
59+
If you are serving it inside a container, fix the host so it can be accessed from the host machine:
60+
61+
`> jekyll serve --host="0.0.0.0"`
62+
63+
Then point your browser to `localhost:4000/notebooks/`
64+
65+
Additionally, the command line tool `lib/build.py` incorporates experimental support for testing
66+
the notebooks. Again, two options are available:
67+
68+
1. Test all the `.ipynb` files are well-formated and can be converted:
69+
70+
`> python lib/build.py --test_no_run`
71+
72+
1. Execute all the `.ipynb` files:
73+
74+
`> python lib/build.py --test_run`
4775

4876

4977

docs/Gemfile.lock

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (4.2.10)
4+
activesupport (4.2.11.1)
55
i18n (~> 0.7)
66
minitest (~> 5.1)
77
thread_safe (~> 0.3, >= 0.3.4)
88
tzinfo (~> 1.1)
9-
addressable (2.5.2)
10-
public_suffix (>= 2.0.2, < 4.0)
9+
addressable (2.7.0)
10+
public_suffix (>= 2.0.2, < 5.0)
1111
bibtex-ruby (4.4.7)
1212
latex-decode (~> 0.0)
1313
citeproc (1.0.9)
@@ -23,12 +23,12 @@ GEM
2323
colorator (1.1.0)
2424
commonmarker (0.17.13)
2525
ruby-enum (~> 0.5)
26-
concurrent-ruby (1.1.4)
26+
concurrent-ruby (1.1.5)
2727
csl (1.5.0)
2828
namae (~> 1.0)
2929
csl-styles (1.0.1.9)
3030
csl (~> 1.0)
31-
dnsruby (1.61.2)
31+
dnsruby (1.61.3)
3232
addressable (~> 2.5)
3333
em-websocket (0.5.1)
3434
eventmachine (>= 0.12.9)
@@ -37,19 +37,19 @@ GEM
3737
ffi (>= 1.3.0)
3838
eventmachine (1.2.7)
3939
execjs (2.7.0)
40-
faraday (0.15.4)
40+
faraday (0.17.0)
4141
multipart-post (>= 1.2, < 3)
42-
ffi (1.10.0)
42+
ffi (1.11.1)
4343
formatador (0.2.5)
4444
forwardable-extended (2.6.0)
45-
gemoji (3.0.0)
46-
github-pages (197)
47-
activesupport (= 4.2.10)
45+
gemoji (3.0.1)
46+
github-pages (202)
47+
activesupport (= 4.2.11.1)
4848
github-pages-health-check (= 1.16.1)
49-
jekyll (= 3.7.4)
49+
jekyll (= 3.8.5)
5050
jekyll-avatar (= 0.6.0)
5151
jekyll-coffeescript (= 1.1.1)
52-
jekyll-commonmark-ghpages (= 0.1.5)
52+
jekyll-commonmark-ghpages (= 0.1.6)
5353
jekyll-default-layout (= 0.1.4)
5454
jekyll-feed (= 0.11.0)
5555
jekyll-gist (= 1.5.0)
@@ -60,7 +60,7 @@ GEM
6060
jekyll-readme-index (= 0.2.0)
6161
jekyll-redirect-from (= 0.14.0)
6262
jekyll-relative-links (= 0.6.0)
63-
jekyll-remote-theme (= 0.3.1)
63+
jekyll-remote-theme (= 0.4.0)
6464
jekyll-sass-converter (= 1.5.2)
6565
jekyll-seo-tag (= 2.5.0)
6666
jekyll-sitemap (= 1.2.0)
@@ -85,8 +85,8 @@ GEM
8585
listen (= 3.1.5)
8686
mercenary (~> 0.3)
8787
minima (= 2.5.0)
88-
nokogiri (>= 1.8.5, < 2.0)
89-
rouge (= 2.2.1)
88+
nokogiri (>= 1.10.4, < 2.0)
89+
rouge (= 3.11.0)
9090
terminal-table (~> 1.4)
9191
github-pages-health-check (1.16.1)
9292
addressable (~> 2.3)
@@ -113,13 +113,13 @@ GEM
113113
guard (~> 2.8)
114114
guard-compat (~> 1.0)
115115
multi_json (~> 1.8)
116-
html-pipeline (2.10.0)
116+
html-pipeline (2.12.0)
117117
activesupport (>= 2)
118118
nokogiri (>= 1.4)
119119
http_parser.rb (0.6.0)
120120
i18n (0.9.5)
121121
concurrent-ruby (~> 1.0)
122-
jekyll (3.7.4)
122+
jekyll (3.8.5)
123123
addressable (~> 2.4)
124124
colorator (~> 1.0)
125125
em-websocket (~> 0.5)
@@ -137,13 +137,13 @@ GEM
137137
jekyll-coffeescript (1.1.1)
138138
coffee-script (~> 2.2)
139139
coffee-script-source (~> 1.11.1)
140-
jekyll-commonmark (1.2.0)
140+
jekyll-commonmark (1.3.1)
141141
commonmarker (~> 0.14)
142-
jekyll (>= 3.0, < 4.0)
143-
jekyll-commonmark-ghpages (0.1.5)
142+
jekyll (>= 3.7, < 5.0)
143+
jekyll-commonmark-ghpages (0.1.6)
144144
commonmarker (~> 0.17.6)
145-
jekyll-commonmark (~> 1)
146-
rouge (~> 2)
145+
jekyll-commonmark (~> 1.2)
146+
rouge (>= 2.0, < 4.0)
147147
jekyll-default-layout (0.1.4)
148148
jekyll (~> 3.0)
149149
jekyll-feed (0.11.0)
@@ -165,12 +165,13 @@ GEM
165165
jekyll (~> 3.3)
166166
jekyll-relative-links (0.6.0)
167167
jekyll (~> 3.3)
168-
jekyll-remote-theme (0.3.1)
168+
jekyll-remote-theme (0.4.0)
169+
addressable (~> 2.0)
169170
jekyll (~> 3.5)
170171
rubyzip (>= 1.2.1, < 3.0)
171172
jekyll-sass-converter (1.5.2)
172173
sass (~> 3.4)
173-
jekyll-scholar (5.14.0)
174+
jekyll-scholar (5.16.0)
174175
bibtex-ruby (~> 4.0, >= 4.0.13)
175176
citeproc-ruby (~> 1.0)
176177
csl-styles (~> 1.0)
@@ -222,7 +223,7 @@ GEM
222223
jekyll-seo-tag (~> 2.0)
223224
jekyll-titles-from-headings (0.5.1)
224225
jekyll (~> 3.3)
225-
jekyll-watch (2.1.2)
226+
jekyll-watch (2.2.1)
226227
listen (~> 3.0)
227228
jemoji (0.10.2)
228229
gemoji (~> 3.0)
@@ -243,41 +244,41 @@ GEM
243244
jekyll (~> 3.5)
244245
jekyll-feed (~> 0.9)
245246
jekyll-seo-tag (~> 2.1)
246-
minitest (5.11.3)
247-
multi_json (1.13.1)
248-
multipart-post (2.0.0)
247+
minitest (5.13.0)
248+
multi_json (1.14.1)
249+
multipart-post (2.1.1)
249250
namae (1.0.1)
250251
nenv (0.3.0)
251-
nokogiri (1.10.1)
252+
nokogiri (1.10.4)
252253
mini_portile2 (~> 2.4.0)
253-
notiffany (0.1.1)
254+
notiffany (0.1.3)
254255
nenv (~> 0.1)
255256
shellany (~> 0.0)
256-
octokit (4.13.0)
257+
octokit (4.14.0)
257258
sawyer (~> 0.8.0, >= 0.5.3)
258259
pathutil (0.16.2)
259260
forwardable-extended (~> 2.6)
260261
pry (0.12.2)
261262
coderay (~> 1.1.0)
262263
method_source (~> 0.9.0)
263-
public_suffix (3.0.3)
264+
public_suffix (3.1.1)
264265
rb-fsevent (0.10.3)
265266
rb-inotify (0.10.0)
266267
ffi (~> 1.0)
267-
rouge (2.2.1)
268+
rouge (3.11.0)
268269
ruby-enum (0.7.2)
269270
i18n
270271
ruby_dep (1.5.0)
271-
rubyzip (1.2.2)
272+
rubyzip (2.0.0)
272273
safe_yaml (1.0.5)
273-
sass (3.7.3)
274+
sass (3.7.4)
274275
sass-listen (~> 4.0.0)
275276
sass-listen (4.0.0)
276277
rb-fsevent (~> 0.9, >= 0.9.4)
277278
rb-inotify (~> 0.9, >= 0.9.7)
278-
sawyer (0.8.1)
279-
addressable (>= 2.3.5, < 2.6)
280-
faraday (~> 0.8, < 1.0)
279+
sawyer (0.8.2)
280+
addressable (>= 2.3.5)
281+
faraday (> 0.8, < 2.0)
281282
shellany (0.0.1)
282283
terminal-table (1.8.0)
283284
unicode-display_width (~> 1.1, >= 1.1.1)
@@ -287,7 +288,7 @@ GEM
287288
ethon (>= 0.9.0)
288289
tzinfo (1.2.5)
289290
thread_safe (~> 0.1)
290-
unicode-display_width (1.5.0)
291+
unicode-display_width (1.6.0)
291292

292293
PLATFORMS
293294
ruby
@@ -303,4 +304,4 @@ DEPENDENCIES
303304
tzinfo-data
304305

305306
BUNDLED WITH
306-
2.0.1
307+
1.17.2

docs/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
help:
44
@echo "Please use 'make <target>' where <target> is one of:"
55
@echo " install to install the necessary dependencies for jupyter-book to build"
6-
@echo " book to convert the `content/` folder into Jekyll markdown in `_build/`"
6+
@echo " book to convert the content/ folder into Jekyll markdown in _build/"
77
@echo " clean to clean out site build files"
88
@echo " runall to run all notebooks in-place, capturing outputs with the notebook"
99
@echo " serve to serve the repository locally with Jekyll"
10-
@echo " build to build the site HTML locally with Jekyll and store in _site/"
10+
@echo " build to build the site HTML and store in _site/"
11+
@echo " site to build the site HTML, store in _site/, and serve with Jekyll"
1112

1213

1314
install:
14-
gem install bundler
15-
bundle install
15+
jupyter-book install ./
1616

1717
book:
1818
jupyter-book build ./
@@ -27,5 +27,8 @@ serve:
2727
bundle exec guard
2828

2929
build:
30+
jupyter-book build ./ --overwrite
31+
32+
site: build
3033
bundle exec jekyll build
3134
touch _site/.nojekyll

0 commit comments

Comments
 (0)