From ee2ab25d99cc5b8e18ba73570f14b1712038636f Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Thu, 19 Oct 2023 16:27:16 +0200 Subject: [PATCH 01/13] Update readthedocs.yml Fix docs --- readthedocs.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/readthedocs.yml b/readthedocs.yml index f1e59099..f4e29d39 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,12 +1,16 @@ # .readthedocs.yml +version: 2 build: image: latest + os: ubuntu-22.04 + tools: + python: "3.10" -python: - version: 3.8 - pip_install: true - -requirements_file: requirements_doc.txt +sphinx: + configuration: doc/conf.py +python: + install: + - requirements: docs/requirements_doc.txt From f2191a8b35b4b96e6debdde22c22647c9dd9284c Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Thu, 19 Oct 2023 16:32:19 +0200 Subject: [PATCH 02/13] Update readthedocs.yml --- readthedocs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index f4e29d39..d6719570 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,7 +3,6 @@ version: 2 build: - image: latest os: ubuntu-22.04 tools: python: "3.10" From f5a4fbb5805a58cd86f7424be7da7a3360f24308 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Thu, 19 Oct 2023 16:34:06 +0200 Subject: [PATCH 03/13] Update readthedocs.yml --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index d6719570..2b88b6a7 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -12,4 +12,4 @@ sphinx: python: install: - - requirements: docs/requirements_doc.txt + - requirements: requirements_doc.txt From b6ea94c2f08da8d21f7372dfbc4abc20ed8a44a5 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 20:48:22 +0100 Subject: [PATCH 04/13] Pin Sphinx>=7.0 in requirements_doc.txt --- requirements_doc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_doc.txt b/requirements_doc.txt index 6c5e2470..a0838da8 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -9,6 +9,6 @@ click>=7.0 git+https://github.com/golobor/sphinx-click ipython nbsphinx -Sphinx +Sphinx>=7.0 sphinx_rtd_theme -docutils>0.16 \ No newline at end of file +docutils>0.16 From 59c90f7a0e81a70a6da21127197d64f3c106dce3 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 20:56:31 +0100 Subject: [PATCH 05/13] use regular sphinx-click from PyPI --- requirements_doc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_doc.txt b/requirements_doc.txt index a0838da8..912c7efb 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -6,7 +6,7 @@ pandas pysam bioframe click>=7.0 -git+https://github.com/golobor/sphinx-click +sphinx-click ipython nbsphinx Sphinx>=7.0 From 162eaf7b7a60745f5cd14f415815899e817d7968 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:01:05 +0100 Subject: [PATCH 06/13] remove recommonmark from conf.py --- doc/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 1348b77a..40b74308 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,6 @@ "sphinx.ext.napoleon", "sphinx.ext.mathjax", "sphinx_click.ext", - "recommonmark", "nbsphinx", "sphinx_rtd_theme", ] From ffc07ea2a9b90a0bc674b2d70fd6e376546a9443 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:10:37 +0100 Subject: [PATCH 07/13] set docs language to 'en' --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 40b74308..9b03ee7e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -99,7 +99,7 @@ def get_version(): # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: From 96bafffbd961a7930fa6162823127fcf778c3434 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:15:37 +0100 Subject: [PATCH 08/13] Add pairtools to $PATH for docs --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 9b03ee7e..253ce64d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,7 +19,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ From 1735da45e4f15260277d995d2ebce6d3ec576439 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:19:37 +0100 Subject: [PATCH 09/13] only import dedup_cython when needed --- pairtools/lib/dedup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pairtools/lib/dedup.py b/pairtools/lib/dedup.py index 92e99deb..335270b8 100644 --- a/pairtools/lib/dedup.py +++ b/pairtools/lib/dedup.py @@ -5,7 +5,7 @@ from scipy.sparse import coo_matrix from scipy.sparse.csgraph import connected_components -from . import dedup_cython, pairsam_format +from . import pairsam_format from .stats import PairCounter from .._logging import get_logger @@ -339,6 +339,8 @@ def streaming_dedup_cython( ------- """ + from . import dedup_cython + maxind = max(c1ind, c2ind, p1ind, p2ind, s1ind, s2ind) if bool(extra_cols1) and bool(extra_cols2): maxind = max(maxind, max(extra_cols1), max(extra_cols2)) From 462f57c2e1f6a9962a121bd5c7cc41d5281bc514 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:22:32 +0100 Subject: [PATCH 10/13] Remove dedup_cython import from __init__.py --- pairtools/lib/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pairtools/lib/__init__.py b/pairtools/lib/__init__.py index 18f3b848..38a9b6b6 100644 --- a/pairtools/lib/__init__.py +++ b/pairtools/lib/__init__.py @@ -1,6 +1,5 @@ from . import fileio from . import dedup -from . import dedup_cython from . import filterbycov from . import headerops from . import pairsam_format From 38e863296bc2df715e723ff52038a2728dbaa040 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:32:36 +0100 Subject: [PATCH 11/13] try installing pairtools on readthedocs --- readthedocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs.yml b/readthedocs.yml index 2b88b6a7..efff4951 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -13,3 +13,5 @@ sphinx: python: install: - requirements: requirements_doc.txt + - method: pip + path: . From 3ffdadedf1ece5f8b72a6930c167912de46d0be6 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:35:57 +0100 Subject: [PATCH 12/13] try installing through requirements_doc.txt --- requirements_doc.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements_doc.txt b/requirements_doc.txt index 912c7efb..bda504f5 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -12,3 +12,4 @@ nbsphinx Sphinx>=7.0 sphinx_rtd_theme docutils>0.16 +-e . From 32f070dbe7ff786969bab27364ace0a5518a3c70 Mon Sep 17 00:00:00 2001 From: Ilya Flyamer Date: Mon, 20 Nov 2023 21:39:11 +0100 Subject: [PATCH 13/13] revert changes in dedup --- pairtools/lib/dedup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pairtools/lib/dedup.py b/pairtools/lib/dedup.py index 335270b8..72ebc350 100644 --- a/pairtools/lib/dedup.py +++ b/pairtools/lib/dedup.py @@ -5,7 +5,7 @@ from scipy.sparse import coo_matrix from scipy.sparse.csgraph import connected_components -from . import pairsam_format +from . import dedup_cython, pairsam_format from .stats import PairCounter from .._logging import get_logger @@ -338,9 +338,7 @@ def streaming_dedup_cython( Returns ------- - """ - from . import dedup_cython - + """ maxind = max(c1ind, c2ind, p1ind, p2ind, s1ind, s2ind) if bool(extra_cols1) and bool(extra_cols2): maxind = max(maxind, max(extra_cols1), max(extra_cols2))