diff --git a/.github/workflows/mkdocs-deploy.yaml b/.github/workflows/mkdocs-deploy.yaml new file mode 100644 index 0000000..323dd50 --- /dev/null +++ b/.github/workflows/mkdocs-deploy.yaml @@ -0,0 +1,18 @@ +name: Publish docs via GitHub Pages +on: + push: + branches: + - main + +jobs: + build: + name: Deploy docs + runs-on: ubuntu-latest + steps: + - name: Checkout master + uses: actions/checkout@v1 + + - name: Deploy docs + uses: mhausenblas/mkdocs-deploy-gh-pages@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sphinx_docs_to_gh_pages.yaml b/.github/workflows/sphinx_docs_to_gh_pages.yaml deleted file mode 100644 index 7550757..0000000 --- a/.github/workflows/sphinx_docs_to_gh_pages.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Source : https://github.com/marketplace/actions/sphinx-docs-to-github-pages -name: Sphinx docs to gh-pages - -on: - pull_request: - branches: - - main - # Uncomment if only tagged releases are to have documentation built - # tags: - # - v* - workflow_dispatch: # Uncomment line if you also want to trigger action manually - -jobs: - sphinx_docs_to_gh-pages: - runs-on: ubuntu-latest - name: Sphinx docs to gh-pages - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Installing the Documentation requirements - run: | - pip3 install .[docs] - - name: Running Sphinx to gh-pages Action - # Uncomment if only tagged releases are to have documentation built - # if: startsWith(github.ref, 'refs/tags') - uses: ns-rse/action-sphinx-docs-to-gh-pages@main - with: - # When testing set this branch to your branch, when working switch to main. It WILL fail if not - # defined as it defaults to 'main'. - branch: main - dir_docs: docs - sphinx-apidoc-exclude: "../*setup* ../*tests* ../*.ipynb ../demo.py ../make_baseline.py ../jupyter_notebook_config.py ../demo_ftrs.py" - sphinx-apidoc-opts: "--separate -o . ../" - sphinx-opts: "" - multiversion: true - multiversionopts: "source build" - - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 - timeout-minutes: 15 diff --git a/.gitignore b/.gitignore index ba6b857..e59d11d 100644 --- a/.gitignore +++ b/.gitignore @@ -176,4 +176,6 @@ cython_debug/ .dir-locals.el # pytest-testmon -.testmon* \ No newline at end of file +.testmon* + +tmp/ \ No newline at end of file diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index c068ea3..f4c7a93 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -15,6 +15,7 @@ globs: ignores: - "tmp/**/*.md" + - "docs/api/**/*.md" # Fix any fixable errors fix: true diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..24365c6 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,8 @@ +# API + +- [`io`](api/io.md) +- [`isoslam`](api/isoslam.md) +- [`logging`](api/logging.md) +- [`processing`](api/processing.md) +- [`summary`](api/summary.md) +- [`utils`](api/utils.md) diff --git a/docs/api/io.md b/docs/api/io.md new file mode 100644 index 0000000..3996491 --- /dev/null +++ b/docs/api/io.md @@ -0,0 +1,9 @@ +# IO Modules + +::: isoslam.io +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/api/isoslam.md b/docs/api/isoslam.md new file mode 100644 index 0000000..9b750b8 --- /dev/null +++ b/docs/api/isoslam.md @@ -0,0 +1,11 @@ +# IsoSLAM + +This module contains the main functions that constitute the IsoSLAM package. + +::: isoslam.isoslam +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/api/logging.md b/docs/api/logging.md new file mode 100644 index 0000000..e1b1012 --- /dev/null +++ b/docs/api/logging.md @@ -0,0 +1,11 @@ +# Logging + +This module handles logging setup. + +::: isoslam.logging +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/api/processing.md b/docs/api/processing.md new file mode 100644 index 0000000..5ed126c --- /dev/null +++ b/docs/api/processing.md @@ -0,0 +1,9 @@ +# Processing + +::: isoslam.processing +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/api/summary.md b/docs/api/summary.md new file mode 100644 index 0000000..ff96475 --- /dev/null +++ b/docs/api/summary.md @@ -0,0 +1,9 @@ +# Summary + +::: isoslam.summary +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/api/utils.md b/docs/api/utils.md new file mode 100644 index 0000000..b9da302 --- /dev/null +++ b/docs/api/utils.md @@ -0,0 +1,11 @@ +# Utils + +This module contains various utilities used within the package. + +::: isoslam.utils +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true diff --git a/docs/source/contributing.md b/docs/contributing.md similarity index 98% rename from docs/source/contributing.md rename to docs/contributing.md index a7c5443..364b7d6 100644 --- a/docs/source/contributing.md +++ b/docs/contributing.md @@ -59,7 +59,7 @@ pip install --no-cache-dir -e .[docs,dev] ## Git [Git][git] is used to version control development of the package. The `main` branch on GitHub and the [pre-commit -hooks](contributing#pre-commit) have protections in place that prevent committing/pushing directly to the `main` +hooks](#pre-commit) have protections in place that prevent committing/pushing directly to the `main` branch. This means you should create a branch to undertake development or fix bugs. ### Issues diff --git a/docs/extending.md b/docs/extending.md new file mode 100644 index 0000000..8d78c41 --- /dev/null +++ b/docs/extending.md @@ -0,0 +1,247 @@ +# Extending IsoSLAM + + + +The modular nature of IsoSLAM and its use of `ruffus` and `cgat` mean that it is relatively straight-forward to add +additional steps or processing. + +## Overview + +1. Add a new module to `isoslam/.py` and write functions, include [numpydoc + strings](https://numpydoc.readthedocs.io/en/latest/format.html) so the functions/classes are documented. +2. Add all options to `isoslam/default_config.yaml`. +3. Add a `sub-parser` to `isoslam/processing.py` with command line options for all arguments to your function. +4. Add a `process_` function to `isoslam/processing.py`. +5. Add an entry to the documentation to build the API documentation automatically. + +By way of example the implementation of the `isoslam summary` sub-command is explained. + +## Adding a module + +This is probably the most flexible part, you can add the module as you see fit. You can use Object Orientated approach +and write a class or classes or functional programming and a series. + +However you will need a single function that takes the input and various options. + +### Example + +The `summary` module appends multiple files produced from running IsoSLAM on a series of inputs and appends the +data. These are then summarised by a set of variables to give the number of counts. + +#### `isoslam/summary.py` + +```python +"""Functions for summarising output.""" + +import pandas as pd + +from isoslam import io + + +def append_files(pattern: str = "**/*.tsv", separator: str = "\t") -> pd.DataFrame: + """ + Append a set of files into a Pandas DataFrames. + + Parameters + ---------- + pattern : str + File name pattern to search for. + separator : str + Separator/delimiter used in files. + + Returns + ------- + pd.DataFrame + A Pandas DataFrames of each file found. + """ + _data = io.load_files(pattern, separator) + all_data = [data.assign(filename=key) for key, data in _data.items()] + return pd.concat(all_data) + + +def summary_counts( + file_pattern: str = "**/*.tsv", + separator: str = "\t", + groupby: list[str] | None = None, + dropna: bool = True, +) -> pd.DataFrame: + """ + Count the number of assigned read pairs. + + Groups the data by + + Parameters + ---------- + file_pattern : str + File name pattern to search for. + separator : str + Separator/delimiter used in files. + groupby : list[str] + List of variables to group the counts by. + dropna : book + Whether to drop rows with ``NA`` values. + + Returns + ------- + pd.DataFrame + A Pandas DataFrames of each file found. + """ + if groupby is None: + groupby = [ + "Transcript_id", + "Chr", + "Strand", + "Start", + "End", + "Assignment", + "Conversions", + "filename", + ] + _data = append_files(file_pattern, separator) + _data["one_or_more_conversion"] = _data["Conversions"] >= 1 + groupby.append("one_or_more_conversion") + return _data.value_counts(subset=groupby, dropna=dropna).reset_index() +``` + +This included writing a function to search for files with a given `pattern` and load them using the specified +`separator`. As this is an Input/Output operation the functions were added to the `isoslam/io.py` module. + +### `io.py` + +```python +def _find_files(pattern: str = "**/*.tsv") -> Generator: # type: ignore[type-arg] + """ + Find files that match the given pattern. + + Parameters + ---------- + pattern : str + Pattern (regular expression) of files to search for. + + Returns + ------- + Generator[_P, None, None] + A generator of files found that match the given pattern. + """ + pwd = Path.cwd() + return pwd.rglob(pattern) + + +def load_files(pattern: str = "**/*.tsv", sep: str = "\t") -> dict[str, pd.DataFrame]: + """ + Read a set of files into a list of Pandas DataFrames. + + Parameters + ---------- + pattern : str + File name pattern to search for. + sep : str + Separator/delimiter used in files. + + Returns + ------- + list[pd.DataFrame] + A list of Pandas DataFrames of each file found. + """ + return {x.stem: pd.read_csv(x, sep=sep) for x in _find_files(pattern)} +``` + +## Add options to `isoslam/default_config.yaml` + +We want to be consistent across the configuration file, which resides in `isoslam/default_config.yaml` and is used when +generating configurations using `isoslam create-config`. To do so the function parameters, in this example +`summary_counts()`, should be used as entries in the `isoslam/default_config.yaml`. + +### Example + +The top level of a modules configuration should match the module name, here `summary_counts`. Each entry is a key/value +pair that corresponds to the arguments of the function, and so we have `file_pattern`, `separator`, `groupby` and +`output` with their various options. + +```yaml +summary_counts: + file_pattern: "**/*.tsv" + separator: "\t" + groupby: + - Transcript_id + - Chr + - Strand + - Start + - End + - Assignment + - Conversions + - filename + output: + outfile: summary_counts.tsv + sep: "\t" + index: false +``` + +## Add a sub-parser to `isoslam/processing.py` + +The function `create_parser()` is responsible for creating the `isoslam` arguments and sub-parsers and their associated +arguments. + +Define a sub-parser and `add_argument()` for each option that is available. Keep names consistent with the arguments of +the main function you have written above and in turn the configuration values in `isoslam/default_config.yaml`. + +### Example + +```python +# Summarise counts sub-parser +summary_counts_parser = subparsers.add_parser( + "summary-counts", + description="Summarise the counts.", + help="Summarise the counts.", +) +summary_counts_parser.add_argument( + "--file-pattern", + dest="file_pattern", + type=str, + required=False, + default="*_summarized.tsv", + help="Regular expression for summarized files to process.", +) +summary_counts_parser.add_argument( + "--outfile", + dest="outfile", + type=Path, + required=False, + default="summary_counts.tsv", + help="Output filename to save results to, will be nested under 'output_dir'.", +) +summary_counts_parser.add_argument( + "--separator", + dest="sep", + type=str, + required=False, + default="\t", + help="Field separator to use in output file, default is '\t' but other values (e.g. ',' are allowed).", +) +summary_counts_parser.set_defaults(func=summarise_counts) +``` + +The last line here `.set_defaults(func=summarise_counts)` is the function that will be called when running the +subcommand and corresponds to the function + +## Documentation + +To have the documentation automatically built from the docstrings you have written for your functions you need to add a +`docs/api/.md` that corresponds to each of the modules you have introduced and add a title, short description +and `::: isoslam.`. If you have introduced more than one module then you will have to add a corresponding +file for each module/sub-module you have introduced. If these are nested please mirror the nesting structure in the +documentation. + +### Example + +```markdown +# Summary + +::: isoslam.summary +handler: python +options: +docstring_style: +numpy +rendering: +show_signature_annotations: true +``` diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..0106f1b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,9 @@ +# Welcome to IsoSLAM + +- [Introduction](introduction.md) +- [Installation](installation.md) +- [Usage](usage.md) +- [Workflow](workflow.md) +- [Contributing](contributing.md) +- [Extending](extending.md) +- [API](api.md) diff --git a/docs/source/installation.md b/docs/installation.md similarity index 100% rename from docs/source/installation.md rename to docs/installation.md diff --git a/docs/source/introduction.md b/docs/introduction.md similarity index 100% rename from docs/source/introduction.md rename to docs/introduction.md diff --git a/docs/source/_templates/versioning.html b/docs/source/_templates/versioning.html deleted file mode 100644 index 7c5ab14..0000000 --- a/docs/source/_templates/versioning.html +++ /dev/null @@ -1,8 +0,0 @@ -{% if versions %} -

{{ _('Versions') }}

- -{% endif %} diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 7fb7a5d..0000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,221 +0,0 @@ -# -# Configuration file for the Sphinx documentation builder. -# -# This file does only contain a selection of the most common options. For a -# full list see the documentation: -# http://www.sphinx-doc.org/en/master/config - -# -- Path setup -------------------------------------------------------------- - -# 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. -# -import sys -from importlib.metadata import version -from pathlib import Path - -sys.path.insert(0, Path("..").resolve()) - -# Mock imports (things that can't be installed at do building time) - -autodoc_mock_imports = ["numpy", "pandas", "matplotlib", "seaborn", "scipy", "skimage"] - -# -- Project information ----------------------------------------------------- - -project = "IsoSLAM" -copyright = "2024, IsoSLAM authors" -author = "IsoSLAM authors" - -# The short X.Y version -release = version("isoslam") -# for example take major/minor -version = ".".join(release.split(".")[:2]) - - -# -- General configuration --------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "autoapi.extension", - "sphinx.ext.autodoc", - "sphinx.ext.viewcode", - "sphinx.ext.githubpages", - "sphinx.ext.coverage", - "sphinx.ext.mathjax", - "sphinx.ext.napoleon", - "sphinx_rtd_theme", - "myst_parser", - "numpydoc", - "sphinx_markdown_tables", - "sphinx_multiversion", - "sphinxcontrib.mermaid", -] - - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -html_sidebars = { - "**": [ - "versioning.html", - ], -} - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = {".rst": "restructuredtext", ".txt": "restructuredtext", ".md": "markdown"} - -# The master toctree document. -master_doc = "index" - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = "en" - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = None - -# -- Options for MyST-parser ------------------------------------------------- -myst_heading_anchors = 3 - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = "sphinx_rtd_theme" -html_theme = "pydata_sphinx_theme" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] -html_css_files = ["custom.css"] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', -# 'searchbox.html']``. -# -# html_sidebars = {} - - -# -- Options for HTMLHelp output --------------------------------------------- - -# Output file base name for HTML help builder. -htmlhelp_basename = "IsoSLAMdoc" - - -# -- Options for LaTeX output ------------------------------------------------ - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, "IsoSLAM.tex", "IsoSLAM Documentation", "IsoSLAM Authors", "manual"), -] - - -# -- Options for manual page output ------------------------------------------ - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "IsoSLAM", "IsoSLAM Documentation", [author], 1)] - - -# -- Options for Texinfo output ---------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - master_doc, - project, - "IsoSLAM Documentation", - author, - project, - "Processing SLAMSeq data.", - "Miscellaneous", - ), -] - - -# -- Options for Epub output ------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ["search.html"] - - -# -- Extension configuration ------------------------------------------------- -numpydoc_class_members_toctree = False - -# sphinx-autoapi https://sphinx-autoapi.readthedocs.io/en/latest/ -autoapi_dirs = ["../"] - -# sphinx-multiversion https://holzhaus.github.io/sphinx-multiversion/master/configuration.html -smv_tag_whitelist = r"^v\d+.*$" # Tags beginning with v# -smv_branch_whitelist = r"^(main)$" # main branch -# If testing changes locally comment out the above and use the smv_branch_whitelist below instead. Replace the branch -# name you are working on ("ns-rse/14-sphinx-docs" in the example below) with the branch you are working on and run... -# -# cd docs -# sphinx-multiversion . _build/html -# -# smv_branch_whitelist = r"^(ns-rse/14-sphinx-docs)$" # main branch -smv_released_pattern = r"^tags/.*$" # Tags only -# smv_released_pattern = r"^(/.*)|(main).*$" # Tags and HEAD of main -smv_outputdir_format = "{ref.name}" diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 662bb87..0000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -IsoSLAM documentation -===================== - - -.. toctree:: - :maxdepth: 1 - :caption: Topics: - - introduction - installation - usage - contributing - workflow - -.. toctree:: - :maxdepth: 1 - :caption: API - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/source/usage.md b/docs/usage.md similarity index 100% rename from docs/source/usage.md rename to docs/usage.md diff --git a/docs/source/workflow.md b/docs/workflow.md similarity index 95% rename from docs/source/workflow.md rename to docs/workflow.md index 3f77adf..e079854 100644 --- a/docs/source/workflow.md +++ b/docs/workflow.md @@ -5,9 +5,6 @@ This page gives an overview of the workflow undertaken by IsoSLAM. **WORK IN PROGRESS** - This is very much a work in progress and is not yet complete. Contributions are welcome. ```{mermaid} -%%{init: {'theme': 'base', 'gitGraph': {'rotateCommitLabel': true} - } -}%% graph TD; subgraph input diff --git a/isoslam/io.py b/isoslam/io.py index e9586ca..1dad04f 100644 --- a/isoslam/io.py +++ b/isoslam/io.py @@ -1,4 +1,4 @@ -"""Module for reading files.""" +"""Module for reading and writing files.""" import argparse import gzip @@ -192,17 +192,10 @@ def load_file(file_path: str | Path) -> Any: Supports the following file types... - +----------+--------------------------------------------------------------------------+ - | File | Description | - +==========+==========================================================================+ - | ``.bam`` | The sequence data that is to be analysed. | - +----------+--------------------------------------------------------------------------+ - | ``.bed`` | The locations of introns/splice junctions. | - +----------+--------------------------------------------------------------------------+ - | ``.gtf`` | Transcript structures from which the ``.bed`` file is derived. | - +----------+--------------------------------------------------------------------------+ - | ``.vcf`` | Locations of known sequences difference from the reference sequence. | - +----------+--------------------------------------------------------------------------+ + * ``.bam`` - The sequence data that is to be analysed. + * ``.bed`` - The locations of introns/splice junctions. + * ``.gtf`` - Transcript structures from which the ``.bed`` file is derived. + * ``.vcf`` - Locations of known sequences difference from the reference sequence. Parameters ---------- diff --git a/isoslam/isoslam.py b/isoslam/isoslam.py index 428d6e8..9852f99 100644 --- a/isoslam/isoslam.py +++ b/isoslam/isoslam.py @@ -24,7 +24,7 @@ def extract_transcripts(bed_file: str | Path) -> dict[Any, list[tuple[Any, int, ------- dict[Any, list[tuple[Any, int, int, Any, Any]]] Dictionary of ``chromosome``, ``start``, ``end``, ``transcript_id`` and ``bedstrand`` indexed by - ``transcript_id``. + ``transcript_id``. """ coordinates = defaultdict(list) for line in io.load_file(bed_file): diff --git a/isoslam/logging.py b/isoslam/logging.py index 4645c4a..48cd461 100644 --- a/isoslam/logging.py +++ b/isoslam/logging.py @@ -1,4 +1,4 @@ -"""Configure logging.""" +"""Setup and configure logging.""" import sys diff --git a/isoslam/processing.py b/isoslam/processing.py index f637fd8..ee0ab73 100644 --- a/isoslam/processing.py +++ b/isoslam/processing.py @@ -1,4 +1,4 @@ -"""Functions for Processing.""" +"""Entry point, sub-parsers and arguments and processing functions.""" import argparse as arg import sys diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..fbbf5c1 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,38 @@ +site_name: IsoSLAM +site_url: https://sudlab.github.io/IsoSLAM/ +repo_url: https://github.com/sudlab/IsoSLAM/ +theme: + name: material +nav: + - Home: index.md + - Introduction: introduction.md + - Installation: installation.md + - Usage: usage.md + - Workflow: workflow.md + - Contributing: contributing.md + - Extending: extending.md + - API: + - IO: api/io.md + - Isoslam: api/isoslam.md + - Logging: api/logging.md + - Processing: api/processing.md + - Summary: api/summary.md + - Utils: api/utils.md + +extra: + version: + provider: mike + +plugins: + - mermaid2 + - search + - mkdocstrings + +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences diff --git a/pyproject.toml b/pyproject.toml index 4f73d82..785f160 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,16 +59,10 @@ tests = [ "syrupy", ] docs = [ - "Sphinx", - "myst_parser", - "numpydoc", - "pydata_sphinx_theme", - "sphinx-autoapi", - "sphinx-multiversion", - "sphinx_markdown_tables", - "sphinx_rtd_theme", - "sphinxcontrib-mermaid", - "sphinxcontrib-napoleon", + "mkdocs", + "mkdocs-material", + "mkdocs-mermaid2-plugin", + "mkdocstrings[python]", ] dev = [ "black",