Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5cf72c

Browse files
committed
Merge branch 'source-design-merge' into geom_tile
# Conflicts: # _posts/ggplot2/2016-11-29-geom_tile.Rmd # _posts/ggplot2/2016-11-29-geom_tile.md
2 parents b4f9f75 + 2e0b90a commit b5cf72c

File tree

125 files changed

+69622
-3577
lines changed

Some content is hidden

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

125 files changed

+69622
-3577
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ vendor/bundle
2222
_posts/python/fundamentals/static-image/images
2323
_config_personal.yml
2424
_posts/python/html
25+
.Rproj.user
26+
documentation.Rproj

Rakefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ task :deploy => [:check_git] do
2121
puts "...getting latest python docs"
2222
system "rm -rf _posts/python/html" or exit!(1)
2323
system "git clone -b built [email protected]:plotly/plotly.py-docs _posts/python/html" or exit!(1)
24-
puts "...update plot schema"
25-
system "python ./get_plotschema.py" or exit!(1)
26-
system "git add _data/plotschema.json && git commit -m \"Updated plotschema at #{Time.now.utc}\" && git push origin \"#{source_branch}\""
2724
puts "...generate _site"
2825
system "jekyll build --verbose && git checkout \"#{deploy_branch}\" && git pull origin \"#{deploy_branch}\" && cp -r _site/* . && rm -rf _site/ && touch .nojekyll && git add . && git commit -m \"#{message}\" && git push origin \"#{deploy_branch}\"" or exit!(1)
2926
puts "...git checkout \"#{source_branch}\""
3027
system "git checkout \"#{source_branch}\""
3128
system "osascript -e 'display notification \"rake deploy just finished\" with title \"Docs are ready!\"'"
3229
end
30+
31+
desc "Serve as if deploying"
32+
task :serve => [] do
33+
34+
puts "...getting latest python docs"
35+
system "rm -rf _posts/python/html" or exit!(1)
36+
system "git clone -b built [email protected]:plotly/plotly.py-docs _posts/python/html" or exit!(1)
37+
system "jekyll serve"
38+
end

_data/cache_bust_css.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
9739c634dee855183734aa6d8b6b0866 ../all_static/css/main.css
1+
95420cc50af944de1c55fe7da0c6d39a ../all_static/css/main.css
22
a5765df8bc2358dd61c19edcc0cbef7d ../all_static/css/normalize.css

_data/get_plotschema.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from urllib.request import urlopen
3+
4+
orders = json.load(open("orderings.json", "r"))
5+
6+
schema = json.load(urlopen("https://raw.githubusercontent.com/plotly/plotly.js/master/dist/plot-schema.json"))
7+
del schema["traces"]["area"]
8+
9+
def reorder_keys(parent, target, order):
10+
original = parent[target]
11+
parent[target] = {}
12+
for k in order:
13+
if k in original:
14+
parent[target][k] = original[k]
15+
for k in original.keys():
16+
if k not in parent[target]:
17+
parent[target][k] = original[k]
18+
print("missing key in %s: %s" % (target, k))
19+
20+
reorder_keys(schema, "traces", orders["traces"])
21+
reorder_keys(schema["layout"], "layoutAttributes", orders["layout"])
22+
23+
for trace in schema["traces"].values():
24+
reorder_keys(trace, "attributes", orders["trace_attr_order"])
25+
26+
json.dump(schema, open('plotschema.json', 'w'), indent=2)

0 commit comments

Comments
 (0)