.. include:: ../api.rst

.. _api.module:

The showyourwork module
-----------------------

.. automodule:: showyourwork
   :members:
   :show-inheritance:
   :undoc-members:

.. toctree::
   :maxdepth: 5

   showyourwork.cli
   showyourwork.exceptions

.. toctree::
   :maxdepth: 5

   showyourwork.config
   showyourwork.git
   showyourwork.gitapi
   showyourwork.logging
   showyourwork.overleaf
   showyourwork.patches
   showyourwork.paths
   showyourwork.subproc
   showyourwork.userrules
   showyourwork.zenodo

.. _api.scripts:

Snakemake workflow scripts
--------------------------


These files are located in ``showyourwork/workflow/scripts`` and are executed
from the Snakemake rules defined in ``showyourwork/workflow/rules``.
They do the heavy lifting for the pipeline, including generating the article
graph in the preprocessing step, downloading and extracting Zenodo datasets,
and building the article PDF.


.. toctree::
   :maxdepth: 5

   arxiv
   compile_setup
   copy_and_fix_synctex
   download
   extract
   preprocess
   render_dag

.. _api.rules:

Snakemake rules
---------------


These files are located in ``showyourwork/workflow/rules`` and contain the
main Snakemake rules for the pipeline. These rules either execute simple
shell commands (like running Python scripts to generate figures) or call
the scripts in ``showyourwork/workflow/scripts`` to perform more complex
pipeline tasks.


.. toctree::
   :maxdepth: 5

   common.smk
   zenodo.smk
   compile.smk
   figure.smk
   render_dag.smk
   preprocess.smk
   arxiv.smk
   dag.smk

.. _api.snakefiles:

Snakefiles
----------


These are the two Snakefiles that control the pipeline. These Snakefiles
import all of the Snakemake rules defined in ``showyourwork/workflow/rules``,
parse the user config, ingest the user's custom Snakefile, etc.


.. toctree::
   :maxdepth: 5

   build.smk
   prep.smk

.. _api.integrationtests:

Integration tests
-----------------


Integration tests are located in ``tests/integration`` at the root of the repo.
See below for information on how we test all the different moving parts in
``showyourwork``.


.. toctree::
   :maxdepth: 5

   ../integration_tests.rst