From 3c7303014f76daddcd0c000242de19df2572d1c0 Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavalias-github@xavier.robin.name>
Date: Thu, 27 Jun 2024 17:46:16 +0200
Subject: [PATCH] doc: clarify deprecation warning/notes

Now we always have a warning on the deprecated doc with a link to the
new implementation; and a note on the new implementation which starts
with "this is the new implementation" rather than "XXX is deprecated".
---
 modules/mol/alg/doc/lddt_deprecated.rst            |  3 ++-
 modules/mol/alg/doc/stereochemistry.rst            |  8 --------
 modules/mol/alg/doc/stereochemistry_deprecated.rst |  5 +++++
 modules/mol/alg/pymod/stereochemistry.py           | 10 ++++++++++
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/modules/mol/alg/doc/lddt_deprecated.rst b/modules/mol/alg/doc/lddt_deprecated.rst
index 433591c26..80e1b1355 100644
--- a/modules/mol/alg/doc/lddt_deprecated.rst
+++ b/modules/mol/alg/doc/lddt_deprecated.rst
@@ -6,7 +6,8 @@ lDDT (deprecated)
 .. warning::
 
   These functions in `ost.mol.alg` are deprecated. Consider using the newer
-  implementation in :class:`ost.mol.alg.lDDTScorer` instead.
+  implementation in
+  :class:`ost.mol.alg.lddt.lDDTScorer <ost.mol.alg.lddt.lDDTScorer>` instead.
 
 .. function:: LocalDistDiffTest(model, distance_list, tolerance_list, \
                                 sequence_separation=0, \
diff --git a/modules/mol/alg/doc/stereochemistry.rst b/modules/mol/alg/doc/stereochemistry.rst
index 78ebf8b02..2b4f763eb 100644
--- a/modules/mol/alg/doc/stereochemistry.rst
+++ b/modules/mol/alg/doc/stereochemistry.rst
@@ -1,14 +1,6 @@
 :mod:`~ost.mol.alg.stereochemistry` -- Stereochemistry Checks
 --------------------------------------------------------------------------------------
 
-.. warning::
-
-  Stereochemistry checks described in
-  `Mariani et al. <https://dx.doi.org/10.1093/bioinformatics/btt473>`_ are
-  considered deprecated. They have been re-implemented and now support
-  nucleotides. The old code is still available and documented
-  :doc:`here <stereochemistry_deprecated>`.
-
 .. automodule:: ost.mol.alg.stereochemistry
    :members:
    :member-order: bysource
diff --git a/modules/mol/alg/doc/stereochemistry_deprecated.rst b/modules/mol/alg/doc/stereochemistry_deprecated.rst
index 3a4802a7a..b9e2422a8 100644
--- a/modules/mol/alg/doc/stereochemistry_deprecated.rst
+++ b/modules/mol/alg/doc/stereochemistry_deprecated.rst
@@ -3,6 +3,11 @@
 Stereochemistry (deprecated)
 ================================================================================
 
+.. warning::
+
+  These functions in `ost.mol.alg` are deprecated.
+  Consider using the newer implementation in
+  :mod:`~ost.mol.alg.stereochemistry` instead.
 
 .. function:: CheckStructure(ent, \
                              bond_table, \
diff --git a/modules/mol/alg/pymod/stereochemistry.py b/modules/mol/alg/pymod/stereochemistry.py
index b6aa98a58..1a2d7fb1a 100644
--- a/modules/mol/alg/pymod/stereochemistry.py
+++ b/modules/mol/alg/pymod/stereochemistry.py
@@ -1,3 +1,13 @@
+"""
+.. note::
+
+  This is a new implementation of the stereochemistry checks, introduced in
+  OpenStructure 2.4, with support for nucleotides. The
+  :doc:`previous stereochemistry checks <stereochemistry_deprecated>` that come
+  with `Mariani et al. <https://dx.doi.org/10.1093/bioinformatics/btt473>`_ are
+  considered deprecated.
+"""
+
 import os
 import json
 import datetime
-- 
GitLab