Skip to content

Commit

Permalink
Specify documentation requirements in setup.py
Browse files Browse the repository at this point in the history
Also, allow mkdocs and mkDOCter to pull in their own dependencies,
rather than pinning all versions of each dependency.
  • Loading branch information
schbetsy committed Sep 13, 2018
1 parent 339cdba commit f2c3fbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ python manage.py runserver

## API Docs

[Documentation](https://cfpb.github.io/ccdb5-api/) for this repository is rendered via GitHub pages and [Swagger](https://swagger.io/docs/). They can be edited in the `docs/` directory, but to view or deploy them, you'll need to install the dependencies listed in the `requirements_docs.txt` file:
[Documentation](https://cfpb.github.io/ccdb5-api/) for this repository is rendered via GitHub pages and [Swagger](https://swagger.io/docs/). They can be edited in the `docs/` directory, but to view or deploy them, you'll need to install the dependencies listed in the `docs_extras` section of `setup.py`:

```
pip install -r requirements_docs.txt
pip install -e '.[docs]'
```

You can then preview your changes locally by running `mkdocs serve` and then reviewing <http://127.0.0.1:8000/>
Expand Down
15 changes: 0 additions & 15 deletions requirements_docs.txt

This file was deleted.

6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
'deep==0.10',
]

docs_extras = [
'mkdocs==0.17.5',
'mkDOCter==1.0.5',
]


setup(
name='ccdb5-api',
Expand All @@ -47,6 +52,7 @@
setup_requires=['setuptools-git-version==1.0.3'],
install_requires=install_requires,
extras_require={
'docs': docs_extras,
'testing': testing_extras,
}
)

0 comments on commit f2c3fbf

Please sign in to comment.