Skip to content

Commit

Permalink
refactored document_plugins to use brainscore_core (won't work until …
Browse files Browse the repository at this point in the history
…core updates are PRed)
  • Loading branch information
deirdre-k committed Feb 5, 2024
1 parent 1289731 commit b26ae67
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 196 deletions.
196 changes: 0 additions & 196 deletions brainscore_language/document_plugins.py

This file was deleted.

23 changes: 23 additions & 0 deletions brainscore_language/utils/document_plugins.py
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()

0 comments on commit b26ae67

Please sign in to comment.