-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2974 from Unidata/dependabot-pip-ci-pydata-sphinx…
…-theme-0.13.3 CI: (deps): Bump pydata-sphinx-theme from 0.8.1 to 0.13.3 in /ci
- Loading branch information
Showing
12 changed files
with
211 additions
and
239 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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
sphinx==4.5.0 | ||
pydata-sphinx-theme==0.8.1 | ||
sphinx==6.2.1 | ||
pydata-sphinx-theme==0.13.3 | ||
sphinx-design==0.4.1 | ||
sphinx-gallery==0.13.0 | ||
myst-parser==0.18.1 | ||
myst-parser==1.0.0 | ||
netCDF4==1.6.3 | ||
geopandas==0.13.0 | ||
rtree==1.0.1 |
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,43 +1,75 @@ | ||
const project = "MetPy"; | ||
|
||
$(document).ready(function() { | ||
cur_ver = DOCUMENTATION_OPTIONS.VERSION; | ||
end = cur_ver.lastIndexOf('.'); | ||
if (end > -1) { | ||
cur_ver = 'v' + cur_ver.substring(0, end); | ||
} | ||
console.log('cur_ver: ' + cur_ver); | ||
|
||
$.getJSON('/' + project + '/versions.json', function(data) { | ||
if (cur_ver !== data.latest) { | ||
let msg; | ||
if (cur_ver.includes('dev') || data.prereleases.indexOf(cur_ver) > -1) { | ||
msg = 'development / pre-release'; | ||
} else { | ||
msg = 'previous'; | ||
} | ||
content = $('<div class="alert alert-secondary alert-version" role="alert">This documentation page is for a ' + msg + | ||
' version. For the latest release version, go to <a class="alert-link" href="https://unidata.github.io/MetPy/latest/">https://unidata.github.io/MetPy/latest/</a>'); | ||
$('#banner').append(content); | ||
function documentReady(callback) { | ||
if (document.readyState != "loading") callback(); | ||
else document.addEventListener("DOMContentLoaded", callback); | ||
} | ||
|
||
documentReady(function () { | ||
// Use PST version metadata to match current doc version | ||
const cur_ver = DOCUMENTATION_OPTIONS.theme_switcher_version_match; | ||
console.log("cur_ver: " + cur_ver); | ||
|
||
fetch("/" + project + "/pst-versions.json") | ||
.then(function (response) { | ||
return response.json(); | ||
}) | ||
.then(function (data) { | ||
// Find matching version entry in PST version list | ||
const entry = data[data.findIndex((obj) => obj.version == cur_ver)]; | ||
|
||
// Find out if matched version is latest | ||
// and construct alert message | ||
if (entry.is_latest != true) { | ||
let rel_type; | ||
if (cur_ver.includes("dev") || entry.is_prerelease == true) { | ||
rel_type = "development/pre-release"; | ||
} else { | ||
rel_type = "previous"; | ||
} | ||
|
||
$.each(data.versions, function() { | ||
if (this !== 'latest') { | ||
const url = DOCUMENTATION_OPTIONS.URL_ROOT + '../' + this; | ||
const name = this.startsWith('v') ? this.substring(1) : this; | ||
$('#version-menu').append('<a class="dropdown-item" href="' + url + '">' + name + '</a>'); | ||
} | ||
}); | ||
let msg = | ||
`This documentation page is for a ${rel_type} version. For the latest release version, go to <a class="alert-link" href="https://unidata.github.io/MetPy/latest/">https://unidata.github.io/MetPy/latest/</a>`; | ||
|
||
// Create alert div and fill with message content | ||
let content = document.createElement("div"); | ||
content.classList.add("alert", "alert-secondary", "alert-version"); | ||
content.setAttribute("role", "alert"); | ||
content.innerHTML = msg; | ||
|
||
// Append alert div to banner div under navbar | ||
document.querySelector("#banner").appendChild(content); | ||
} else { | ||
console.log("MetPy version latest."); | ||
} | ||
}) | ||
.catch(function (err) { | ||
console.warn("Something went wrong.", err); | ||
}); | ||
}); | ||
|
||
// Borrowed from Bokeh docs to look for a banner.html at the base of the docs repo and add that | ||
// to the banner if present. | ||
$(document).ready(function () { | ||
$.get('/' + project + '/banner.html', function (data) { | ||
if (data.length > 0) { | ||
console.log(data); | ||
$('#banner').prepend(data); | ||
documentReady(function () { | ||
fetch("/" + project + "/banner.html") | ||
.then(function (response) { | ||
return response.text(); | ||
}) | ||
.then(function (html) { | ||
// If any banner.html exists, parse it and add to banner div | ||
if (html.length > 0) { | ||
let parser = new DOMParser(); | ||
let doc = parser.parseFromString(html.trim(), "text/html"); | ||
|
||
// Get all div elements from banner.html | ||
// and prepend them to banner div under navbar | ||
let divs = doc.getElementsByTagName("div"); | ||
for (let div of divs) { | ||
document.querySelector("#banner").prepend(div); | ||
} | ||
} else { | ||
console.log("Banner empty."); | ||
} | ||
}) | ||
}) | ||
.catch(function (err) { | ||
return console.warn("Something went wrong.", err); | ||
}); | ||
}); |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.