Skip to content

Commit

Permalink
Docs setup simplification
Browse files Browse the repository at this point in the history
This PR simplifies docs handling in the following ways

1. Register extra docs requirements in `setup.py`
2. Replace `builddocs.sh` with `README.md`
3. Avoid extra `sphinx_doc` directory
  • Loading branch information
romanc committed Feb 19, 2025
1 parent 73280b6 commit b652ec9
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 34 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NDSL docs

This folder contains the NDSL documentation. For now, it is not automatically published. To build and view documentation locally,

```bash
make html
```

Then point your browser to the local html files in `_build/html` as mentioned in the build output.

Be sure to include the `docs` extras when installing `NDSL`. The extra packages for docs are automatically included in the `develop` flavor.
24 changes: 0 additions & 24 deletions docs/builddocs.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions docs/requirement_docs.txt

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ def local_pkg(name: str, relative_path: str) -> str:
path = f"{name} @ file://{Path(os.path.abspath(__file__)).parent / relative_path}"
return path


test_requirements = ["pytest", "pytest-subtests", "coverage"]
develop_requirements = test_requirements + ["pre-commit"]
demos_requirements = ["ipython", "ipykernel"]
docs_requirements = ["recommonmark", "sphinx>=1.4", "sphinx-argparse", "sphinx_rtd_theme", "sphinx-gallery"]
test_requirements = ["pytest", "pytest-subtests", "coverage"]

develop_requirements = test_requirements + docs_requirements + ["pre-commit"]

extras_requires = {
"test": test_requirements,
"develop": develop_requirements,
"demos": demos_requirements,
"develop": develop_requirements,
"docs": docs_requirements,
"test": test_requirements,
}

requirements: List[str] = [
Expand Down

0 comments on commit b652ec9

Please sign in to comment.