From d3e151aee780147767650837d7aed6d80b73fa24 Mon Sep 17 00:00:00 2001 From: Yuchen Ethan Xiao Date: Tue, 5 Aug 2025 11:51:55 -0400 Subject: [PATCH 1/2] docs: remove documentation template and add QPA notebook in the documentation --- docs/source/examples/examples.rst | 12 ++--- docs/source/getting-started.rst | 79 ------------------------------- docs/source/index.rst | 8 ---- news/remove-template.rst | 23 +++++++++ 4 files changed, 29 insertions(+), 93 deletions(-) delete mode 100644 docs/source/getting-started.rst create mode 100644 news/remove-template.rst diff --git a/docs/source/examples/examples.rst b/docs/source/examples/examples.rst index b5e0658..02e5618 100644 --- a/docs/source/examples/examples.rst +++ b/docs/source/examples/examples.rst @@ -5,7 +5,7 @@ Example notebooks Several examples available in the pyobjcryst repository: :doc:`3D Crystal structure display ` -================================================================ +======================================================= Example of importing a CIF file from a file or the `Crystallography Open Database `_ @@ -13,7 +13,7 @@ and displaying it in a widget using `3dmol.js `_. :doc:`Solving the cimetidine structure from its powder pattern ` -=============================================================================================================== +====================================================================================================== In this example, a powder pattern is used to solve the crystal structure of Cimetidine. This covers all the steps: loading the @@ -22,7 +22,7 @@ the spacegroup, profile fitting, and solving the structure using a global optimisation algorithm. :doc:`Solving the PbSO4 structure from its X and N powder patterns ` -============================================================================================================== +===================================================================================================== In this example, two powder patterns (X-ray and neutron) are used to solve the crystal structure of PbSO4. This covers all the steps: loading the @@ -31,14 +31,14 @@ the spacegroup, profile fitting for the two patterns, and solving the structure using a global optimisation algorithm. :doc:`Meta-structure solution using multi-processing ` -=================================================================================================== +========================================================================================== This is a more advanced example where 8 different spacegroups are tested in parallel to determine which one is correct. The solutions can then be compared and displayed individually. -:doc:`Quantitative phase analysis (QPA) ` -=============================================================================== +:doc:`Quantitative phase analysis (QPA) ` +========================================================================== Example of QPA based on the data available from the `1999 Round Robin `_, diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst deleted file mode 100644 index c1e786f..0000000 --- a/docs/source/getting-started.rst +++ /dev/null @@ -1,79 +0,0 @@ -:tocdepth: -1 - -.. index:: getting-started - -.. _getting-started: - -================ -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 `. - -.. 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 -env python=3.13 \ - --file requirements/test.txt \ - --file requirements/conda.txt - - # Create a new environment, with build dependencies (non-pure Python package) - conda create -n -env python=3.13 \ - --file requirements/test.txt \ - --file requirements/conda.txt \ - --file requirements/build.txt - - # Activate the environment - conda activate _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 ``/docs/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`. diff --git a/docs/source/index.rst b/docs/source/index.rst index 7f06ce2..f4f57a7 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,14 +9,6 @@ | Software version |release| | Last updated |today|. -=============== -Getting started -=============== - -Welcome to the ``pyobjcryst`` documentation! - -To get started, please visit the :ref:`Getting started ` page. - ======= Authors ======= diff --git a/news/remove-template.rst b/news/remove-template.rst new file mode 100644 index 0000000..b3ac0bf --- /dev/null +++ b/news/remove-template.rst @@ -0,0 +1,23 @@ +**Added:** + +* No news added: Remove the documentation template and add QPA notebook in docuementation. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* From 227a1334a7c285a1e3f1619ee6018def27c7fa6c Mon Sep 17 00:00:00 2001 From: Yuchen Ethan Xiao Date: Tue, 5 Aug 2025 12:22:00 -0400 Subject: [PATCH 2/2] chore: fix pre-commit --- news/remove-template.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/remove-template.rst b/news/remove-template.rst index b3ac0bf..e94597b 100644 --- a/news/remove-template.rst +++ b/news/remove-template.rst @@ -1,6 +1,6 @@ **Added:** -* No news added: Remove the documentation template and add QPA notebook in docuementation. +* No news added: Remove the documentation template and add QPA notebook in documentation. **Changed:**