From eff81dd474546c3cebe804a1b8ce38c2e01c553b Mon Sep 17 00:00:00 2001 From: JSCU-CNI <121175071+JSCU-CNI@users.noreply.github.com> Date: Mon, 17 Feb 2025 11:20:03 +0100 Subject: [PATCH] fix docs --- .gitignore | 4 ++-- dissect/eventlog/utils.py | 2 ++ tests/{data => _data}/TestLog-dirty.evt | Bin tests/{data => _data}/TestLog.evt | Bin tests/{data => _data}/TestLogX.evtx | Bin tests/{docs => _docs}/Makefile | 2 +- tests/{docs => _docs}/conf.py | 5 +++++ tests/{docs => _docs}/index.rst | 0 tox.ini | 8 ++++---- 9 files changed, 14 insertions(+), 7 deletions(-) rename tests/{data => _data}/TestLog-dirty.evt (100%) rename tests/{data => _data}/TestLog.evt (100%) rename tests/{data => _data}/TestLogX.evtx (100%) rename tests/{docs => _docs}/Makefile (91%) rename tests/{docs => _docs}/conf.py (85%) rename tests/{docs => _docs}/index.rst (100%) diff --git a/.gitignore b/.gitignore index 74cecaf..2e944b3 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,6 @@ dist/ *.pyc __pycache__/ .pytest_cache/ -tests/docs/api -tests/docs/build +tests/_docs/api +tests/_docs/build .tox/ diff --git a/dissect/eventlog/utils.py b/dissect/eventlog/utils.py index 07076f1..687f6ed 100644 --- a/dissect/eventlog/utils.py +++ b/dissect/eventlog/utils.py @@ -1,4 +1,6 @@ class KeyValueCollection(dict): + """Eventlog key-value pair collection.""" + def __init__(self): super().__init__() self.idx = {} diff --git a/tests/data/TestLog-dirty.evt b/tests/_data/TestLog-dirty.evt similarity index 100% rename from tests/data/TestLog-dirty.evt rename to tests/_data/TestLog-dirty.evt diff --git a/tests/data/TestLog.evt b/tests/_data/TestLog.evt similarity index 100% rename from tests/data/TestLog.evt rename to tests/_data/TestLog.evt diff --git a/tests/data/TestLogX.evtx b/tests/_data/TestLogX.evtx similarity index 100% rename from tests/data/TestLogX.evtx rename to tests/_data/TestLogX.evtx diff --git a/tests/docs/Makefile b/tests/_docs/Makefile similarity index 91% rename from tests/docs/Makefile rename to tests/_docs/Makefile index 69e0098..e693b42 100644 --- a/tests/docs/Makefile +++ b/tests/_docs/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= -jauto +SPHINXOPTS ?= -jauto -w $(BUILDDIR)/warnings.log --fail-on-warning SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = build diff --git a/tests/docs/conf.py b/tests/_docs/conf.py similarity index 85% rename from tests/docs/conf.py rename to tests/_docs/conf.py index 7ef62d3..a44587a 100644 --- a/tests/docs/conf.py +++ b/tests/_docs/conf.py @@ -32,3 +32,8 @@ autodoc_member_order = "groupwise" autosectionlabel_prefix_document = True + +suppress_warnings = [ + # https://github.com/readthedocs/sphinx-autoapi/issues/285 + "autoapi.python_import_resolution", +] diff --git a/tests/docs/index.rst b/tests/_docs/index.rst similarity index 100% rename from tests/docs/index.rst rename to tests/_docs/index.rst diff --git a/tox.ini b/tox.ini index bfcf133..60aaa7d 100644 --- a/tox.ini +++ b/tox.ini @@ -68,12 +68,12 @@ deps = sphinx-design furo commands = - make -C tests/docs clean - make -C tests/docs html + make -C tests/_docs clean + make -C tests/_docs html [testenv:docs-linkcheck] allowlist_externals = make deps = {[testenv:docs-build]deps} commands = - make -C tests/docs clean - make -C tests/docs linkcheck + make -C tests/_docs clean + make -C tests/_docs linkcheck