Skip to content

Commit

Permalink
Merge pull request #156 from labgem/ref_api_in_doc
Browse files Browse the repository at this point in the history
Fix api reference in readthedoc
  • Loading branch information
jpjarnoux authored Dec 20, 2023
2 parents c90dc81 + d896a14 commit f5eadc7
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 30 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/check_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ on:
push:
paths:
- 'docs/**'
- '.readthedocs.yaml'
- '.github/workflows/check_doc.yml'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
# Standard drop-in approach that should work for most people.
- uses: ammaraskar/sphinx-action@master
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
docs-folder: "docs/"
build-command: "sphinx-build -b html . build/"
python-version: '3.8'
- name: install ppanggolin with python deps and doc deps
run: pip install .[doc,python_deps]

- 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
Expand Down
11 changes: 6 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
version: 2
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- doc
- python_deps

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"


# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
8 changes: 8 additions & 0 deletions docs/api/api_ref.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# API Reference

```{toctree}
:maxdepth: 2
ppanggolin
indice_and_table
```

7 changes: 7 additions & 0 deletions docs/api/indice_and_table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Indices and tables

- {ref}`genindex`
- {ref}`modindex`
- {ref}`search`


13 changes: 11 additions & 2 deletions docs/api/ppanggolin.formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 1 addition & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,5 @@ user/metadata
dev/contribute
dev/buildDoc
api/api_ref
```

# API Reference
[//]: # (- {ref}`ppanggolin package`)

- {ref}`genindex`

- {ref}`modindex`

- {ref}`search`
7 changes: 0 additions & 7 deletions docs/requirements.txt

This file was deleted.

15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ doc = [
"sphinx-autobuild==2021.3.14",
"myst-parser==2",
"docutils==0.18.1",
"sphinxcontrib.mermaid==0.9.2"
"sphinxcontrib.mermaid==0.9.2",
]
test = [
"pytest>=7.0.0"
]
python_deps = [
"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"
]
#
[project.urls]
Homepage = "https://labgem.genoscope.cns.fr/2023/04/27/ppanggolin/"
Expand Down

0 comments on commit f5eadc7

Please sign in to comment.