Repository: MideTechnology/idelib (language: python)

Issue:
Feature/12 schema path
This adds the module-relative schema path to `ebmlite.SCHEMA_PATH`, ensuring the correct `mide_ide.xml` schema is loaded.

Changes were also made to pin some Sphinx-related version requirements. Updates to some packages broke doc generation in Python >3.6. It was probably `pydata-sphinx-theme`, but some other package versions were pinned, just in case.


Discussion / hints:

Fix patch:
diff --git a/docs/conf.py b/docs/conf.py
index 08fb041b..394ad608 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -20,7 +20,7 @@
 # -- Project information -----------------------------------------------------
 
 project = 'idelib'
-copyright = '2021, Mide Technology Corp.'
+copyright = '2022, Mide Technology Corp.'
 author = 'David Randall Stokes'
 
 # The short X.Y version
@@ -42,6 +42,7 @@
     'sphinx.ext.doctest',
     'sphinx.ext.ifconfig',
     'sphinx.ext.githubpages',
+    'nbsphinx',
 ]
 
 # Add any paths that contain templates here, relative to this directory.
diff --git a/idelib/__init__.py b/idelib/__init__.py
index 56b45c5d..104956d4 100644
--- a/idelib/__init__.py
+++ b/idelib/__init__.py
@@ -5,12 +5,19 @@
 """
 
 __author__ = "David Randall Stokes"
-__copyright__ = "Copyright (c) 2021 Midé Technology"
+__copyright__ = "Copyright (c) 2022 Midé Technology"
 
-__maintainer__ = "Mide Technology"
+__maintainer__ = "Midé Technology"
 __email__ = "help@mide.com"
 
 __version__ = (3, 2, 4)
 __status__ = "Production/Stable"
 
 from .importer import importFile
+
+# Add EBML schema path to ebmlite search paths
+import ebmlite
+
+SCHEMA_PATH = "{idelib}/schemata"
+if SCHEMA_PATH not in ebmlite.SCHEMA_PATH:
+    ebmlite.SCHEMA_PATH.insert(0, SCHEMA_PATH)
diff --git a/requirements.txt b/requirements.txt
index 9b526ccb..62154067 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,5 +4,5 @@ pytest>=4.6
 pytest-xdist[psutil]
 mock
 pytest-cov
-sphinx
+sphinx==4.2.0
 scipy;python_version<"3.10"
diff --git a/setup.py b/setup.py
index 81559490..57f5e2ff 100644
--- a/setup.py
+++ b/setup.py
@@ -13,13 +13,14 @@
     'pytest-xdist[psutil]',
     'mock',
     'pytest-cov',
-    'sphinx',
+    'sphinx==4.2.0',
     'scipy;python_version<"3.10"',
     ]
 
 DOCS_REQUIRES = [
-    "sphinx",
-    "pydata-sphinx-theme",
+    "sphinx==4.2.0",
+    "pydata-sphinx-theme==0.7.2",
+    "nbsphinx",
     ]
 
 EXAMPLE_REQUIRES = [
@@ -28,7 +29,7 @@
 
 setuptools.setup(
         name='idelib',
-        version='3.2.5',
+        version='3.2.6',
         author='Mide Technology',
         author_email='help@mide.com',
         description='Python API for accessing IDE data recordings',


Test patch:
diff --git a/testing/test_dataset.py b/testing/test_dataset.py
index 688c526d..0491187c 100644
--- a/testing/test_dataset.py
+++ b/testing/test_dataset.py
@@ -285,7 +285,6 @@ def testConstructor(self):
         self.assertEqual(self.dataset.plots, {})
         self.assertEqual(self.dataset.recorderConfig, None)
         self.assertEqual(self.dataset.recorderInfo, {})
-        self.assertEqual(self.dataset.schemaVersion, 2)
         self.assertEqual(self.dataset.sensors, {})
         self.assertEqual(self.dataset.sessions, [])
         self.assertEqual(self.dataset.subsets, [])