From 486d983797aa879a454eec1694e8814543c5dceb Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 19 Mar 2024 18:55:06 +0530 Subject: [PATCH 01/10] added jinja templates and code refactoring --- .../sphinx/{template => static}/Makefile | 0 .../sphinx/{template => static}/conf.py | 0 .../sphinx/{template => static}/make.bat | 0 .../template/{index.rst => index.rst_t} | 4 +- tools/batools/docs.py | 47 ++++++++++++------- 5 files changed, 34 insertions(+), 17 deletions(-) rename src/assets/sphinx/{template => static}/Makefile (100%) rename src/assets/sphinx/{template => static}/conf.py (100%) rename src/assets/sphinx/{template => static}/make.bat (100%) rename src/assets/sphinx/template/{index.rst => index.rst_t} (72%) diff --git a/src/assets/sphinx/template/Makefile b/src/assets/sphinx/static/Makefile similarity index 100% rename from src/assets/sphinx/template/Makefile rename to src/assets/sphinx/static/Makefile diff --git a/src/assets/sphinx/template/conf.py b/src/assets/sphinx/static/conf.py similarity index 100% rename from src/assets/sphinx/template/conf.py rename to src/assets/sphinx/static/conf.py diff --git a/src/assets/sphinx/template/make.bat b/src/assets/sphinx/static/make.bat similarity index 100% rename from src/assets/sphinx/template/make.bat rename to src/assets/sphinx/static/make.bat diff --git a/src/assets/sphinx/template/index.rst b/src/assets/sphinx/template/index.rst_t similarity index 72% rename from src/assets/sphinx/template/index.rst rename to src/assets/sphinx/template/index.rst_t index 327d5da9..eb99b1a1 100644 --- a/src/assets/sphinx/template/index.rst +++ b/src/assets/sphinx/template/index.rst_t @@ -4,10 +4,12 @@ contain the root `toctree` directive. see https://pradyunsg.me/furo/reference/ for formatting help -.. image:: https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67 +.. image:: {{data.ballistica_image_url}} Welcome to ballistica-bombsquad's documentation! ================================================ +*Last updated for Ballistica* **{{data.version_no}}** *(build {{data.build_no}})* + .. toctree:: :maxdepth: 2 :caption: Contents: diff --git a/tools/batools/docs.py b/tools/batools/docs.py index 36e0216f..b7a53692 100755 --- a/tools/batools/docs.py +++ b/tools/batools/docs.py @@ -231,8 +231,8 @@ def _run_sphinx( import time import shutil - from batools.version import get_current_version + from jinja2 import Environment, FileSystemLoader version, buildnum = get_current_version() @@ -242,15 +242,20 @@ def _run_sphinx( 'efro_tools': 'tools/', # for efro and bacommon package } - sphinx_src = 'src/assets/sphinx/' - template_dir = Path(sphinx_src + 'template/') - assert template_dir.is_dir() - build_dir = 'build/sphinx/' - os.makedirs(build_dir, exist_ok=True) - sphinx_apidoc_out = '.cache/sphinx/' # might want to use .cache dir - os.makedirs(sphinx_apidoc_out, exist_ok=True) + paths = {'sphinx_src' :'src/assets/sphinx/', + 'build_dir' : 'build/sphinx/', + 'sphinx_apidoc_out' : '.cache/sphinx/', + } + paths.update({'template_dir' : paths['sphinx_src'] + 'template/', + 'static_dir' : paths['sphinx_src'] + 'static/'}) + + assert Path(paths['template_dir']).is_dir() + + os.makedirs(paths['build_dir'], exist_ok=True) + os.makedirs(paths['sphinx_apidoc_out'], exist_ok=True) os.environ['BALLISTICA_ROOT'] = os.getcwd() # used in sphinx conf.py + os.environ['BA_RUNNING_WITH_DUMMY_MODULES'] = '1' os.environ['SPHINX_SETTINGS'] = str( { 'project_name': project_name, @@ -260,14 +265,24 @@ def _run_sphinx( 'buildnum': buildnum, } ) - os.environ['BA_RUNNING_WITH_DUMMY_MODULES'] = '1' + + file_loader = FileSystemLoader(paths['template_dir']) + env = Environment(loader=file_loader) + index_template = env.get_template('index.rst_t') - shutil.copytree(template_dir, sphinx_apidoc_out, dirs_exist_ok=True) + # maybe make it automatically render all files in templates dir in future + with open(paths['sphinx_apidoc_out']+'index.rst', 'w') as index_rst: + data = {'ballistica_image_url' : 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67', + 'version_no' : version, + 'build_no' : str(buildnum)} + index_rst.write(index_template.render(data=data)) + + shutil.copytree(paths['sphinx_src']+'static/', paths['sphinx_apidoc_out'], dirs_exist_ok=True) starttime = time.monotonic() apidoc_cmd = [ 'sphinx-apidoc', - '-f', # Force overwriting of any existing generated files. + # '-f', # Force overwriting of any existing generated files. '-H', project_name, '-A', @@ -278,7 +293,7 @@ def _run_sphinx( str(buildnum), # release # '--templatedir', template_dir, '-o', - sphinx_apidoc_out, + paths['sphinx_apidoc_out'], ] if generate_dummymodules_doc: subprocess.run( @@ -289,10 +304,10 @@ def _run_sphinx( subprocess.run(apidoc_cmd + [assets_dirs['efro_tools']], check=True) subprocess.run(apidoc_cmd + [assets_dirs['ba_data']], check=True) - subprocess.run(['make', 'html'], check=True, cwd=sphinx_apidoc_out) - shutil.copytree( - sphinx_apidoc_out + '_build/html/', build_dir, dirs_exist_ok=True + subprocess.run(['make', 'html'], check=True, cwd=paths['sphinx_apidoc_out']) + shutil.copytree( # copying html builds from sphinx_apidoc_out to the final build_dir + paths['sphinx_apidoc_out'] + '_build/html/', paths['build_dir'], dirs_exist_ok=True ) - # shutil.rmtree(temp_modules_dir) + duration = time.monotonic() - starttime print(f'Generated sphinx documentation in {duration:.1f}s.') From 43979e1408cfad5d38be60c24344f7549c5e2dd3 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 19 Mar 2024 19:09:33 +0530 Subject: [PATCH 02/10] switched to sphinx-build instead of make file --- config/spinoffconfig.py | 2 +- src/assets/sphinx/static/Makefile | 20 -------- src/assets/sphinx/static/make.bat | 35 ------------- src/assets/sphinx/template/index.rst_t | 4 +- tools/batools/build.py | 1 + tools/batools/docs.py | 68 +++++++++++++++++--------- tools/batools/spinoff/_context.py | 6 +-- 7 files changed, 50 insertions(+), 86 deletions(-) delete mode 100644 src/assets/sphinx/static/Makefile delete mode 100644 src/assets/sphinx/static/make.bat diff --git a/config/spinoffconfig.py b/config/spinoffconfig.py index 6844d1c5..4632332a 100644 --- a/config/spinoffconfig.py +++ b/config/spinoffconfig.py @@ -278,7 +278,7 @@ ctx.filter_file_extensions = { '.xcsettings', '.xcstrings', '.filters', - '.rst', + '.rst_t', } # ELSE files with these extensions will NOT be filtered. diff --git a/src/assets/sphinx/static/Makefile b/src/assets/sphinx/static/Makefile deleted file mode 100644 index d4bb2cbb..00000000 --- a/src/assets/sphinx/static/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/src/assets/sphinx/static/make.bat b/src/assets/sphinx/static/make.bat deleted file mode 100644 index 32bb2452..00000000 --- a/src/assets/sphinx/static/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/src/assets/sphinx/template/index.rst_t b/src/assets/sphinx/template/index.rst_t index eb99b1a1..3ebebcfa 100644 --- a/src/assets/sphinx/template/index.rst_t +++ b/src/assets/sphinx/template/index.rst_t @@ -3,7 +3,7 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. - see https://pradyunsg.me/furo/reference/ for formatting help + see https://pradyunsg.me/furo/reference/ and https://en.wikipedia.org/wiki/ReStructuredText for formatting help .. image:: {{data.ballistica_image_url}} Welcome to ballistica-bombsquad's documentation! @@ -23,4 +23,4 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` -.. note:: For customization of this page see https://github.com/efroemling/ballistica/blob/master/src/assets/sphinx/template/index.rst +.. note:: For customization of this page see https://github.com/efroemling/ballistica/blob/master/src/assets/sphinx/template/index.rst_t diff --git a/tools/batools/build.py b/tools/batools/build.py index b7c54495..f20c01c3 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -65,6 +65,7 @@ PY_REQUIREMENTS = [ PyRequirement(pipname='python-daemon', minversion=[3, 0, 1]), PyRequirement(pipname='Sphinx', minversion=[7, 2, 6]), PyRequirement(pipname='furo', minversion=[2024, 0o1, 29]), + PyRequirement(pipname='Jinja2', minversion=[3, 1, 2]), ] diff --git a/tools/batools/docs.py b/tools/batools/docs.py index b7a53692..1c6b5fa3 100755 --- a/tools/batools/docs.py +++ b/tools/batools/docs.py @@ -241,18 +241,23 @@ def _run_sphinx( 'dummy_modules': 'build/dummymodules/', 'efro_tools': 'tools/', # for efro and bacommon package } + paths: dict = { + 'sphinx_src': 'src/assets/sphinx/', + 'build_dir': 'build/sphinx/', + 'sphinx_cache_dir': '.cache/sphinx/', + } + paths.update( + { + 'template_dir': paths['sphinx_src'] + 'template/', + 'static_dir': paths['sphinx_src'] + 'static/', + } + ) - paths = {'sphinx_src' :'src/assets/sphinx/', - 'build_dir' : 'build/sphinx/', - 'sphinx_apidoc_out' : '.cache/sphinx/', - } - paths.update({'template_dir' : paths['sphinx_src'] + 'template/', - 'static_dir' : paths['sphinx_src'] + 'static/'}) - assert Path(paths['template_dir']).is_dir() - + assert Path(paths['static_dir']).is_dir() + os.makedirs(paths['build_dir'], exist_ok=True) - os.makedirs(paths['sphinx_apidoc_out'], exist_ok=True) + os.makedirs(paths['sphinx_cache_dir'], exist_ok=True) os.environ['BALLISTICA_ROOT'] = os.getcwd() # used in sphinx conf.py os.environ['BA_RUNNING_WITH_DUMMY_MODULES'] = '1' @@ -265,20 +270,22 @@ def _run_sphinx( 'buildnum': buildnum, } ) - + + file_loader = FileSystemLoader(paths['template_dir']) env = Environment(loader=file_loader) - index_template = env.get_template('index.rst_t') - + index_template = env.get_template('index.rst_t') # maybe make it automatically render all files in templates dir in future - with open(paths['sphinx_apidoc_out']+'index.rst', 'w') as index_rst: - data = {'ballistica_image_url' : 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67', - 'version_no' : version, - 'build_no' : str(buildnum)} + with open( + paths['sphinx_cache_dir'] + 'index.rst', 'w', encoding='utf-8' + ) as index_rst: + data = { + 'ballistica_image_url': 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67', # pylint: disable=line-too-long + 'version_no': version, + 'build_no': str(buildnum), + } index_rst.write(index_template.render(data=data)) - shutil.copytree(paths['sphinx_src']+'static/', paths['sphinx_apidoc_out'], dirs_exist_ok=True) - starttime = time.monotonic() apidoc_cmd = [ 'sphinx-apidoc', @@ -293,8 +300,9 @@ def _run_sphinx( str(buildnum), # release # '--templatedir', template_dir, '-o', - paths['sphinx_apidoc_out'], + paths['sphinx_cache_dir'], ] + if generate_dummymodules_doc: subprocess.run( apidoc_cmd + [assets_dirs['dummy_modules']] + ['--private'], @@ -302,12 +310,26 @@ def _run_sphinx( ) if generate_tools_doc: subprocess.run(apidoc_cmd + [assets_dirs['efro_tools']], check=True) - subprocess.run(apidoc_cmd + [assets_dirs['ba_data']], check=True) + subprocess.run(apidoc_cmd + [assets_dirs['ba_data'], '-f'], check=True) + # -f for regenerating index page so it contains the ba_data modules - subprocess.run(['make', 'html'], check=True, cwd=paths['sphinx_apidoc_out']) - shutil.copytree( # copying html builds from sphinx_apidoc_out to the final build_dir - paths['sphinx_apidoc_out'] + '_build/html/', paths['build_dir'], dirs_exist_ok=True + subprocess.run( + [ + 'sphinx-build', + '-c', # config file dir + paths['static_dir'], + paths['sphinx_cache_dir'], # input dir + paths['build_dir'], # output dir + # enable after sphinx 7.3.0 is available on PyPi(pip) + # '--doctree-dir', paths['sphinx_cache_dir'], + # '-Q', #quiet now + ], + check=True, ) + # slows down build process when rebuilding, + # remove after sphinx 7.3.0 is available on PyPi(pip) + shutil.rmtree(paths['build_dir']+'.doctrees') + duration = time.monotonic() - starttime print(f'Generated sphinx documentation in {duration:.1f}s.') diff --git a/tools/batools/spinoff/_context.py b/tools/batools/spinoff/_context.py index b0870822..d61b7486 100644 --- a/tools/batools/spinoff/_context.py +++ b/tools/batools/spinoff/_context.py @@ -1563,11 +1563,7 @@ class SpinoffContext: os.remove(delete_file_name) def _is_project_file(self, path: str) -> bool: - if ( - path.startswith('tools/') - or path.startswith('src/external') - or path.startswith('src/assets/sphinx') - ): + if path.startswith('tools/') or path.startswith('src/external'): return False bname = os.path.basename(path) return ( From cbb9ab892293a8defe36a59d621198252d0f9a7f Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 25 Mar 2024 16:35:50 +0530 Subject: [PATCH 03/10] Update projectconfig.json --- config/projectconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/projectconfig.json b/config/projectconfig.json index 68dd6d90..92d5d235 100644 --- a/config/projectconfig.json +++ b/config/projectconfig.json @@ -45,7 +45,8 @@ "pbxproj.XcodeProject", "pbxproj.pbxextensions", "openstep_parser", - "daemon" + "daemon", + "jinja2" ], "python_paths": [ "src/assets/ba_data/python", From 6c0f1bdce03b71963046bdcc036955807dc4ae35 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 02:05:50 +0530 Subject: [PATCH 04/10] readded sidebar logo --- src/assets/sphinx/static/conf.py | 5 +++-- tools/batools/docs.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index b0ff2933..b4fa32b1 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -22,11 +22,12 @@ sys.path.append(os.path.abspath(ballistica_root + assets_dirs['dummy_modules'])) sys.path.append(os.path.abspath(ballistica_root + assets_dirs['efro_tools'])) # -- Options for HTML output ------------------------------------------------- +# for more themes visit https://sphinx-themes.org/ html_theme = 'furo' # python_docs_theme, groundwork, furo, sphinx_rtd_theme html_title = sphinx_settings['project_name'] + ' ' + str(sphinx_settings['version']) + ' documentation' -# for more themes visit https://sphinx-themes.org/ -html_logo = 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67' +# do not remove, sets the logo on side panel +html_logo = sphinx_settings['ballistica_logo'] if html_theme == 'furo': html_theme_options = { diff --git a/tools/batools/docs.py b/tools/batools/docs.py index 1c6b5fa3..a592f669 100755 --- a/tools/batools/docs.py +++ b/tools/batools/docs.py @@ -268,10 +268,10 @@ def _run_sphinx( 'copyright': copyright_text, 'version': version, 'buildnum': buildnum, + 'ballistica_logo': 'https://camo.githubusercontent.com/25021344ceaa7def6fa6523f79115f7ffada8d26b4768bb9a0cf65fc33304f45/68747470733a2f2f66696c65732e62616c6c6973746963612e6e65742f62616c6c6973746963615f6d656469612f62616c6c6973746963615f6c6f676f5f68616c662e706e67', # pylint: disable=line-too-long } ) - file_loader = FileSystemLoader(paths['template_dir']) env = Environment(loader=file_loader) index_template = env.get_template('index.rst_t') @@ -316,7 +316,7 @@ def _run_sphinx( subprocess.run( [ 'sphinx-build', - '-c', # config file dir + '-c', # config file dir paths['static_dir'], paths['sphinx_cache_dir'], # input dir paths['build_dir'], # output dir @@ -329,7 +329,7 @@ def _run_sphinx( # slows down build process when rebuilding, # remove after sphinx 7.3.0 is available on PyPi(pip) - shutil.rmtree(paths['build_dir']+'.doctrees') + shutil.rmtree(paths['build_dir'] + '.doctrees') duration = time.monotonic() - starttime print(f'Generated sphinx documentation in {duration:.1f}s.') From 9d8c59312cd432fca946ef58d939a9f1841f31bd Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 05:03:26 +0530 Subject: [PATCH 05/10] Removed as not needed --- src/assets/sphinx/static/conf.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index b4fa32b1..d8a8cbce 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -59,9 +59,6 @@ if html_theme == 'furo': # -- Project information ----------------------------------------------------- - -keep_warnings = True # Supressing warnings - project = sphinx_settings['project_name'] copyright = sphinx_settings['copyright'] author = sphinx_settings['project_author'] From 3276ccade8d5a6fc66564df2bb38d4cb85578022 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 19:30:31 +0530 Subject: [PATCH 06/10] added intersphinx extension --- src/assets/sphinx/static/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index d8a8cbce..7dfdb1ad 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -71,10 +71,15 @@ release = str(sphinx_settings['buildnum']) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. + +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} autosummary_generate = True extensions = [ 'sphinx.ext.napoleon', # https://stackoverflow.com/questions/45880348/how-to-remove-the-cause-of-an-unexpected-indentation-warning-when-generating-cod 'sphinx.ext.autodoc', + # might want to use this in future + # for linking with efro and bacommon packages + 'sphinx.ext.intersphinx', ] # Add any paths that contain templates here, relative to this directory. From fee9a5e8da02e4f2dfa4e9cff67bb36b56232c79 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 19:46:38 +0530 Subject: [PATCH 07/10] added docs dir to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 273c7b58..8db0a9a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ Bin/ build/ build-server/ +docs/ autom4te.cache local.properties .DS_Store From 0301d454f86dc6d6489751db74026b1c77600f51 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 20:05:36 +0530 Subject: [PATCH 08/10] Revert "added intersphinx extension" This reverts commit 3276ccade8d5a6fc66564df2bb38d4cb85578022. --- src/assets/sphinx/static/conf.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index 7dfdb1ad..d8a8cbce 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -71,15 +71,10 @@ release = str(sphinx_settings['buildnum']) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. - -intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} autosummary_generate = True extensions = [ 'sphinx.ext.napoleon', # https://stackoverflow.com/questions/45880348/how-to-remove-the-cause-of-an-unexpected-indentation-warning-when-generating-cod 'sphinx.ext.autodoc', - # might want to use this in future - # for linking with efro and bacommon packages - 'sphinx.ext.intersphinx', ] # Add any paths that contain templates here, relative to this directory. From d75588d8ee408421d9ba6788806f593ce42ade99 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 20:06:40 +0530 Subject: [PATCH 09/10] Reapply "added intersphinx extension" This reverts commit 0301d454f86dc6d6489751db74026b1c77600f51. --- src/assets/sphinx/static/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/assets/sphinx/static/conf.py b/src/assets/sphinx/static/conf.py index d8a8cbce..7dfdb1ad 100644 --- a/src/assets/sphinx/static/conf.py +++ b/src/assets/sphinx/static/conf.py @@ -71,10 +71,15 @@ release = str(sphinx_settings['buildnum']) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. + +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} autosummary_generate = True extensions = [ 'sphinx.ext.napoleon', # https://stackoverflow.com/questions/45880348/how-to-remove-the-cause-of-an-unexpected-indentation-warning-when-generating-cod 'sphinx.ext.autodoc', + # might want to use this in future + # for linking with efro and bacommon packages + 'sphinx.ext.intersphinx', ] # Add any paths that contain templates here, relative to this directory. From 3d3f114e1ad0398d35b5f380a5e5785c68c0c5bc Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 26 Mar 2024 20:07:15 +0530 Subject: [PATCH 10/10] Revert "added docs dir to gitignore" This reverts commit fee9a5e8da02e4f2dfa4e9cff67bb36b56232c79. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8db0a9a1..273c7b58 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ Bin/ build/ build-server/ -docs/ autom4te.cache local.properties .DS_Store