forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into stats
- Loading branch information
Showing
129 changed files
with
2,634 additions
and
1,608 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
|
@@ -41,4 +41,6 @@ | |
</div> | ||
{% endfor %} | ||
</div> | ||
<!-- contributors --> | ||
{% include 'avatars.html' %} | ||
</div> |
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,7 @@ | ||
<html> | ||
<head> | ||
<script src="../_static/js/contrib-avatars.js"></script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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,34 @@ | ||
from pathlib import Path | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
from selenium.webdriver.support.ui import WebDriverWait | ||
from selenium.common.exceptions import WebDriverException | ||
|
||
|
||
def generate_contrib_avatars(app, config): | ||
"""Render a template webpage with avatars generated by JS and a GitHub API call.""" | ||
root = Path(app.srcdir) | ||
infile = root / "sphinxext" / "_avatar_template.html" | ||
outfile = root / "_templates" / "avatars.html" | ||
try: | ||
options = webdriver.ChromeOptions() | ||
options.add_argument("--headless=new") | ||
driver = webdriver.Chrome(options=options) | ||
except WebDriverException: | ||
options = webdriver.FirefoxOptions() | ||
options.add_argument("--headless=new") | ||
driver = webdriver.Firefox(options=options) | ||
driver.get(f"file://{infile}") | ||
wait = WebDriverWait(driver, 20) | ||
wait.until(lambda d: d.find_element(by=By.ID, value="contributor-avatars")) | ||
body = driver.find_element(by=By.TAG_NAME, value="body").get_attribute("innerHTML") | ||
with open(outfile, "w") as fid: | ||
fid.write(body) | ||
driver.quit() | ||
|
||
|
||
def setup(app): | ||
"""Set up the Sphinx app.""" | ||
app.connect("config-inited", generate_contrib_avatars) | ||
return |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.