Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:
pixi run -e docs docs-html
echo "DOC_VERSION=$(pixi run --locked -e docs python -c 'from workflowpy import __version__ as v; print("dev" if "dev" in v else "v"+v.replace(".dev",""))')" >> $GITHUB_ENV

# - name: Upload to GitHub Pages
# if: ${{ github.event_name != 'pull_request' && !github.event.act }}
# uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/_build/html
# exclude_assets: .buildinfo,_sources/*,_examples/*.ipynb
# destination_dir: ./${{ env.DOC_VERSION }}
# keep_files: false
# full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages
- name: Upload to GitHub Pages
if: ${{ !github.event.act }}
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
exclude_assets: .buildinfo,_sources/*,_examples/*.ipynb
destination_dir: ./${{ env.DOC_VERSION }}
keep_files: false
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages
26 changes: 26 additions & 0 deletions docs/_static/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions docs/_templates/autosummary/class_pydantic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:member-order: bysource
:class-doc-from: class

{% block methods %}
{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:nosignatures:
{% for item in methods %}
{% if item not in inherited_members %}
{%- if not item.startswith('_') %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endif %}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
{% if item not in inherited_members %}
~{{ name }}.{{ item }}
{%- endif %}
{%- endfor %}
{% endif %}
{% endblock %}
4 changes: 4 additions & 0 deletions docs/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}
:members:
7 changes: 0 additions & 7 deletions docs/api.rst

This file was deleted.

55 changes: 55 additions & 0 deletions docs/api/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.. currentmodule:: workflowpy

.. raw:: html

<style>
/* Default (light mode) */
html[data-theme="light"] h2 {
border-bottom: 1px solid #000;
}
/* Dark mode */
html[data-theme="dark"] h2 {
border-bottom: 1px solid #d1d5db;
}
</style>

.. _api_core:

Core functionality
==================
These are the core functions & classes of workflowpy.

Workflow
--------

.. autosummary::
:toctree: ../_generated
:template: autosummary/class_pydantic.rst
:nosignatures:

Workflow
WorkflowConfig

Rule
----

.. autosummary::
:toctree: ../_generated
:template: autosummary/class_pydantic.rst
:nosignatures:

Rule
Wildcards

Method
------

.. autosummary::
:toctree: ../_generated
:template: autosummary/class_pydantic.rst
:nosignatures:

Method
ExpandMethod
ReduceMethod
Parameters
29 changes: 29 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _api_index:

=============
API reference
=============

This is the API reference of workflowpy.


.. list-table::
:widths: 30 70
:header-rows: 1

* - Section
- Information
* - :ref:`api_core`
- All core functionality of workflowpy
* - :ref:`api_methods`
- The built-in methods
* - :ref:`api_utils`
- The utiliy functions

.. toctree::
:maxdepth: 1
:hidden:

core.rst
methods.rst
utils.rst
42 changes: 42 additions & 0 deletions docs/api/methods.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.. currentmodule:: workflowpy.methods

.. raw:: html

<style>
/* Default (light mode) */
html[data-theme="light"] h2 {
border-bottom: 1px solid #000;
}
/* Dark mode */
html[data-theme="dark"] h2 {
border-bottom: 1px solid #d1d5db;
}
</style>

.. _api_methods:

Methods
=======
These are the built-in methods of workflowpy.

Script Method
---------------------

Python scripts can directly be added to a workflow using the `ScriptMethod` class.

.. autosummary::
:toctree: ../_generated
:template: autosummary/class.rst

script.ScriptMethod

Script Method parameters
~~~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: ../_generated
:template: autosummary/class.rst

script.ScriptInput
script.ScriptOutput
script.ScriptParams
29 changes: 29 additions & 0 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. currentmodule:: workflowpy

.. raw:: html

<style>
/* Default (light mode) */
html[data-theme="light"] h2 {
border-bottom: 1px solid #000;
}
/* Dark mode */
html[data-theme="dark"] h2 {
border-bottom: 1px solid #d1d5db;
}
</style>

.. _api_utils:

Utility
=======
These are the utility functions of workflowpy.

Logging
-------

.. autosummary::
:toctree: ../_generated

log.setuplog
log.add_filehandler
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def remove_dir_content(path: str) -> None:
source_suffix = ".rst"
templates_path = ["_templates"]

exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "links.rst"]
language = "en"
master_doc = "index"
pygments_style = "sphinx"
Expand All @@ -89,8 +89,8 @@ def remove_dir_content(path: str) -> None:
}

html_css_files = ["theme.css"]
# html_favicon = "_static/icon.svg"
# html_logo = "_static/icon.svg"
html_favicon = "_static/icon.svg"
html_logo = "_static/icon.svg"
html_show_sourcelink = False
html_static_path = ["_static"]
html_theme = "pydata_sphinx_theme"
Expand Down Expand Up @@ -128,6 +128,11 @@ def remove_dir_content(path: str) -> None:

remove_from_toctrees = ["_generated/*"]

# Add information to the back of every page
rst_epilog = ""
with open("links.rst") as f:
rst_epilog += f.read()

# -- Options for manual page output ---------------------------------------

man_pages = [(master_doc, "workflowpy", "workflowpy Documentation", [author], 1)]
Expand Down
1 change: 0 additions & 1 deletion docs/dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ These pages provide guidelines on how to contribute to workflowpy.
Furthermore it informs you on planned developments and new features.

.. toctree::
:caption: Table of Contents
:maxdepth: 2
:hidden:

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:titlesonly:
:hidden:

setup_guide/index.rst
overview/index.rst
user_guide/index.rst
api.rst
api/index.rst
dev/index.rst
2 changes: 2 additions & 0 deletions docs/links.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. _SnakeMake: https://snakemake.readthedocs.io/en/stable/
.. _CWL: https://www.commonwl.org/
50 changes: 50 additions & 0 deletions docs/overview/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. _overview_index:

===============
Getting started
===============

.. grid:: 2
:gutter: 1

.. grid-item-card::
:text-align: center
:link: overview_install_guide
:link-type: ref

:octicon:`gear;10em`
+++
Installation guide

.. grid-item-card::
:text-align: center
:link: user_guide_index
:link-type: ref

:octicon:`book;10em`
+++
User guide

.. grid-item-card::
:text-align: center
:link: user_guide_examples
:link-type: ref

:octicon:`graph;10em`
+++
Examples

.. grid-item-card::
:text-align: center
:link: api_index
:link-type: ref

:octicon:`list-unordered;10em`
+++
API reference

.. toctree::
:maxdepth: 2
:hidden:

install.rst
4 changes: 4 additions & 0 deletions docs/overview/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _overview_install_guide:

Installation guide
==================
5 changes: 0 additions & 5 deletions docs/setup_guide/index.rst

This file was deleted.

4 changes: 4 additions & 0 deletions docs/user_guide/create.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _user_guide_create:

Create your own
===============
4 changes: 4 additions & 0 deletions docs/user_guide/example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. _user_guide_examples:

Examples
========
Loading
Loading