Skip to content

Commit 0281870

Browse files
authored
Merge pull request #1076 from ocefpaf/fix_docs
Fix docs
2 parents ed07e5c + abc3487 commit 0281870

File tree

8 files changed

+55
-38
lines changed

8 files changed

+55
-38
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ examples/results/*
1414
/_mac/*.xml
1515
/inspection/*.xml
1616
geckodriver.log
17+
geckodriver.tar.gz
18+
geckodriver/
19+
miniconda.sh

.travis.yml

+42-29
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,63 @@ env:
1515
matrix:
1616
fast_finish: true
1717
include:
18-
- name: default-python2
19-
env: TEST_TARGET=default PY=2.7
18+
- name: legacy-python
19+
env: PY=2.7
2020
- name: default
21-
env: TEST_TARGET=default PY=3.7
21+
env: PY=3.7
2222
- name: notebooks-conding-standard
2323
env: PY=3.7
2424
- name: notebooks-code
2525
env: PY=3.7
26-
- name: latest_branca
26+
- name: latest-branca
2727
env: PY=3.7
2828
- name: docs
2929
env: PY=3.7
3030
allow_failures:
31-
- name: latest_branca
31+
- name: latest-branca
3232
env: PY=3.7
3333

3434
before_install:
35-
- wget http://bit.ly/miniconda -O miniconda.sh
36-
- bash miniconda.sh -b -p $HOME/miniconda
37-
- export PATH="$HOME/miniconda/bin:$PATH"
38-
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
39-
- conda update conda
40-
- conda config --remove channels defaults --force
41-
- conda config --add channels conda-forge --force
42-
- conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
43-
- source activate TEST
44-
# firefox headless driver
45-
- wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz -O geckodriver.tar.gz
46-
- mkdir geckodriver
47-
- tar -xzf geckodriver.tar.gz -C geckodriver
48-
- export PATH=$PATH:$PWD/geckodriver
49-
50-
- if [[ "$PY" == "2.7" ]]; then
51-
conda install mock ;
52-
fi
35+
# Install miniconda and create TEST env.
36+
- |
37+
wget http://bit.ly/miniconda -O miniconda.sh
38+
bash miniconda.sh -b -p $HOME/miniconda
39+
export PATH="$HOME/miniconda/bin:$PATH"
40+
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
41+
conda update conda --quiet
42+
conda config --add channels conda-forge --force
43+
conda install pycryptosat
44+
conda config --set safety_checks disabled
45+
conda config --set channel_priority strict
46+
conda create --name TEST python=$PY --file requirements.txt --file requirements-dev.txt
47+
source activate TEST
48+
# Install firefox headless driver.
49+
- |
50+
wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz -O geckodriver.tar.gz
51+
mkdir geckodriver
52+
tar -xzf geckodriver.tar.gz -C geckodriver
53+
export PATH=$PATH:$PWD/geckodriver
54+
5355
5456
# Test source distribution.
5557
install:
56-
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install folium-${version}.tar.gz && popd
58+
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install --no-deps --force-reinstall folium-${version}.tar.gz && popd
5759

5860
script:
5961
- if [[ $TRAVIS_JOB_NAME != 'docs' ]]; then
6062
cp -r tests/ examples/ /tmp ;
6163
fi
6264

63-
- if [[ $TEST_TARGET == 'default' ]]; then
65+
- if [[ $TRAVIS_JOB_NAME == 'default' ]]; then
66+
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
67+
fi
68+
69+
- if [[ $TRAVIS_JOB_NAME == 'legacy-python' ]]; then
70+
conda install mock ;
6471
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
6572
fi
6673

67-
- if [[ $TRAVIS_JOB_NAME == 'latest_branca' ]]; then
74+
- if [[ $TRAVIS_JOB_NAME == 'latest-branca' ]]; then
6875
conda uninstall branca ;
6976
pip install git+https://github.com/python-visualization/branca.git ;
7077
pytest /tmp -vv --ignore=tests/notebooks/test_notebooks.py ;
@@ -80,15 +87,21 @@ script:
8087
pytest --nbval-lax -p no:python /tmp/examples ;
8188
fi
8289

83-
- if [[ $TEST_TARGET == 'docs' ]]; then
90+
# Docs
91+
- if [[ -z "$TRAVIS_TAG" ]]; then
92+
DEPLOY_DIR=dev ;
93+
else
94+
DEPLOY_DIR="version-$TRAVIS_TAG" ;
95+
fi
96+
97+
- if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
8498
set -e ;
8599
conda install doctr ;
86100
cp examples/Quickstart.ipynb docs/quickstart.ipynb ;
87101
pushd docs ;
88102
make clean html linkcheck ;
89103
popd ;
90-
python -m doctr deploy --sync .;
91-
python -m doctr deploy --sync --no-require-master --built-docs docs/_build/html "docs-$TRAVIS_BRANCH" ;
104+
python -m doctr deploy --build-tags --key-path github_deploy_key.enc --built-docs docs/_build/html/ $DEPLOY_DIR ;
92105
fi
93106

94107
doctr:

README.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ or
4444
Documentation
4545
-------------
4646

47-
https://python-visualization.github.io/folium/docs-v0.6.0/
47+
https://python-visualization.github.io/folium/
4848

49-
The documentation for the development version can be found here:
50-
https://python-visualization.github.io/folium/docs-master/
5149

5250
Gallery
5351
-------

examples/Quickstart.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
"cell_type": "markdown",
446446
"metadata": {},
447447
"source": [
448-
"For more information about popups, please visit [Popups.ipynb](http://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/Popups.ipynb)"
448+
"For more information about popups, please visit [Popups.ipynb](https://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/Popups.ipynb)"
449449
]
450450
},
451451
{

folium/features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ class GeoJsonTooltip(Tooltip):
700700
This will use JavaScript's .toLocaleString() to format 'clean' values
701701
as strings for the user's location; i.e. 1,000,000.00 comma separators,
702702
float truncation, etc.
703-
*Available for most of JavaScript's primitive types (any data you'll
703+
\*Available for most of JavaScript's primitive types (any data you'll
704704
serve into the template).
705705
style: str, default None.
706706
HTML inline style properties like font and colors. Will be applied to

folium/plugins/antpath.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AntPath(Marker):
2424
Latitude and Longitude of line (Northing, Easting)
2525
popup: str or folium.Popup, default None
2626
Input text or visualization for object displayed when clicking.
27-
tooltip: str or folium.Tooltip, optional
27+
tooltip: str or folium.Tooltip, optional
2828
Display a text when hovering over the object.
2929
**kwargs:
3030
Polyline and AntPath options. See their Github page for the

folium/plugins/beautify_icon.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ class BeautifyIcon(MacroElement):
4040
--------
4141
Plugin Website: https://github.com/marslan390/BeautifyMarker
4242
>>> BeautifyIcon(text_color='#000', border_color='transparent',
43-
background_color='#FFF').add_to(marker)
43+
... background_color='#FFF').add_to(marker)
4444
>>> number_icon = BeautifyIcon(text_color='#000', border_color='transparent',
45-
background_color='#FFF', number=10,
46-
inner_icon_style='font-size:12px;padding-top:-5px;')
45+
... background_color='#FFF', number=10,
46+
... inner_icon_style='font-size:12px;padding-top:-5px;')
4747
>>> Marker(location=[45.5, -122.3], popup=folium.Popup('Portland, OR'), icon=number_icon)
4848
>>> BeautifyIcon(icon='arrow-down', icon_shape='marker').add_to(marker)
49+
4950
"""
5051
ICON_SHAPE_TYPES = ['circle', 'circle-dot', 'doughnut', 'rectangle-dot',
5152
'marker', None]

folium/plugins/timestamped_geo_json.py

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class TimestampedGeoJson(MacroElement):
1818
into a map with Map.add_child.
1919
2020
A geo-json is timestamped if:
21+
2122
* it contains only features of types LineString, MultiPoint, MultiLineString,
2223
Polygon and MultiPolygon.
2324
* each feature has a 'times' property with the same length as the
@@ -32,6 +33,7 @@ class TimestampedGeoJson(MacroElement):
3233
----------
3334
data: file, dict or str.
3435
The timestamped geo-json data you want to plot.
36+
3537
* If file, then data will be read in the file and fully embedded in
3638
Leaflet's javascript.
3739
* If dict, then data will be converted to json and embedded in the

0 commit comments

Comments
 (0)