From b59f2d18278f315a53128c5d030da0e35a41baf6 Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Mon, 20 Jun 2022 10:07:45 -0700 Subject: [PATCH 1/2] Allow broken intradoc links in binding.rs. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index a214d1a3d..1869657ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,6 +74,7 @@ #![allow(non_snake_case)] #[allow(deref_nullptr)] +#[allow(rustdoc::broken_intra_doc_links)] pub mod bindings; mod _macros; // Starts w/_ to be sorted at front by rustfmt! From fa43e78156cec19a8da9a458709da01c8df55e7f Mon Sep 17 00:00:00 2001 From: "Kevin R. Thornton" Date: Mon, 20 Jun 2022 10:09:10 -0700 Subject: [PATCH 2/2] Clarify table sorting requirements in docs. Closes #239 Closes #242 --- src/table_collection.rs | 23 ++++++++++++++++------- src/trees.rs | 2 ++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/table_collection.rs b/src/table_collection.rs index a09474135..e4aa0ef31 100644 --- a/src/table_collection.rs +++ b/src/table_collection.rs @@ -626,11 +626,10 @@ impl TableCollection { /// The [``bookmark``](crate::types::Bookmark) can /// be used to affect where sorting starts from for each table. /// - /// # Note + /// # Details /// - /// As of `0.7.0`, this function does not sort the individual table! - /// See - /// [``topological_sort_individuals``](crate::TableCollection::topological_sort_individuals). + /// See [`full_sort`](crate::TableCollection::full_sort) + /// for more details about which tables are sorted. pub fn sort>( &mut self, start: &Bookmark, @@ -650,10 +649,20 @@ impl TableCollection { /// Fully sort all tables. /// Implemented via a call to [``sort``](crate::TableCollection::sort). /// - /// # Note + /// # Details + /// + /// This function only sorts the tables that have a strict sortedness + /// requirement according to the `tskit` [data + /// model](https://tskit.dev/tskit/docs/stable/data-model.html). + /// + /// These tables are: + /// + /// * edges + /// * mutations + /// * sites /// - /// As of `0.7.0`, this function does not sort the individual table! - /// See + /// For some use cases it is desirable to have the individual table + /// sorted so that parents appear before offspring. See /// [``topological_sort_individuals``](crate::TableCollection::topological_sort_individuals). pub fn full_sort>(&mut self, options: O) -> TskReturnValue { let b = Bookmark::new(); diff --git a/src/trees.rs b/src/trees.rs index d6bad8149..f8b392bb7 100644 --- a/src/trees.rs +++ b/src/trees.rs @@ -975,6 +975,8 @@ impl TreeSequence { /// # Errors /// /// * [`TskitError`] if the tables are not indexed. + /// * [`TskitError`] if the tables are not properly sorted. + /// See [`TableCollection::full_sort`](crate::TableCollection::full_sort). /// /// # Examples ///