Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge new doc in dev #153

Merged
merged 138 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
a60f65c
replace panorama with ppangolin and build cmd
JeanMainguy Oct 4, 2023
1517235
Merge remote-tracking branch 'origin/dev' into update_doc
JeanMainguy Nov 13, 2023
40b4a85
Create check_doc.yml
JeanMainguy Nov 13, 2023
b72fff7
add custom build cmd
JeanMainguy Nov 13, 2023
f642d24
fix artificat path
JeanMainguy Nov 13, 2023
abccd12
Update check_doc.yml
JeanMainguy Nov 13, 2023
4d00b96
Reduce welcome page
jpjarnoux Nov 13, 2023
8349dd8
Add first tutorial pages
jpjarnoux Nov 14, 2023
f53d564
Add preparing environment in tutorial
jpjarnoux Nov 23, 2023
66a40af
Change title for genome download
jpjarnoux Nov 23, 2023
238d5bb
Add projection API doc
jpjarnoux Nov 23, 2023
8404437
Add workflow tutorial and some output
jpjarnoux Nov 23, 2023
dde306c
Begin RGP analyses tutorial
jpjarnoux Nov 23, 2023
ff20f32
Add org stat in tutorial
jpjarnoux Nov 24, 2023
3930321
Change documentation structure
jpjarnoux Nov 24, 2023
a163969
Paste and enhance installation old doc
jpjarnoux Nov 24, 2023
1b990e8
Paste introduction old content
jpjarnoux Nov 24, 2023
8cee54a
First version of quick usage
jpjarnoux Nov 24, 2023
2eae3ec
Add practical information
jpjarnoux Nov 24, 2023
4e89016
Split pangenome analyses
jpjarnoux Nov 27, 2023
bb7384d
Add todo warning in argparse
jpjarnoux Nov 27, 2023
8026a2b
Copy paste old outputs content for pangenome analyses
jpjarnoux Nov 27, 2023
d34cc9b
complete doc file within new doc structure
JeanMainguy Nov 27, 2023
148d9a0
fix md links
JeanMainguy Nov 27, 2023
54f9fb4
Merge branch 'update_doc' of github.com:labgem/PPanGGOLiN into update…
JeanMainguy Nov 27, 2023
becd4a5
Add MMseqs2 options
jpjarnoux Nov 27, 2023
e956bb0
Reformat workflow pangenome analyses
jpjarnoux Nov 27, 2023
a69328c
improve conda install in gh action
JeanMainguy Nov 27, 2023
01584c9
update conda install run
JeanMainguy Nov 27, 2023
58494dd
fix bokeh version
JeanMainguy Nov 27, 2023
46fb326
Fix requirements pip
jpjarnoux Nov 28, 2023
a10ed70
update install doc and remove useless install file
JeanMainguy Nov 28, 2023
ef53dd2
Grammar correction in install doc
jpjarnoux Nov 28, 2023
f4edf5c
allow wf CI to be launched manually and remove it launch on each push
JeanMainguy Nov 28, 2023
22a0b20
Read gff from prodigal
jpjarnoux Nov 28, 2023
d8fcf91
Fix bug in get_gene_sequences_from_fastas
jpjarnoux Nov 28, 2023
33b249f
Read if contig is circurlar in gff attribute
jpjarnoux Nov 28, 2023
3979f82
be more specific in pointing ref
JeanMainguy Nov 28, 2023
f541142
add some md formating and fix minor things
JeanMainguy Nov 28, 2023
e8c5786
Merge branch 'dev' into update_doc
JeanMainguy Nov 28, 2023
a21e43d
Merge branch 'update_doc' into readGFF
jpjarnoux Nov 29, 2023
c289a7c
add prodigal gff in test
JeanMainguy Nov 30, 2023
897de65
add assertion and comment to prevent unlikely but possible bugs
JeanMainguy Nov 30, 2023
dbeb001
trigger doc check only if docs files changed
JeanMainguy Nov 30, 2023
08f68e9
fix bug in projection of spot
JeanMainguy Nov 30, 2023
4149891
Merge pull request #145 from labgem/readGFF
JeanMainguy Dec 1, 2023
c789366
improve pangenomeStat.md. ready for review
JeanMainguy Dec 4, 2023
db66987
fix upstream by downstream.
JeanMainguy Dec 4, 2023
650c17d
light improvement of writeGenomes.md. ready to review
JeanMainguy Dec 4, 2023
878fec1
replace organism by genome
JeanMainguy Dec 4, 2023
389926e
improve projection doc.
JeanMainguy Dec 4, 2023
c19a600
replace organism by genome
JeanMainguy Dec 4, 2023
cc4457b
Update install.md
JeanMainguy Dec 4, 2023
ca7281d
Merge pull request #147 from labgem/genome_over_organism
JeanMainguy Dec 5, 2023
7beeead
improve gc doc
JeanMainguy Dec 5, 2023
9e99c0c
update doc
JeanMainguy Dec 5, 2023
412061a
update align doc
JeanMainguy Dec 5, 2023
7f9a593
update align doc again
JeanMainguy Dec 5, 2023
a99a470
fix header in module output
JeanMainguy Dec 5, 2023
e6cee8e
edit module doc ready to review
JeanMainguy Dec 5, 2023
c3646e4
fix module title
JeanMainguy Dec 5, 2023
8f3dbf1
Update pangenomeWorkflow.md
acalteau Dec 7, 2023
53489d4
Update pangenomeWorkflow.md
acalteau Dec 7, 2023
915c293
Update pangenomeWorkflow.md
acalteau Dec 7, 2023
328824b
Update pangenomeAnnotation.md
acalteau Dec 7, 2023
1546f6a
Update pangenomeAnnotation.md
acalteau Dec 7, 2023
38e1bf2
Update pangenomeCluster.md
acalteau Dec 7, 2023
19cb2f4
Update rgpPrediction.md
axbazin Dec 7, 2023
4ec1ac6
Update rgpAnalyses.md
axbazin Dec 7, 2023
0cdbb9f
Update rgpOutputs.md
axbazin Dec 7, 2023
da3bdd4
Fix links in rgpPrediction.md
axbazin Dec 7, 2023
64ac412
Add a 'purpose' subsection to rgpPrediction.md
axbazin Dec 7, 2023
a524244
Update writeFlatPangenome.py to add --regions back
axbazin Dec 7, 2023
74f0660
test write_pangenome --regions in the CI
axbazin Dec 7, 2023
e37ff5a
Update all.py to include 'regions' as a possible output file when run…
axbazin Dec 7, 2023
67d79bd
unify write rgp function in proj and write_pan cmds
JeanMainguy Dec 8, 2023
00cff83
adjust the code to load regions and write them as intented
JeanMainguy Dec 8, 2023
b8ae905
add compress flag in various outputs of proj
JeanMainguy Dec 8, 2023
58a9a53
fix regions flag when regions have not been computed
JeanMainguy Dec 8, 2023
ecbe1ae
replace last hidden organism in graph output
JeanMainguy Dec 8, 2023
38d446c
Merge pull request #150 from labgem/genome_over_organism
axbazin Dec 8, 2023
9c44187
fix bug with regions flag
JeanMainguy Dec 8, 2023
168c014
add hdf5 description in practical info and rm intro file
JeanMainguy Dec 8, 2023
f326799
improve a bit and add genome download info
JeanMainguy Dec 8, 2023
6330da6
Merge remote-tracking branch 'origin/update_doc' into fix_rgp_out
JeanMainguy Dec 8, 2023
c0fc0e2
fix unsolved conflicts
JeanMainguy Dec 8, 2023
1783ce3
Update projection.py to use genome instead of organism
axbazin Dec 9, 2023
001ef55
fix organism variables
axbazin Dec 9, 2023
943d9f5
add Organism back
axbazin Dec 9, 2023
d8cbd5e
Merge pull request #149 from labgem/Adelme-devpatch
axbazin Dec 10, 2023
20df6a9
Slight reformulations in rgpClustering.md
axbazin Dec 10, 2023
573502c
Update practicalInformation.md
axbazin Dec 10, 2023
3f32858
Update quickWorkflow.md
axbazin Dec 10, 2023
32f6d13
Fix quickWorkflow.md display
axbazin Dec 10, 2023
f780516
Update quickWorkflow.md
axbazin Dec 10, 2023
28dba87
Update pangenomeWorkflow.md
axbazin Dec 11, 2023
e373724
Update pangenomePartition.md
ggautreau Dec 11, 2023
c3bb38a
Update pangenomeFigures.md
ggautreau Dec 11, 2023
de629a7
Update pangenomeAnnotation.md
axbazin Dec 11, 2023
ee2917e
Update pangenomeCluster.md
axbazin Dec 11, 2023
391ee71
Update pangenomeGraph.md
axbazin Dec 11, 2023
8495db9
Update pangenomeFigures.md
ggautreau Dec 11, 2023
073d71b
Update pangenomeAnnotation.md
axbazin Dec 11, 2023
1a13f06
Grammar correction and little reformat
jpjarnoux Dec 12, 2023
811a129
Update modulePrediction.md
acalteau Dec 12, 2023
a5eb9a7
Update moduleOutputs.md
acalteau Dec 12, 2023
11b4604
Update moduleOutputs.md
acalteau Dec 12, 2023
ad20fc5
Update moduleOutputs.md
acalteau Dec 12, 2023
63c2e3e
Update moduleOutputs.md
acalteau Dec 12, 2023
965f4bf
Update moduleOutputs.md
acalteau Dec 12, 2023
5758d46
Update writeGenomes.md
acalteau Dec 12, 2023
5351103
Merge pull request #151 from labgem/axbazin-pangenome-doc-review
axbazin Dec 12, 2023
2823384
Update writeGenomes.md
acalteau Dec 12, 2023
4d17f32
Update align.md
acalteau Dec 12, 2023
b98b50c
Update align.md
acalteau Dec 12, 2023
32d0c6b
Update align.md
acalteau Dec 12, 2023
b42af88
Update index.md
ggautreau Dec 12, 2023
66f832f
Update quickOutputs.md
ggautreau Dec 12, 2023
f394e3f
fix bug in panmodule argument management
JeanMainguy Dec 11, 2023
3aff346
remove module info in metrics command
JeanMainguy Dec 11, 2023
7b1c765
Move info format to yaml and improve key names
JeanMainguy Dec 12, 2023
33d86d3
convert status output to yaml
JeanMainguy Dec 12, 2023
5b2942a
harmonise yaml output and default of info is to diplay all
JeanMainguy Dec 12, 2023
82330ab
remove fix_partitioned fct
JeanMainguy Dec 12, 2023
7ce05e3
deal with empty config file
JeanMainguy Dec 12, 2023
079bf87
add the possibility to recompute the fluidity
JeanMainguy Dec 12, 2023
339d817
update the workflow
JeanMainguy Dec 12, 2023
41044c1
fix md internal link
JeanMainguy Dec 13, 2023
aa5cfcc
update description of module stat of cmd info
JeanMainguy Dec 13, 2023
2de0f03
update doc with change in info and metrics command
JeanMainguy Dec 13, 2023
9a269cd
reorganise the main help with subcommands description
JeanMainguy Dec 13, 2023
1f0d53a
Update projection.md
acalteau Dec 13, 2023
7fac0e9
Update projection.md
acalteau Dec 13, 2023
6b91098
Merge pull request #152 from labgem/metrics
jpjarnoux Dec 13, 2023
942f101
Add command usage for projection
JeanMainguy Dec 13, 2023
97f268d
fix projection example usage
JeanMainguy Dec 13, 2023
f3b7a64
Update genomicContext.md
acalteau Dec 13, 2023
6e4c792
Update genomicContext.md
acalteau Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .condarc.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/check_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check documentation

on:
push:
paths:
- 'docs/**'

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
with:
docs-folder: "docs/"
build-command: "sphinx-build -b html . build/"
# Great extra actions to compose with:
# Create an artifact of the html output.
- uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/build/
2 changes: 1 addition & 1 deletion .github/workflows/check_recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
shell: bash -l {0}
run: |
cd testingDataset/
ppanggolin all --cpu 1 --anno organisms.gbff.list -o pango
ppanggolin all --cpu 1 --anno genomes.gbff.list -o pango
ppanggolin info -p pango/pangenome.h5 --content --parameters --status
65 changes: 35 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -20,35 +19,38 @@ jobs:
python-version: ['3.8', '3.9', '3.10']
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setting up miniconda
- uses: actions/checkout@v3
# Install requirements with miniconda
- uses: conda-incubator/setup-miniconda@v2
with:
condarc-file: .condarc.yml
activate-environment: test
python-version: ${{ matrix.python-version }}
# Install the dependencies
- name: Set up test environment
channels: conda-forge,bioconda,defaults
environment-file: ppanggolin_env.yaml
activate-environment: ppanggolin

- name: Install ppanggolin
shell: bash -l {0}
run: |
conda install -y --file requirements.txt
pip install .[test]

# Check that it is installed and displays help without error
- name: Check that PPanGGOLiN is installed
shell: bash -l {0}
run: |
ppanggolin --version
ppanggolin --help

# Check that unit tests are all passing
- name: Unit tests
shell: bash -l {0}
run: pytest

# Test the complete workflow
- name: Complete workflow
shell: bash -l {0}
run: |
cd testingDataset
ppanggolin all --cpu 1 --fasta organisms.fasta.list --output mybasicpangenome
ppanggolin all --cpu 1 --fasta genomes.fasta.list --output mybasicpangenome
ppanggolin info --pangenome mybasicpangenome/pangenome.h5 --content --parameters --status
cd -
# test most options calls. If there is a change in the API somewhere that was not taken into account (whether in the options for the users, or the classes for the devs), this should fail, otherwise everything is probably good.
Expand All @@ -57,7 +59,7 @@ jobs:
shell: bash -l {0}
run: |
cd testingDataset
ppanggolin annotate --fasta organisms.fasta.list --output stepbystep --kingdom bacteria
ppanggolin annotate --fasta genomes.fasta.list --output stepbystep --kingdom bacteria
ppanggolin cluster -p stepbystep/pangenome.h5 --coverage 0.8 --identity 0.8
ppanggolin graph -p stepbystep/pangenome.h5 -r 10
ppanggolin partition --output stepbystep -f -p stepbystep/pangenome.h5 --cpu 1 -b 2.6 -ms 10 -fd -ck 500 -Kmm 3 12 -im 0.04 --draw_ICL -se $RANDOM
Expand All @@ -67,25 +69,25 @@ jobs:
ppanggolin spot -p stepbystep/pangenome.h5 --spot_graph --overlapping_match 2 --set_size 3 --exact_match_size 1
ppanggolin draw -p stepbystep/pangenome.h5 --draw_spots -o stepbystep -f
ppanggolin module -p stepbystep/pangenome.h5 --transitive 4 --size 3 --jaccard 0.86 --dup_margin 0.05
ppanggolin write_pangenome -p stepbystep/pangenome.h5 --output stepbystep -f --soft_core 0.9 --dup_margin 0.06 --gexf --light_gexf --csv --Rtab --stats --partitions --compress --json --spots --borders --families_tsv --cpu 1
ppanggolin write_genomes -p stepbystep/pangenome.h5 --output stepbystep -f --fasta organisms.fasta.list --gff --proksee --table
ppanggolin fasta -p stepbystep/pangenome.h5 --output stepbystep -f --prot_families all --gene_families shell --regions all --fasta organisms.fasta.list
ppanggolin write_pangenome -p stepbystep/pangenome.h5 --output stepbystep -f --soft_core 0.9 --dup_margin 0.06 --gexf --light_gexf --csv --Rtab --stats --partitions --compress --json --spots --regions --borders --families_tsv --cpu 1
ppanggolin write_genomes -p stepbystep/pangenome.h5 --output stepbystep -f --fasta genomes.fasta.list --gff --proksee --table
ppanggolin fasta -p stepbystep/pangenome.h5 --output stepbystep -f --prot_families all --gene_families shell --regions all --fasta genomes.fasta.list
ppanggolin draw -p stepbystep/pangenome.h5 --draw_spots --spots all -o stepbystep -f
ppanggolin metrics -p stepbystep/pangenome.h5 --genome_fluidity --info_modules --no_print_info -f --log metrics.log
ppanggolin metrics -p stepbystep/pangenome.h5 --genome_fluidity --no_print_info --recompute_metrics --log metrics.log
cd -
- name: gbff parsing and MSA computing
shell: bash -l {0}
run: |
cd testingDataset
ppanggolin workflow --cpu 1 --anno organisms.gbff.list --output myannopang
ppanggolin workflow --cpu 1 --anno genomes.gbff.list --output myannopang
ppanggolin msa --pangenome myannopang/pangenome.h5 --source dna --partition core -o myannopang/ -f --use_gene_id --phylo --single_copy
cd -
- name: clusters reading from external file
shell: bash -l {0}
run: |
cd testingDataset
ppanggolin panrgp --anno organisms.gbff.list --cluster clusters.tsv --output readclusterpang
ppanggolin annotate --anno organisms.gbff.list --output readclusters
ppanggolin panrgp --anno genomes.gbff.list --cluster clusters.tsv --output readclusterpang
ppanggolin annotate --anno genomes.gbff.list --output readclusters
ppanggolin cluster --clusters clusters.tsv -p readclusters/pangenome.h5
ppanggolin msa --pangenome readclusterpang/pangenome.h5 --partition persistent --phylo -o readclusterpang/msa/ -f
cd -
Expand Down Expand Up @@ -135,37 +137,40 @@ jobs:
run: |
cd testingDataset
ppanggolin utils --default_config panrgp -o panrgp_default_config.yaml
ppanggolin panrgp --anno organisms.gbff.list --cluster clusters.tsv -o test_config --config panrgp_default_config.yaml
ppanggolin panrgp --anno genomes.gbff.list --cluster clusters.tsv -o test_config --config panrgp_default_config.yaml
cd -
- name: testing projection cmd
shell: bash -l {0}
run: |
cd testingDataset
head organisms.gbff.list | sed 's/^/input_org_/g' > organisms.gbff.head.list
ppanggolin projection --pangenome stepbystep/pangenome.h5 -o projection_from_list_of_gbff --anno organisms.gbff.head.list --gff --proksee
head genomes.gbff.list | sed 's/^/input_genome_/g' > genomes.gbff.head.list
ppanggolin projection --pangenome stepbystep/pangenome.h5 -o projection_from_list_of_gbff --anno genomes.gbff.head.list --gff --proksee


ppanggolin projection --pangenome mybasicpangenome/pangenome.h5 -o projection_from_single_fasta \
--organism_name chlam_A --fasta FASTA/GCF_002776845.1_ASM277684v1_genomic.fna.gz \
--genome_name chlam_A --fasta FASTA/GCF_002776845.1_ASM277684v1_genomic.fna.gz \
--spot_graph --graph_formats graphml --fast --keep_tmp -f --add_sequences --gff --proksee --table --add_metadata

ppanggolin projection --pangenome mybasicpangenome/pangenome.h5 -o projection_from_gff_prodigal \
--genome_name chlam_annotated_with_prodigal --anno GBFF/GCF_003788785.1_ct114V1_genomic_prodigal_annotation.gff.gz \
--gff --table

- name: testing write_genome_cmds
shell: bash -l {0}
run: |
cd testingDataset
head organisms.gbff.list | cut -f1 > organisms_names.gbff.head.list
head genomes.gbff.list | cut -f1 > genome_names.gbff.head.list

ppanggolin write_genomes -p myannopang/pangenome.h5 --output flat_genomes_from_file_org -f \
--anno organisms.gbff.list --gff --table --organisms organisms_names.gbff.head.list
ppanggolin write_genomes -p myannopang/pangenome.h5 --output flat_genomes_from_genome_files -f \
--anno genomes.gbff.list --gff --table --genomes genome_names.gbff.head.list

ppanggolin write_genomes -p stepbystep/pangenome.h5 --output flat_genomes_from_cmdline_orgs --proksee \
--organisms GCF_006508185.1_ASM650818v1_genomic,GCF_002088315.1_ASM208831v1_genomic
ppanggolin write_genomes -p stepbystep/pangenome.h5 --output flat_genomes_from_cmdline_genomes --proksee \
--genomes GCF_006508185.1_ASM650818v1_genomic,GCF_002088315.1_ASM208831v1_genomic

head organisms.fasta.list | cut -f1 > organisms_names.fasta.head.list
head genomes.fasta.list | cut -f1 > genome_names.fasta.head.list
# Default separator is a pipe but a pipe is found in a value of metadata db1. That is why we use another separator here.
ppanggolin write_genomes -p mybasicpangenome/pangenome.h5 --output mybasicpangenome/genomes_outputs \
--organisms organisms_names.fasta.head.list \
--genomes genome_names.fasta.head.list \
-f --gff --add_metadata --table --metadata_sep §

# Pipe separatore is found in metadata source db1. if we don't require this source then the writting with pipe is work fine.
Expand Down
Binary file added docs/_static/tutorial/U-shape.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/tutorial/tile_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/api/ppanggolin.formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
:show-inheritance:
```

## ppanggolin.formats.writeAnnotations module

```{eval-rst}
.. automodule:: ppanggolin.formats.writeAnnotations
:members:
:undoc-members:
:show-inheritance:
```

## ppanggolin.formats.writeBinaries module

```{eval-rst}
Expand Down Expand Up @@ -56,6 +65,15 @@
:show-inheritance:
```

## ppanggolin.formats.write_proksee module

```{eval-rst}
.. automodule:: ppanggolin.formats.write_proksee
:members:
:undoc-members:
:show-inheritance:
```

## Module contents

```{eval-rst}
Expand Down
4 changes: 2 additions & 2 deletions docs/api/ppanggolin.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ppanggolin-api)=
# PPanGGOLiN Package
# ppanggolin package

## Subpackages

Expand All @@ -19,6 +18,7 @@ ppanggolin.meta
ppanggolin.metrics
ppanggolin.mod
ppanggolin.nem
ppanggolin.projection
ppanggolin.utility
ppanggolin.workflow
```
Expand Down
21 changes: 21 additions & 0 deletions docs/api/ppanggolin.projection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ppanggolin.projection package

## Submodules

## ppanggolin.projection.projection module

```{eval-rst}
.. automodule:: ppanggolin.projection.projection
:members:
:undoc-members:
:show-inheritance:
```

## Module contents

```{eval-rst}
.. automodule:: ppanggolin.projection
:members:
:undoc-members:
:show-inheritance:
```
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
'sphinx_search.extension',
]

# Prefix document path to section labels, to use:
# `path/to/file:heading` instead of just `heading`
autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
34 changes: 17 additions & 17 deletions docs/dev/buildDoc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build the documentation
This partdescribe the guidelines to build the documentation of PPanGGOLiN.

```{danger}
```{warning}
When you will merge or pull request your branch on master, a bot from readthedoc will see it and update the doc online.
Be sure that your doc is clean and without error.
```
Expand All @@ -16,20 +16,20 @@ readthedocs-sphinx-search==0.3.1
sphinx-autobuild==2021.3.14
myst-parser==1.0.0
```
To build the doc you need to use an environment with panorama installed.
To build the doc you need to use an environnement with ppanggolin installed.
To make think easier [pyproject.toml file](../../pyproject.toml) contain the same list of requirement
and can install everything automatically with pip.
```shell
# PANORAMA=/path/to/panorama/
pip install $PANORAMA[doc] # You can add -e to install in editable mode
# PPanGGOLiN=/path/to/ppanggolin/
pip install $PPanGGOLiN[doc] # You can add -e to install in editable mode
```
## Build documentation with sphinx

You can look at your modification in live by using **sphinx-autobuild** (installed previously).

```shell
cd $PANORAMA/.docs
sphinx-autobuild source/ build/
cd $PPanGGOLiN/docs
sphinx-autobuild . build/
#copy server adresse, for me (as example) http://127.0.0.1:8000
#paste the adresse in your browser
```
Expand Down Expand Up @@ -70,9 +70,9 @@ The API documentation is build automatically.
To update the API documentation and keep the automatic update when a new package, module, submodules is added follow the
next lines:
```shell
sphinx-apidoc -o api $PANORAMA/panorama -f
sphinx-apidoc -o api $PPanGGOLiN/ppanggolin -f
```
```{attention}
```{warning}
*sphinx-apidoc* will generate ReStructeredText files. You need to convert them in markdown. For this follow the guides
[here](#rst2md)
```
Expand Down Expand Up @@ -113,14 +113,14 @@ sphinx-quickstart $DOCS
#https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
#> Project language [en]:
#
#Creating file /home/jarnoux/Projects/PANORAMA/docs_scratch/source/conf.py.
#Creating file /home/jarnoux/Projects/PANORAMA/docs_scratch/source/index.rst.
#Creating file /home/jarnoux/Projects/PANORAMA/docs_scratch/Makefile.
#Creating file /home/jarnoux/Projects/PANORAMA/docs_scratch/make.bat.
#Creating file /your/path/PPanGGOLiN/docs_scratch/source/conf.py.
#Creating file /your/path/Projects/PPanGGOLiN/docs_scratch/source/index.rst.
#Creating file /your/path/Projects/PPanGGOLiN/docs_scratch/Makefile.
#Creating file /your/path/Projects/PPanGGOLiN/docs_scratch/make.bat.
#
#Finished: An initial directory structure has been created.
#
#You should now populate your master file /home/jarnoux/Projects/PANORAMA/docs_scratch/source/index.rst and create other documentation
#You should now populate your master file /home/jarnoux/Projects/PPanGGOLiN/docs_scratch/source/index.rst and create other documentation
#source files. Use the Makefile to build the docs, like so:
# make builder
#where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
Expand Down Expand Up @@ -205,7 +205,7 @@ For this case we will need to install a new package `rst-to-myst`.
pip install rst-to-myst[sphinx]
# Go to your environment with rst2myst
rst2myst convert source/index.rst
# Go back to your environment with panorama
# Go back to your environment with ppanggolin
rm source/index.rst
```
#### README in index.md
Expand All @@ -224,7 +224,7 @@ The user documentation is completely handwritten. Moreover, we advise respecting
1. One file per topic/command with an explicit text on the feature
2. One file for the installation guidelines
3. One file on how to report issue or enhancement
4. Don't ref to any function in the panorama code. This is reserved for developper documentation
4. Don't ref to any function in the ppanggolin code. This is reserved for developper documentation

#### Developper documentation
The developper documentation is handwritten too. We advise respecting the following guidelines:
Expand All @@ -238,13 +238,13 @@ The developper documentation is handwritten too. We advise respecting the follow
#### API documentation
To build the API documentation and use the docstring in code, you can use the command `sphinx-apidoc` as follows:
```shell
sphinx-apidoc -o api $PANORAMA/panorama
sphinx-apidoc -o api $PPanGGOLiN/ppanggolin
# Go to your environment with rst2myst
rst2myst convert api/*.rst
# Go back to your environment with sphinx
rm api/*.rst
```
You have now documentation for PPanGGOLiN api. To ref api in your doc you can paste **\{ref\}\`package panorama\`**
You have now documentation for PPanGGOLiN api. To ref api in your doc you can paste **\{ref\}\`package ppanggolin\`**

```{tip}
With the "sphinx.ext.autosectionlabel", you will certainly get multiple warning for duplicate label.
Expand Down
Loading
Loading