Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snakebids create docs #434

Open
akhanf opened this issue Jun 3, 2024 · 3 comments
Open

Snakebids create docs #434

akhanf opened this issue Jun 3, 2024 · 3 comments

Comments

@akhanf
Copy link
Member

akhanf commented Jun 3, 2024

The problem

The docs for the CLI (app and snakemake) don't build properly since the snakebids isn't in the requirements.txt for the docs.

Looks like simple fix is to add snakebids to the requirements.txt, any objections to that?

Steps to reproduce

Create an app, say yes to docs:
snakebids create test_snakebids

Then make venv (python3.11) for docs/requirements.txt, install them, then from docs/:

sphinx-build . _build_docs

Screenshots

(venv_docs) alik@AFI-CBS-H-10:/local/scratch/test_snakebids/docs$ sphinx-build . _build_docs
Running Sphinx v5.3.0
making output directory... done
myst v1.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 4 source files that are out of date
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] usage/snakemake_cli                                                                                                                                                                            
/local/scratch/test_snakebids/docs/usage/app_cli.md:3: ERROR: Failed to import "get_parser" from "test_snakebids.run".
No module named 'test_snakebids'
/local/scratch/test_snakebids/docs/usage/snakemake_cli.md:3: ERROR: Failed to import "get_argument_parser" from "snakebids.snakemake_compat".
No module named 'snakebids'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] usage/snakemake_cli                                                                                                                                                                             
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 2 warnings.
@pvandyken
Copy link
Contributor

Should be fine, the only thing is we have a test for this, so it looks like we also have a false negative. A fix should also fix the test

def test_template_docs_build(tmp_path: Path, request: pytest.FixtureRequest):

@pvandyken
Copy link
Contributor

Sorry for leaving this so long... I'm just having another look at the docs building because of the test failure that came up on nightly.

Just wondering, normal procedure for building docs is to first install the local project pip install ., then install the requirements, no? With that procedure, snakebids should be installed correctly? At the very least, this is why this problem didn't come up on testing: the tests first install the local repository

@akhanf
Copy link
Member Author

akhanf commented Jul 23, 2024

With readthedocs it just builds from the docs requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants