Skip to content

docs: fix documentation rendering with scikit-package standards. #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions docs/source/api/pyobjcryst.example_package.rst

This file was deleted.

203 changes: 194 additions & 9 deletions docs/source/api/pyobjcryst.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,206 @@
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
pyobjcryst.example_package

Submodules
----------

|module|
--------
pyobjcryst.atom module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.atom
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.crystal module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.crystal
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.diffractiondatasinglecrystal module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.diffractiondatasinglecrystal
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.fourier module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.fourier
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.general module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.general
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.globaloptim module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.globaloptim
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.globals module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.globals
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.indexing module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.indexing
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.io module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.io
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.lsq module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.lsq
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.molecule module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.molecule
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.polyhedron module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.polyhedron
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.powderpattern module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.powderpattern
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.pyobjcryst_app module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.pyobjcryst_app
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.radiation module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.radiation
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.refineableobj module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.refineableobj
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.scatterer module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.scatterer
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.scatteringdata module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.scatteringdata
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.scatteringpower module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.scatteringpower
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.scatteringpowersphere module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.scatteringpowersphere
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.spacegroup module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.spacegroup
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.unitcell module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.unitcell
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.utils module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.utils
:members:
:undoc-members:
:show-inheritance:

pyobjcryst.version module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.version
:members:
:undoc-members:
:show-inheritance:

.. |module| replace:: pyobjcryst.example_submodule module
pyobjcryst.zscatterer module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: pyobjcryst.example_submodule
.. automodule:: pyobjcryst.zscatterer
:members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"nbsphinx",
"nbsphinx_link",
"m2r",
]

Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/Quantitative-phase-analysis.nblink
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../../examples/QPA-Quantitative phase analysis.ipynb"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples with .ipynb files are moved from the top-level directory into the docs directory, as other diffpy packages do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be in the top level tbh. These are examples for users, not source for docs so it doesn't make so much sense to me to put them into docs/source. It kind of depends whether the examples are just going to appear in the rst or whether we expect users to be able to import and run them. They won't get bundled in the release, but at least they are more accessible (in docs/examples in the repo)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, scratch my comment. As long as it is docs/examples I am happy...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, actualy, thinking again, this change we may want to run by @vincefn to see his preference. I could also see examples at the top level making them more discoverable. I think if it were my choice I would do docs/examples but let's give @vincefn a chance to puah back before we merge this.

"path": "../../examples/QPA-Quantitative phase analysis.ipynb"
}
2 changes: 1 addition & 1 deletion docs/source/examples/crystal_3d_widget.nblink
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../../examples/crystal_3d_widget.ipynb"
"path": "../../examples/crystal_3d_widget.ipynb"
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../../examples/structure-solution-multiprocessing.ipynb"
"path": "../../examples/structure-solution-multiprocessing.ipynb"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../../examples/structure-solution-powder-cimetidine.ipynb"
"path": "../../examples/structure-solution-powder-cimetidine.ipynb"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"path": "../../../../examples/structure-solution-powder-pbso4.ipynb"
"path": "../../examples/structure-solution-powder-pbso4.ipynb"
}
8 changes: 4 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ was developed by V. Favre-Nicolin as part of the development of the
Further developments including the ability to index and refine
powder patterns, solve and display crystal structures, using the
global optimisation and least squares algorithms (see the
:doc:`examples/index`) are provided by Vincent Favre-Nicolin (ESRF).
:doc:`examples/examples`) are provided by Vincent Favre-Nicolin (ESRF).
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples/index.rst is renamed to examples/examples.rst.


For a complete list of contributors, see
https://github.com/diffpy/pyobjcryst/graphs/contributors and
Expand Down Expand Up @@ -63,15 +63,15 @@ Usage & notebooks
* etc..

The functionality is similar to what is available in `Fox <http://fox.vincefn.net>`_.
See the :doc:`examples/index`:
See the :doc:`examples/examples`:

* :doc:`3D Crystal structure display <examples/crystal_3d_widget>`
* :doc:`Solving the cimetidine structure from its powder pattern <examples/structure-solution-powder-cimetidine>`
* :doc:`Solving the PbSO4 structure from its X and N powder patterns <examples/structure-solution-powder-pbso4>`
* :doc:`Meta-structure solution using multi-processing <examples/structure-solution-multiprocessing>`
* :doc:`Quantitative phase analysis (QPA) <examples/Quantitative-phase-analysis>`

The **API documentation** can be found in :doc:`api/modules`.
The **API documentation** can be found in :doc:`api/pyobjcryst`.

You can also read the
`documentation of the underlying ObjCryst++ library <https://vincefn.net/ObjCryst/annotated.html>`_.
Expand All @@ -89,11 +89,11 @@ Table of contents
:maxdepth: 2

getting-started
Examples <examples/examples>
Package API <api/pyobjcryst>
release
license

=======
Indices
=======

Expand Down
2 changes: 2 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sphinx
sphinx_rtd_theme
sphinx-copybutton
nbsphinx
nbsphinx-link
doctr
m2r
Loading