diff --git a/doc/source/api/diffpy.utils.parsers.rst b/doc/source/api/diffpy.utils.parsers.rst index 0709cf3a..29ec4782 100644 --- a/doc/source/api/diffpy.utils.parsers.rst +++ b/doc/source/api/diffpy.utils.parsers.rst @@ -11,14 +11,6 @@ diffpy.utils.parsers package Submodules ---------- -diffpy.utils.parsers.resample module -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. automodule:: diffpy.utils.parsers.resample - :members: - :undoc-members: - :show-inheritance: - diffpy.utils.parsers.loaddata module ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/source/api/diffpy.utils.rst b/doc/source/api/diffpy.utils.rst index cf69f596..b873c333 100644 --- a/doc/source/api/diffpy.utils.rst +++ b/doc/source/api/diffpy.utils.rst @@ -28,3 +28,11 @@ diffpy.utils.tools module :members: :undoc-members: :show-inheritance: + +diffpy.utils.resampler module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.utils.resampler + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/diffpy.utils.scattering_objects.rst b/doc/source/api/diffpy.utils.scattering_objects.rst index fe511bf5..04181f88 100644 --- a/doc/source/api/diffpy.utils.scattering_objects.rst +++ b/doc/source/api/diffpy.utils.scattering_objects.rst @@ -1,6 +1,6 @@ :tocdepth: -1 -diffpy.utils.scattering_objects package +diffpy.utils.scattering-objects package ======================================= .. automodule:: diffpy.utils.scattering_objects diff --git a/doc/source/conf.py b/doc/source/conf.py index 721f940e..bf1affcf 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,6 +18,10 @@ from importlib.metadata import version from pathlib import Path +autodoc_mock_imports = [ + "diffpy.utils.wx", +] + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use Path().resolve() to make it absolute, like shown here. diff --git a/doc/source/examples/examples.rst b/doc/source/examples/examples.rst index fefe843a..011a25fd 100644 --- a/doc/source/examples/examples.rst +++ b/doc/source/examples/examples.rst @@ -8,5 +8,5 @@ Landing page for diffpy.utils examples. .. toctree:: parsersexample - resampleexample + resamplerexample toolsexample diff --git a/doc/source/examples/parsersexample.rst b/doc/source/examples/parsersexample.rst index 90605741..1b54fc3a 100644 --- a/doc/source/examples/parsersexample.rst +++ b/doc/source/examples/parsersexample.rst @@ -14,7 +14,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit 2) To get the data table, we will use the ``loadData`` function. The default behavior of this function is to find and extract a data table from a file.:: - from diffpy.utils.parsers import loadData + from diffpy.utils.parsers.loaddata import loadData data_table = loadData('') While this will work with most datasets, on our ``data.txt`` file, we got a ``ValueError``. The reason for this is @@ -53,7 +53,7 @@ Using the parsers module, we can load file data into simple and easy-to-work-wit 4) Rather than working with separate ``data_table`` and ``hdata`` objects, it may be easier to combine them into a single dictionary. We can do so using the ``serialize_data`` function. :: - from diffpy.utils.parsers import serialize_data + from diffpy.utils.parsers.serialization import serialize_data file_data = serialize_data('') 6) Finally, ``serialize_data`` allows us to store data from multiple text file in a single serial file. For one last bit diff --git a/doc/source/examples/resampleexample.rst b/doc/source/examples/resampleexample.rst index efa3c474..f7ba5e18 100644 --- a/doc/source/examples/resampleexample.rst +++ b/doc/source/examples/resampleexample.rst @@ -15,14 +15,14 @@ given enough datapoints. `_. :: - from diffpy.utils.parsers import loadData + from diffpy.utils.parsers.loaddata import loadData nickel_datatable = loadData('') nitarget_datatable = loadData('') Each data table has two columns: first is the grid and second is the function value. To extract the columns, we can utilize the serialize function ... :: - from diffpy.utils.parsers import serialize_data + from diffpy.utils.parsers.serialization import serialize_data nickel_data = serialize_data('Nickel.gr', {}, nickel_datatable, dt_colnames=['grid', 'func']) nickel_grid = nickel_data['Nickel.gr']['grid'] nickel_func = nickel_data['Nickel.gr']['func'] @@ -54,7 +54,7 @@ given enough datapoints. ... and use the diffpy.utils ``wsinterp`` function to resample on this grid.:: - from diffpy.utils.parsers import wsinterp + from diffpy.utils.resampler import wsinterp nickel_resample = wsinterp(grid, nickel_grid, nickel_func) target_resample = wsinterp(grid, target_grid, target_func) diff --git a/news/doc-update.rst b/news/doc-update.rst new file mode 100644 index 00000000..ffe371a6 --- /dev/null +++ b/news/doc-update.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Updated documentation for resampler relocation and removed relative path imports + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*