From 578599a64039d95870a9e7ad0042b00e3ace0743 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 17:23:26 +0100 Subject: [PATCH 01/23] attempt to fix api ref in redthedoc --- .readthedocs.yaml | 6 +++++- docs/index.md | 4 +++- docs/requirements.txt | 7 ------- 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ff7f01ab..c317c145 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,8 +5,12 @@ # Required version: 2 python: + version: 3.8 install: - - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - docs # Set the OS, Python version and other tools you might need build: diff --git a/docs/index.md b/docs/index.md index 163cc7a4..de7135a5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -86,9 +86,11 @@ user/metadata dev/contribute dev/buildDoc +api/modules ``` -# API Reference + +# Indices and tables [//]: # (- {ref}`ppanggolin package`) - {ref}`genindex` diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 87dbffaa..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -sphinx==6.2.1 -sphinx_rtd_theme==1.2.2 -readthedocs-sphinx-search==0.3.1 -sphinx-autobuild==2021.3.14 -myst-parser==1.0.0 -docutils==0.18.1 -sphinxcontrib.mermaid==0.9.2 \ No newline at end of file From 354d8197788aa9bda535540d671270361e1d29c7 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 17:25:42 +0100 Subject: [PATCH 02/23] fix python version --- .readthedocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c317c145..aa426ef1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,7 +5,6 @@ # Required version: 2 python: - version: 3.8 install: - method: pip path: . From efcd3e4e6d5abe139660a5a5781d296b027c5826 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 17:33:26 +0100 Subject: [PATCH 03/23] attempt to install doc dep with pip doc --- .readthedocs.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index aa426ef1..6b3085f5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,9 +7,7 @@ version: 2 python: install: - method: pip - path: . - extra_requirements: - - docs + path: .[doc] # Set the OS, Python version and other tools you might need build: From 598d33e98fd0a8cada37ff2036ab79d15c530981 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 17:45:09 +0100 Subject: [PATCH 04/23] add requirements of all python depencies in the toml --- pyproject.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 67b67f1b..da928ce3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,18 @@ requires = [ "setuptools", "setuptools-scm", - "cython" + "cython", + tqdm>=4.64, + tables>=3.7, + pyrodigal>=3.0.1, + networkx>=3.0, + scipy>=1.10.0, + plotly>=4.14.3, + gmpy2>=2.1.2, + pandas>=2.0, + colorlover>=0.3, + numpy>=1.24, + bokeh>=2.4.2,<3, ] build-backend = "setuptools.build_meta" py_modules=["ppanggolin"] From 9ec3df0d8c893c235bd1d098838801bc980b7f85 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 17:55:59 +0100 Subject: [PATCH 05/23] add all python dependencies in toml --- pyproject.toml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index da928ce3..0592ea46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,17 +3,17 @@ requires = [ "setuptools", "setuptools-scm", "cython", - tqdm>=4.64, - tables>=3.7, - pyrodigal>=3.0.1, - networkx>=3.0, - scipy>=1.10.0, - plotly>=4.14.3, - gmpy2>=2.1.2, - pandas>=2.0, - colorlover>=0.3, - numpy>=1.24, - bokeh>=2.4.2,<3, + "tqdm>=4.64", + "tables>=3.7", + "pyrodigal>=3.0.1", + "networkx>=3.0", + "scipy>=1.10.0", + "plotly>=4.14.3", + "gmpy2>=2.1.2", + "pandas>=2.0", + "colorlover>=0.3", + "numpy>=1.24", + "bokeh>=2.4.2,<3" ] build-backend = "setuptools.build_meta" py_modules=["ppanggolin"] From efe18b5da2e203ce5b1deb69afa1c6575b8d0fc6 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 18:26:00 +0100 Subject: [PATCH 06/23] try install in readthedoc with conda --- .readthedocs.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6b3085f5..6b22a90e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,11 +14,12 @@ build: os: ubuntu-22.04 tools: python: "3.8" - # You can also specify other tool versions: - # nodejs: "19" - # rust: "1.64" - # golang: "1.19" + python: "mambaforge-22.9" +conda: + environment: ppanggolin_env.yaml + + # Build documentation in the "docs/" directory with Sphinx sphinx: configuration: docs/conf.py From 6584f9e5fc2daa43a2a8cda77450e15f0054cb78 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 18:32:26 +0100 Subject: [PATCH 07/23] try without the build lines --- .readthedocs.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6b22a90e..cbb0f0c5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,17 +7,19 @@ version: 2 python: install: - method: pip - path: .[doc] + path: . + extra_requirements: + - doc # Set the OS, Python version and other tools you might need -build: - os: ubuntu-22.04 - tools: - python: "3.8" - python: "mambaforge-22.9" +# build: +# os: ubuntu-22.04 +# tools: +# python: "3.8" +# python: "mambaforge-22.9" -conda: - environment: ppanggolin_env.yaml +# conda: +# environment: ppanggolin_env.yaml # Build documentation in the "docs/" directory with Sphinx From a6d15dfaab646c5edfe9551e73d0b4a5a0f69ebf Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 18:36:09 +0100 Subject: [PATCH 08/23] update .readthedocs.yaml --- .readthedocs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index cbb0f0c5..a0eee30a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,9 +12,9 @@ python: - doc # Set the OS, Python version and other tools you might need -# build: -# os: ubuntu-22.04 -# tools: +build: + os: ubuntu-22.04 + tools: # python: "3.8" # python: "mambaforge-22.9" From 2782c16f8e4c891a1533d49fc74f50d34edbd23d Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 18:37:09 +0100 Subject: [PATCH 09/23] update .readthedocs.yaml --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a0eee30a..e6938f57 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,7 +15,7 @@ python: build: os: ubuntu-22.04 tools: -# python: "3.8" + python: "3.8" # python: "mambaforge-22.9" # conda: From 7c6a178f621fc44a8fbc401e9dd7d06257be15c1 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 19:13:48 +0100 Subject: [PATCH 10/23] update .readthedocs.yaml --- .readthedocs.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e6938f57..a5e8b2ca 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,18 +4,20 @@ # Required version: 2 -python: - install: - - method: pip - path: . - extra_requirements: - - doc +# python: +# install: +# - method: pip +# path: . +# extra_requirements: +# - doc # Set the OS, Python version and other tools you might need build: os: ubuntu-22.04 tools: - python: "3.8" + python: "3.8" + commands: + - pip install .[doc] # python: "mambaforge-22.9" # conda: From cf2598669487521d5b65cbbfe17da4248c7f75e3 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 19:21:21 +0100 Subject: [PATCH 11/23] update .readthedocs.yaml --- .readthedocs.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a5e8b2ca..12fcc0ac 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,12 +4,12 @@ # Required version: 2 -# python: -# install: -# - method: pip -# path: . -# extra_requirements: -# - doc +python: + install: + - method: pip + path: . + extra_requirements: + - doc # Set the OS, Python version and other tools you might need build: From d0cf4dfac555bc74e5fd6d4097e1ef9c39e0a154 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Mon, 18 Dec 2023 19:32:21 +0100 Subject: [PATCH 12/23] update .readthedocs.yaml --- .readthedocs.yaml | 2 -- pyproject.toml | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 12fcc0ac..a69299f1 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,8 +16,6 @@ build: os: ubuntu-22.04 tools: python: "3.8" - commands: - - pip install .[doc] # python: "mambaforge-22.9" # conda: diff --git a/pyproject.toml b/pyproject.toml index 0592ea46..b0f6aa15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,18 @@ doc = [ "sphinx-autobuild==2021.3.14", "myst-parser==2", "docutils==0.18.1", - "sphinxcontrib.mermaid==0.9.2" + "sphinxcontrib.mermaid==0.9.2", + "tqdm>=4.64", + "tables>=3.7", + "pyrodigal>=3.0.1", + "networkx>=3.0", + "scipy>=1.10.0", + "plotly>=4.14.3", + "gmpy2>=2.1.2", + "pandas>=2.0", + "colorlover>=0.3", + "numpy>=1.24", + "bokeh>=2.4.2,<3" ] test = [ "pytest>=7.0.0" From e167acec37774879214334389a7b5e968476cd50 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 09:24:49 +0100 Subject: [PATCH 13/23] add modules md entry point of api ref --- docs/api/modules.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/api/modules.md diff --git a/docs/api/modules.md b/docs/api/modules.md new file mode 100644 index 00000000..5ba103b1 --- /dev/null +++ b/docs/api/modules.md @@ -0,0 +1,18 @@ +# ppanggolin + + + + +```{toctree} +:maxdepth: 2 + +ppanggolin +``` + + +# Indices and tables + +- {ref}`genindex` +- {ref}`modindex` +- {ref}`search` + From 42fc5e3cad6b59c7094c76bbe582fdda60463654 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 09:36:40 +0100 Subject: [PATCH 14/23] add API ref in toctree --- docs/api/indice_and_table.md | 7 +++++++ docs/api/modules.md | 14 ++------------ 2 files changed, 9 insertions(+), 12 deletions(-) create mode 100644 docs/api/indice_and_table.md diff --git a/docs/api/indice_and_table.md b/docs/api/indice_and_table.md new file mode 100644 index 00000000..d8eafa38 --- /dev/null +++ b/docs/api/indice_and_table.md @@ -0,0 +1,7 @@ +# Indices and tables + +- {ref}`genindex` +- {ref}`modindex` +- {ref}`search` + + diff --git a/docs/api/modules.md b/docs/api/modules.md index 5ba103b1..6e569604 100644 --- a/docs/api/modules.md +++ b/docs/api/modules.md @@ -1,18 +1,8 @@ -# ppanggolin - - - +# API Reference ```{toctree} :maxdepth: 2 - ppanggolin +indice_and_table ``` - -# Indices and tables - -- {ref}`genindex` -- {ref}`modindex` -- {ref}`search` - From 3227875e7b8709f8f2b4342a370c714d83eed6e2 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 10:05:12 +0100 Subject: [PATCH 15/23] add new cat in toml to improve install in readthedoc --- .readthedocs.yaml | 1 + pyproject.toml | 21 ++++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a69299f1..92e946c5 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,7 @@ python: path: . extra_requirements: - doc + - python_deps # Set the OS, Python version and other tools you might need build: diff --git a/pyproject.toml b/pyproject.toml index b0f6aa15..3bfbbe77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,18 +2,7 @@ requires = [ "setuptools", "setuptools-scm", - "cython", - "tqdm>=4.64", - "tables>=3.7", - "pyrodigal>=3.0.1", - "networkx>=3.0", - "scipy>=1.10.0", - "plotly>=4.14.3", - "gmpy2>=2.1.2", - "pandas>=2.0", - "colorlover>=0.3", - "numpy>=1.24", - "bokeh>=2.4.2,<3" + "cython" ] build-backend = "setuptools.build_meta" py_modules=["ppanggolin"] @@ -57,6 +46,11 @@ doc = [ "myst-parser==2", "docutils==0.18.1", "sphinxcontrib.mermaid==0.9.2", +] +test = [ + "pytest>=7.0.0" +] +python_deps = [ "tqdm>=4.64", "tables>=3.7", "pyrodigal>=3.0.1", @@ -69,9 +63,6 @@ doc = [ "numpy>=1.24", "bokeh>=2.4.2,<3" ] -test = [ - "pytest>=7.0.0" -] # [project.urls] Homepage = "https://labgem.genoscope.cns.fr/2023/04/27/ppanggolin/" From 7bfc3b2248e77a49096d6441a542ad79d8c09748 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 10:46:44 +0100 Subject: [PATCH 16/23] clean readthedocs --- .readthedocs.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 92e946c5..11afb0d3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -17,10 +17,6 @@ build: os: ubuntu-22.04 tools: python: "3.8" -# python: "mambaforge-22.9" - -# conda: -# environment: ppanggolin_env.yaml # Build documentation in the "docs/" directory with Sphinx From 3264b124c441523000c925b7cc9a5da0a9e3a460 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 10:55:51 +0100 Subject: [PATCH 17/23] update check doc gh action --- .github/workflows/check_doc.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index 165fbca9..f2613ea2 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -11,7 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.8' + - run: pip install .[doc,python_deps] + # Standard drop-in approach that should work for most people. - uses: ammaraskar/sphinx-action@master with: From 12c79432cfb1fe192be80837f971d629adbe709d Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:00:15 +0100 Subject: [PATCH 18/23] update check doc gh action --- .github/workflows/check_doc.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index f2613ea2..2b009f7f 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -4,6 +4,7 @@ on: push: paths: - 'docs/**' + - '.readthedocs.yaml' jobs: build: From cc85c051e7a1166e666236d48416246f297cbd82 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:01:21 +0100 Subject: [PATCH 19/23] fix makefile --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf1..ed880990 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = source +SOURCEDIR = . BUILDDIR = build # Put it first so that "make" without argument is like "make help". From d4251c0bf42943c3122f58c1d0295184554d9947 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:25:07 +0100 Subject: [PATCH 20/23] update check doc action --- .github/workflows/check_doc.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index 2b009f7f..9ca53ff5 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -5,7 +5,8 @@ on: paths: - 'docs/**' - '.readthedocs.yaml' - + - '.github/workflows/check_doc.yml' + jobs: build: @@ -14,15 +15,16 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + name: install ppanggolin with python deps and doc deps with: python-version: '3.8' - run: pip install .[doc,python_deps] - # Standard drop-in approach that should work for most people. - - uses: ammaraskar/sphinx-action@master - with: - docs-folder: "docs/" - build-command: "sphinx-build -b html . build/" + - name: Complete workflow + shell: bash -l {0} + run: | + cd docs/ + sphinx-build -b html . build/ # Great extra actions to compose with: # Create an artifact of the html output. - uses: actions/upload-artifact@v1 From 7b2e7bab27f155856a106d10635c09af38520d6a Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:28:04 +0100 Subject: [PATCH 21/23] fix step name in gh action --- .github/workflows/check_doc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index 9ca53ff5..5e8b43f0 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -6,7 +6,7 @@ on: - 'docs/**' - '.readthedocs.yaml' - '.github/workflows/check_doc.yml' - + jobs: build: @@ -15,10 +15,10 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - name: install ppanggolin with python deps and doc deps with: python-version: '3.8' - - run: pip install .[doc,python_deps] + - name: install ppanggolin with python deps and doc deps + run: pip install .[doc,python_deps] - name: Complete workflow shell: bash -l {0} From 1feaacf2478348197738621601393bd8dd17d6dc Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:55:05 +0100 Subject: [PATCH 22/23] update api doc --- docs/api/modules.md | 8 -------- docs/api/ppanggolin.formats.md | 13 +++++++++++-- docs/index.md | 12 +----------- 3 files changed, 12 insertions(+), 21 deletions(-) delete mode 100644 docs/api/modules.md diff --git a/docs/api/modules.md b/docs/api/modules.md deleted file mode 100644 index 6e569604..00000000 --- a/docs/api/modules.md +++ /dev/null @@ -1,8 +0,0 @@ -# API Reference - -```{toctree} -:maxdepth: 2 -ppanggolin -indice_and_table -``` - diff --git a/docs/api/ppanggolin.formats.md b/docs/api/ppanggolin.formats.md index 5f9ec7ae..a13be3db 100644 --- a/docs/api/ppanggolin.formats.md +++ b/docs/api/ppanggolin.formats.md @@ -29,10 +29,19 @@ :show-inheritance: ``` -## ppanggolin.formats.writeFlat module +## ppanggolin.formats.writeFlatGenomes module ```{eval-rst} -.. automodule:: ppanggolin.formats.writeFlat +.. automodule:: ppanggolin.formats.writeFlatGenomes + :members: + :undoc-members: + :show-inheritance: +``` + +## ppanggolin.formats.writeFlatPangenome module + +```{eval-rst} +.. automodule:: ppanggolin.formats.writeFlatPangenome :members: :undoc-members: :show-inheritance: diff --git a/docs/index.md b/docs/index.md index de7135a5..2ffd38c2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -86,15 +86,5 @@ user/metadata dev/contribute dev/buildDoc -api/modules +api/api_ref ``` - - -# Indices and tables -[//]: # (- {ref}`ppanggolin package`) - -- {ref}`genindex` - -- {ref}`modindex` - -- {ref}`search` From d896a14bd8690ab38bbdaaed2846ebcc92bab196 Mon Sep 17 00:00:00 2001 From: JeanMainguy Date: Tue, 19 Dec 2023 11:55:50 +0100 Subject: [PATCH 23/23] add entry point for the api doc --- docs/api/api_ref.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/api/api_ref.md diff --git a/docs/api/api_ref.md b/docs/api/api_ref.md new file mode 100644 index 00000000..6e569604 --- /dev/null +++ b/docs/api/api_ref.md @@ -0,0 +1,8 @@ +# API Reference + +```{toctree} +:maxdepth: 2 +ppanggolin +indice_and_table +``` +