forked from online-ml/river
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
143 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,19 @@ jobs: | |
script: *pypi-script | ||
if: tag IS present | ||
|
||
- stage: docs | ||
- stage: dev-docs | ||
install: | ||
- sudo apt-get install graphviz pandoc | ||
- python setup.py install | ||
- pip install -e ".[docs]" | ||
script: make doc | ||
after_success: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "MaxHalford" | ||
- mike deploy dev --push | ||
if: branch = the-merge | ||
|
||
- stage: release-docs | ||
install: | ||
- sudo apt-get install graphviz pandoc | ||
- python setup.py install | ||
|
@@ -65,14 +77,9 @@ jobs: | |
after_success: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "MaxHalford" | ||
- git config --global push.default matching | ||
- git clone https://${GH_TOKEN}@github.com/creme-ml/creme-ml.github.io.git creme-ml.github.io | ||
- cd creme-ml.github.io | ||
- rm -r * | ||
- cp -r ../site/* . | ||
- git add -A | ||
- git commit --allow-empty -m "Travis build number $TRAVIS_BUILD_NUMBER" | ||
- git push --set-upstream origin master | ||
- CREME_VERSION=$(python -c "import creme; print(creme.__version__)") | ||
- mike deploy ${CREME_VERSION} latest --push | ||
- mike set-default latest --push | ||
if: tag IS present | ||
|
||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
arrange: | ||
- index.md | ||
- user-guide | ||
- api-reference | ||
- api | ||
- examples | ||
- releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@media only screen and (max-width:76.1875em) { | ||
#version-selector { | ||
padding: .6rem .8rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
window.addEventListener("DOMContentLoaded", function() { | ||
// This is a bit hacky. Figure out the base URL from a known CSS file the | ||
// template refers to... | ||
var ex = new RegExp("/?css/version-select.css$"); | ||
var sheet = document.querySelector('link[href$="version-select.css"]'); | ||
|
||
var ABS_BASE_URL = sheet.href.replace(ex, ""); | ||
var CURRENT_VERSION = ABS_BASE_URL.split("/").pop(); | ||
|
||
function makeSelect(options, selected) { | ||
var select = document.createElement("select"); | ||
select.classList.add("form-control"); | ||
|
||
options.forEach(function(i) { | ||
var option = new Option(i.text, i.value, undefined, | ||
i.value === selected); | ||
select.add(option); | ||
}); | ||
|
||
return select; | ||
} | ||
|
||
var xhr = new XMLHttpRequest(); | ||
xhr.open("GET", ABS_BASE_URL + "/../versions.json"); | ||
xhr.onload = function() { | ||
var versions = JSON.parse(this.responseText); | ||
|
||
var realVersion = versions.find(function(i) { | ||
return i.version === CURRENT_VERSION || | ||
i.aliases.includes(CURRENT_VERSION); | ||
}).version; | ||
|
||
var select = makeSelect(versions.map(function(i) { | ||
return {text: i.title, value: i.version}; | ||
}), realVersion); | ||
select.addEventListener("change", function(event) { | ||
window.location.href = ABS_BASE_URL + "/../" + this.value; | ||
}); | ||
|
||
var container = document.createElement("div"); | ||
container.id = "version-selector"; | ||
container.className = "md-nav__item"; | ||
container.appendChild(select); | ||
|
||
var sidebar = document.querySelector(".md-nav--primary > .md-nav__list"); | ||
sidebar.parentNode.insertBefore(container, sidebar); | ||
}; | ||
xhr.send(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.