showyourwork / showyourwork

A workflow for reproducible and open scientific articles

Home Page:https://show-your.work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add instructions for contributors

HealthyPear opened this issue · comments

Maybe I have overlooked this, but while working on #333 I couldn't find clear instructions for developers on how to setup a development environment.

In particular, I couldn't easily install the required dependencies to build the documentation locally, something I like to do before pushing to check that I didn't break the docs and that they look as intended.

I can open a PR to fix this by essentially:

  • adding an extra docs entry in setup.py with sphinx, sphinx-book-theme and sphinxcontrib-programoutput
  • adding instructions on how to create a development environment (which I propose to define with a global environment.ymlfile followed by a pip install -e '$PATHTOPACKAGE[dev]' where dev is docs+tests.

Also, I don't quite get what the hacks module does, if it's something specific for readthedocs, or is supposed to work always because locally the build will fail (after either make html or make dirhtml) as the package cannot find that module unless you do

import sys
import os

sys.path.append(os.path.join(os.path.dirname(__file__), "."))

in conf.py.

@rwegener2 is working on this over in #319!

The hacks.py script handle the documentation for the snakemake rules which isn't supported natively by sphinx, but it seems very likely it could be refactored!

I came back to this and noticed #319 has been merged, so maybe we can close this issue?

Sounds good to me - thanks!!