-
Notifications
You must be signed in to change notification settings - Fork 1
docs: Migrate over a lightweight version of documentation #23
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
Changes from all commits
d1608df
3b17d2c
6e8b899
7d69680
36b0307
c1fb2b0
da68fc4
0da2591
38d1739
2de0797
f680590
5e3c4da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Force all Sphinx docutils tables to wrap text in cells (RTD theme & general) */ | ||
.rst-content table.docutils td, | ||
.rst-content table.docutils th, | ||
.wy-table-responsive table td, | ||
.wy-table-responsive table th { | ||
white-space: normal !important; | ||
word-break: normal !important; | ||
} | ||
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,72 +8,4 @@ | |
Getting started | ||
================ | ||
|
||
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. | ||
|
||
Reuse ``.rst`` files across multiple pages | ||
------------------------------------------ | ||
|
||
Here is how you can reuse a reusable block of ``.rst`` files across multiple pages: | ||
|
||
.. include:: snippets/example-table.rst | ||
|
||
.. warning:: | ||
|
||
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. | ||
|
||
Refer to a specific section in the documentation | ||
------------------------------------------------ | ||
|
||
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>`. | ||
|
||
.. note:: | ||
|
||
Please check the raw ``.rst`` file of this page to see the exact use of the ``:ref:`` tag. | ||
|
||
Embed your code snippets in the documentation | ||
--------------------------------------------- | ||
|
||
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: | ||
|
||
.. code-block:: bash | ||
|
||
# Create a new environment, without build dependencies (pure Python package) | ||
conda create -n <package_name>-env python=3.13 \ | ||
--file requirements/tests.txt \ | ||
--file requirements/conda.txt | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we want installation instructions in the docs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes please. We are not sure what they are going to be yet though. Probably conda-forge only. |
||
# Create a new environment, with build dependencies (non-pure Python package) | ||
conda create -n <package_name>-env python=3.13 \ | ||
--file requirements/tests.txt \ | ||
--file requirements/conda.txt \ | ||
--file requirements/build.txt | ||
|
||
# Activate the environment | ||
conda activate <package_name>_env | ||
|
||
# Install your package locally | ||
# `--no-deps` to NOT install packages again from `requirements.pip.txt` | ||
pip install -e . --no-deps | ||
|
||
# Run pytest locally | ||
pytest | ||
|
||
# ... run example tutorials | ||
|
||
.. _attach-image: | ||
|
||
Attach an image to the documentation | ||
------------------------------------ | ||
|
||
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. | ||
|
||
.. image:: ./img/scikit-package-logo-text.png | ||
:alt: codecov-in-pr-comment | ||
:width: 400px | ||
:align: center | ||
|
||
|
||
Other useful directives | ||
----------------------- | ||
|
||
Here is how you can do menu selection :menuselection:`Admin --> Settings` and display labels for buttons like :guilabel:`Privacy level`. | ||
Coming soon... |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. image is from current cmi docs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,24 @@ | |
####### | ||
|
||
.. |title| replace:: diffpy.cmi documentation | ||
| Software version |release| | ||
| Last updated |today|. | ||
|
||
``diffpy.cmi`` - Complex modeling infrastructure: a modular framework for multi-modal modeling of scientific data. | ||
|
||
| Software version |release| | ||
| Last updated |today|. | ||
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. | ||
|
||
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. | ||
|
||
.. image:: ./img/diffpycmi_screenshot.png | ||
:alt: codecov-in-pr-comment | ||
:width: 400px | ||
:align: center | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This text is also from current cmi docs |
||
|
||
=============== | ||
Getting started | ||
=============== | ||
|
||
Welcome to the ``diffpy.cmi`` documentation! | ||
|
||
To get started, please visit the :ref:`Getting started <getting-started>` page. | ||
|
||
======= | ||
|
@@ -44,6 +50,7 @@ Table of contents | |
:maxdepth: 2 | ||
|
||
getting-started | ||
Tutorials <tutorials/index> | ||
Package API <api/diffpy.cmi> | ||
release | ||
license | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. list-table:: | ||
:widths: 3 10 1 | ||
:header-rows: 1 | ||
:class: wrap-text | ||
|
||
|
||
* - Package | ||
- Description | ||
- Docs | ||
* - `diffpy.srfit <https://github.com/diffpy/diffpy.srfit>`_ | ||
- Setup and control of general fitting problems. | ||
- `doc <https://www.diffpy.org/diffpy.srfit/>`_ | ||
* - `diffpy.srreal <https://github.com/diffpy/diffpy.srreal>`_ | ||
- Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction. | ||
- `doc <https://www.diffpy.org/diffpy.srreal/>`_ | ||
* - `diffpy.structure <https://github.com/diffpy/diffpy.structure>`_ | ||
- Crystal structure container and parsers for structure formats. | ||
- `doc <https://www.diffpy.org/diffpy.structure/>`_ | ||
* - `diffpy.utils <https://github.com/diffpy/diffpy.utils>`_ | ||
- General purpose utilities for the diffpy libraries. | ||
- `doc <https://www.diffpy.org/diffpy.utils/>`_ | ||
* - `pyobjcryst <https://github.com/diffpy/pyobjcryst>`_ | ||
- Python bindings to ObjCryst++, the Object-Oriented Crystallographic Library. | ||
- `doc <https://www.diffpy.org/pyobjcryst/>`_ | ||
* - `libdiffpy <https://github.com/diffpy/libdiffpy>`_ | ||
- C++ library for calculation of PDF and other real-space quantities. | ||
- `doc <https://www.diffpy.org/libdiffpy/>`_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both new tables are also from current cmi docs but with updated/not broken links except cxxtest, their doc link is broken so i just put the broken link there for now. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. list-table:: | ||
:widths: 3 10 1 | ||
:header-rows: 1 | ||
:class: wrap-text | ||
|
||
|
||
* - Package | ||
- Description | ||
- Docs | ||
* - `srfit-sasview <https://github.com/diffpy/srfit-sasview>`_ | ||
- Selected modules from SasView, the Small Angle Scattering Analysis Software Package. | ||
- `doc <https://www.sasview.org/documentation/>`_ | ||
* - `periodictable <https://github.com/python-periodictable/periodictable>`_ | ||
- Extensible periodic table of the elements with support for mass, density, and X-ray/neutron scattering information. | ||
- `doc <https://periodictable.readthedocs.io/en/latest/>`_ | ||
* - `libobjcryst <https://github.com/diffpy/libobjcryst>`_ | ||
- ObjCryst++, crystallographic library for C++ re-packaged for installation as a shared library. | ||
- `doc <https://sourceforge.net/projects/objcryst/>`_ | ||
* - `cxxtest <https://github.com/CxxTest/cxxtest>`_ | ||
- Testing framework for C++. | ||
- `doc <http://cxxtest.com/>`_ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Tutorials | ||
========= | ||
|
||
Examples usage of ``diffpy.cmi`` can be found at `this GitHub repo <https://github.com/diffpy/add2019-diffpy-cmi>`_. Tutorials coming soon... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**Added:** | ||
|
||
* Add light-weight documentation migrated from old diffpy-CMI documentation. | ||
|
||
**Changed:** | ||
|
||
* <news item> | ||
|
||
**Deprecated:** | ||
|
||
* <news item> | ||
|
||
**Removed:** | ||
|
||
* <news item> | ||
|
||
**Fixed:** | ||
|
||
* <news item> | ||
|
||
**Security:** | ||
|
||
* <news item> |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to add this file or something like this to the main scikit-package. Otherwise, when you render tables in the sphinx RTD theme the tables dont fully load on the page. you have to scroll over to view the whole thing. This code wraps the text in the table so it renders nicely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi I dont know how to code in C very well so i got help from chatGPT here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobleesj do you agree? It makes sense to me.