-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored document_plugins to use brainscore_core (won't work until …
…core updates are PRed)
- Loading branch information
Showing
2 changed files
with
23 additions
and
196 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" Make plugin details available to readthedocs """ | ||
|
||
from pathlib import Path | ||
from brainscore_core.plugin_management.plugin_utils import get_all_plugin_info | ||
from brainscore_core.plugin_management.document_plugins import create_bibfile, update_readthedocs | ||
|
||
|
||
BIBS_DIR = Path(Path(__file__).parents[2], 'docs', 'source', 'bibtex') | ||
PLUGINS_DOC = Path(Path(__file__).parents[2], 'docs', 'source', 'modules') | ||
GITHUB_DIR = 'https://github.com/brain-score/language/tree/main/brainscore_language/' | ||
|
||
|
||
def update_docs(): | ||
all_plugin_info = get_all_plugin_info(Path(__file__).parents[1]) | ||
print(f"all_plugin_info: {all_plugin_info}") | ||
for plugin_type in all_plugin_info: | ||
create_bibfile(all_plugin_info[plugin_type], BIBS_DIR, plugin_type) # plugin type .bib file | ||
create_bibfile(all_plugin_info, BIBS_DIR) # one .bib file to rule them all | ||
update_readthedocs(all_plugin_info, PLUGINS_DOC, GITHUB_DIR) | ||
|
||
|
||
if __name__ == '__main__': | ||
update_docs() |