diff --git a/docs/source/conf.py b/docs/source/conf.py index 782273a9..28ab1406 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -285,6 +285,18 @@ def run(self, source_dir=None): nb_cache_dir = Path("../build/doctrees/nbsphinx") # relative to build for notebook in nb_paths: nb_cache = nb_cache_dir / self.base_doc_dir / index_path / notebook.name + + print() + print(notebook) + print("cache at", nb_cache, nb_cache.is_file()) + print( + "diff", + diff_notebooks( + read_notebook(notebook, on_null="empty"), + read_notebook(nb_cache, on_null="empty"), + ), + ) + if ( nb_cache.is_file() and "'key': 'source'" @@ -293,11 +305,13 @@ def run(self, source_dir=None): read_notebook(nb_cache, on_null="empty"), ).__repr__() ): + print("COPYING CACHE") shutil.copy( nb_cache, self.base_doc_dir / index_path / notebook.name, ) else: + print("COPYING NOTEBOOK") shutil.copy(notebook, self.base_doc_dir / index_path / notebook.name) # Recursively go through all directories in source, documenting what is available. @@ -312,4 +326,3 @@ def run(self, source_dir=None): sys.path.append(os.path.abspath("../..")) PackageCrawler(Path("../../src/bsk_rl/"), Path("./api_reference/")).run() PackageCrawler(Path("../../examples"), Path("./examples/"), filter_all=False).run() -import nbdime