Skip to content

Commit 6e9188b

Browse files
upgrade px to idiom (#91)
1 parent 42729aa commit 6e9188b

File tree

5 files changed

+200
-66
lines changed

5 files changed

+200
-66
lines changed

.circleci/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
command: |
5454
. venv/bin/activate
5555
rm -f build/failures/*
56+
echo ${mapbox_token} > .mapbox_token
57+
mkdir -p build/ipynb
58+
cd build/ipynb && ln -s ../../.mapbox_token && cd ../..
5659
make -kj8 || make -kj8
5760
if [ "${CIRCLE_BRANCH}" == "master" ]; then
5861
cd build/html

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.ipynb
22
.ipynb_checkpoints
33
build
4+
.mapbox_token

eject.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,8 @@
88
if os.path.isfile(ipynb_path):
99
metadata, content = frontmatter.parse(open(html_path).read())
1010
if "permalink" in metadata:
11-
md_path = re.sub("python/(.*)/", "notebooks/\g<1>.md", metadata["permalink"])
12-
if not os.path.isfile(md_path): continue
13-
nb_fm = frontmatter.load(md_path)
14-
print(md_path)
15-
if "v4upgrade" in nb_fm["jupyter"]["plotly"]:
16-
metadata["v4upgrade"] = True
17-
nb_fm["jupyter"]["plotly"] = metadata
18-
frontmatter.dump(nb_fm, md_path)
19-
20-
continue
2111
try:
22-
md_path = re.sub("python/(.*)/", "eject/\g<1>.md", metadata["permalink"])
12+
md_path = re.sub("matplotlib/(.*)/", "eject/\g<1>.md", metadata["permalink"])
2313
jt.writef(jt.readf(ipynb_path), md_path, fmt=".md")
2414
nb_fm = frontmatter.load(md_path)
2515
nb_fm["jupyter"]["plotly"] = metadata

0 commit comments

Comments
 (0)