Skip to content

Commit

Permalink
Generate help text in readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
EricR86 committed Mar 30, 2023
1 parent adf3011 commit e24dc79
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .readthedocs.yaml
Expand Up @@ -9,11 +9,19 @@ conda:

# Required for project building and versioning
python:
version: 3.8 # matches in environment.yml
install:
- method: pip
path: .

build:
os: ubuntu-22.04
tools:
# Ref: https://github.com/readthedocs/readthedocs.org/issues/9008
python: "miniconda3-4.7"
jobs:
post_install:
- make -C doc cmdline-help

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py
3 changes: 2 additions & 1 deletion doc/Makefile
Expand Up @@ -41,7 +41,8 @@ clean:

$(CMDLINEHELPDIR)/%.help.txt:
@mkdir -p $(@D)
python gethelp.py $* > $@
python3 --version
python3 gethelp.py $* > $@

cmdline-help: $(addprefix $(CMDLINEHELPDIR)/segtools-,compare.help.txt preprocess.help.txt aggregation.help.txt feature-distance.help.txt flatten.help.txt gmtk-parameters.help.txt html-report.help.txt transition.help.txt length-distribution.help.txt nucleotide-frequency.help.txt overlap.help.txt signal-distribution.help.txt relabel.help.txt)

Expand Down
2 changes: 1 addition & 1 deletion doc/gethelp.py
Expand Up @@ -13,7 +13,7 @@
sys.path.insert(0, "..")

def gethelp(scriptname):
(entry_point,_) = entry_points(group="console_scripts", name=scriptname)
(entry_point,_) = entry_points().select(group="console_scripts", name=scriptname)
entry = entry_point.value
module_name, _, func_name = entry.partition(":")

Expand Down
1 change: 1 addition & 0 deletions environment.yml
Expand Up @@ -6,6 +6,7 @@ channels:
dependencies:
- genomedata
- python=3.8
- importlib_metadata
- r-base
- rpy2 >=2.6.0
- r-latticeextra
Expand Down

0 comments on commit e24dc79

Please sign in to comment.