Skip to content

Commit d215a47

Browse files
authored
Merge pull request #23 from cadenmyers13/lightweight-docs
docs: Migrate over a lightweight version of documentation
2 parents 4bb73fd + 5e3c4da commit d215a47

14 files changed

+105
-153
lines changed

doc/source/_static/.placeholder

Whitespace-only changes.

doc/source/_static/wrap_table.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* Force all Sphinx docutils tables to wrap text in cells (RTD theme & general) */
2+
.rst-content table.docutils td,
3+
.rst-content table.docutils th,
4+
.wy-table-responsive table td,
5+
.wy-table-responsive table th {
6+
white-space: normal !important;
7+
word-break: normal !important;
8+
}

doc/source/api/diffpy.cmi.example_package.rst

Lines changed: 0 additions & 31 deletions
This file was deleted.

doc/source/api/diffpy.cmi.rst

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,16 @@
33
|title|
44
=======
55

6-
.. |title| replace:: diffpy.cmi package
6+
.. |title| replace:: diffpy.cmi Contents
77

8-
.. automodule:: diffpy.cmi
9-
:members:
10-
:undoc-members:
11-
:show-inheritance:
8+
``diffpy.cmi`` includes Python and C++ libraries developed by the DiffPy team as well as external libraries necessary for functionality.
129

13-
Subpackages
14-
-----------
10+
Libraries developed by the DiffPy team
11+
--------------------------------------
1512

16-
.. toctree::
17-
diffpy.cmi.example_package
13+
.. include:: ../snippets/diffpy_libraries.rst
1814

19-
Submodules
20-
----------
15+
External Libraries
16+
------------------
2117

22-
|module|
23-
--------
24-
25-
.. |module| replace:: diffpy.cmi.example_submodule module
26-
27-
.. automodule:: diffpy.cmi.example_submodule
28-
:members:
29-
:undoc-members:
30-
:show-inheritance:
18+
.. include:: ../snippets/external_libraries.rst

doc/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@
172172
# Add any paths that contain custom static files (such as style sheets) here,
173173
# relative to this directory. They are copied after the builtin static files,
174174
# so a file named "default.css" will overwrite the builtin "default.css".
175-
# html_static_path = ['_static']
175+
html_static_path = ["_static"]
176+
html_css_files = ["wrap_table.css"]
176177

177178
# Add any extra paths that contain custom files (such as robots.txt or
178179
# .htaccess) here, relative to this directory. These files are copied

doc/source/getting-started.rst

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -8,72 +8,4 @@
88
Getting started
99
================
1010

11-
Here are some example templates provided to help you get started with writing your documentation. You can use these templates to create your own documentation.
12-
13-
Reuse ``.rst`` files across multiple pages
14-
------------------------------------------
15-
16-
Here is how you can reuse a reusable block of ``.rst`` files across multiple pages:
17-
18-
.. include:: snippets/example-table.rst
19-
20-
.. warning::
21-
22-
Ensure that the ``.rst`` file you are including is not too long. If it is too long, it may be better to split it into multiple files and include them separately.
23-
24-
Refer to a specific section in the documentation
25-
------------------------------------------------
26-
27-
You can use the ``ref`` tag to refer to a specific section in the documentation. For example, you can refer to the section below using the ``:ref:`` tag as shown :ref:`here <attach-image>`.
28-
29-
.. note::
30-
31-
Please check the raw ``.rst`` file of this page to see the exact use of the ``:ref:`` tag.
32-
33-
Embed your code snippets in the documentation
34-
---------------------------------------------
35-
36-
Here is how you can write a block of code in the documentation. You can use the ``code-block`` directive to write a block of code in the documentation. For example, you can write a block of code as shown below:
37-
38-
.. code-block:: bash
39-
40-
# Create a new environment, without build dependencies (pure Python package)
41-
conda create -n <package_name>-env python=3.13 \
42-
--file requirements/tests.txt \
43-
--file requirements/conda.txt
44-
45-
# Create a new environment, with build dependencies (non-pure Python package)
46-
conda create -n <package_name>-env python=3.13 \
47-
--file requirements/tests.txt \
48-
--file requirements/conda.txt \
49-
--file requirements/build.txt
50-
51-
# Activate the environment
52-
conda activate <package_name>_env
53-
54-
# Install your package locally
55-
# `--no-deps` to NOT install packages again from `requirements.pip.txt`
56-
pip install -e . --no-deps
57-
58-
# Run pytest locally
59-
pytest
60-
61-
# ... run example tutorials
62-
63-
.. _attach-image:
64-
65-
Attach an image to the documentation
66-
------------------------------------
67-
68-
Here is how you attach an image to the documentation. The ``/doc/source/img/scikit-package-logo-text.png`` example image is provided in the template.
69-
70-
.. image:: ./img/scikit-package-logo-text.png
71-
:alt: codecov-in-pr-comment
72-
:width: 400px
73-
:align: center
74-
75-
76-
Other useful directives
77-
-----------------------
78-
79-
Here is how you can do menu selection :menuselection:`Admin --> Settings` and display labels for buttons like :guilabel:`Privacy level`.
11+
Coming soon...
235 KB
Loading
-183 KB
Binary file not shown.

doc/source/index.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,24 @@
33
#######
44

55
.. |title| replace:: diffpy.cmi documentation
6+
| Software version |release|
7+
| Last updated |today|.
68
79
``diffpy.cmi`` - Complex modeling infrastructure: a modular framework for multi-modal modeling of scientific data.
810

9-
| Software version |release|
10-
| Last updated |today|.
11+
DiffPy.CMI is our complex modeling framework. It is a highly flexible library of Python modules for robust modeling of nanostructures in crystals, nanomaterials, and amorphous materials.
12+
13+
The software provides functionality for storage and manipulation of structure data and calculation of structure-based quantities, such as PDF, SAS, bond valence sums, atom overlaps, bond lengths, and coordinations. Most importantly the diffpy.cmi package contains a fitting framework for combining multiple experimental inputs in a single optimization problem.
14+
15+
.. image:: ./img/diffpycmi_screenshot.png
16+
:alt: codecov-in-pr-comment
17+
:width: 400px
18+
:align: center
1119

1220
===============
1321
Getting started
1422
===============
1523

16-
Welcome to the ``diffpy.cmi`` documentation!
17-
1824
To get started, please visit the :ref:`Getting started <getting-started>` page.
1925

2026
=======
@@ -44,6 +50,7 @@ Table of contents
4450
:maxdepth: 2
4551

4652
getting-started
53+
Tutorials <tutorials/index>
4754
Package API <api/diffpy.cmi>
4855
release
4956
license
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. list-table::
2+
:widths: 3 10 1
3+
:header-rows: 1
4+
:class: wrap-text
5+
6+
7+
* - Package
8+
- Description
9+
- Docs
10+
* - `diffpy.srfit <https://github.com/diffpy/diffpy.srfit>`_
11+
- Setup and control of general fitting problems.
12+
- `doc <https://www.diffpy.org/diffpy.srfit/>`_
13+
* - `diffpy.srreal <https://github.com/diffpy/diffpy.srreal>`_
14+
- Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction.
15+
- `doc <https://www.diffpy.org/diffpy.srreal/>`_
16+
* - `diffpy.structure <https://github.com/diffpy/diffpy.structure>`_
17+
- Crystal structure container and parsers for structure formats.
18+
- `doc <https://www.diffpy.org/diffpy.structure/>`_
19+
* - `diffpy.utils <https://github.com/diffpy/diffpy.utils>`_
20+
- General purpose utilities for the diffpy libraries.
21+
- `doc <https://www.diffpy.org/diffpy.utils/>`_
22+
* - `pyobjcryst <https://github.com/diffpy/pyobjcryst>`_
23+
- Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library.
24+
- `doc <https://www.diffpy.org/pyobjcryst/>`_
25+
* - `libdiffpy <https://github.com/diffpy/libdiffpy>`_
26+
- C++ library for calculation of PDF and other real-space quantities.
27+
- `doc <https://www.diffpy.org/libdiffpy/>`_

0 commit comments

Comments
 (0)