documentation: Add Pipenv support

Submitted by Joshua Watt on Nov. 10, 2020, 9:29 p.m. | Patch ID: 177923

Details

Message ID 20201110212917.25172-1-JPEWhacker@gmail.com
State New
Headers show

Commit Message

Joshua Watt Nov. 10, 2020, 9:29 p.m.
Adds a Pipfile so that Pipenv can be used to automatically install all
the dependencies required to build the documentation

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 documentation/.gitignore |  1 +
 documentation/Pipfile    | 14 ++++++++++++++
 documentation/README     |  7 +++++++
 3 files changed, 22 insertions(+)
 create mode 100644 documentation/Pipfile

Patch hide | download patch | download mbox

diff --git a/documentation/.gitignore b/documentation/.gitignore
index 69fa449dd..21bb72530 100644
--- a/documentation/.gitignore
+++ b/documentation/.gitignore
@@ -1 +1,2 @@ 
 _build/
+Pipfile.lock
diff --git a/documentation/Pipfile b/documentation/Pipfile
new file mode 100644
index 000000000..7ee1d2290
--- /dev/null
+++ b/documentation/Pipfile
@@ -0,0 +1,14 @@ 
+[[source]]
+name = "pypi"
+url = "https://pypi.org/simple"
+verify_ssl = true
+
+[dev-packages]
+
+[packages]
+sphinx = "*"
+sphinx-rtd-theme = "*"
+pyyaml = "*"
+
+[requires]
+python_version = "3"
diff --git a/documentation/README b/documentation/README
index 534ae66f8..28d5c4be8 100644
--- a/documentation/README
+++ b/documentation/README
@@ -127,6 +127,13 @@  The resulting HTML index page will be _build/html/index.html, and you
 can browse your own copy of the locally generated documentation with
 your browser.
 
+Alternatively, you can use Pipenv to automatically install all required
+dependencies in a virtual environment:
+
+ $ cd documentation
+ $ pipenv install
+ $ pipenv run make html
+
 Sphinx theme and CSS customization
 ==================================
 

Comments

shantanoo.desai@gmail.com Nov. 11, 2020, 9:30 p.m.
Hi Joshua,

I would suggest adding [sphinx-serve](https://pypi.org/project/sphinx-serve/) as a dev-package to serve the docs during local development/tests.

I was able to serve the Sphinx-RTD on my machine simply by executing `sphinx-serve` in the `documentations/` folder. Maybe mention it in the README too?.

I think Pipenv might be required since I was digging into the Algolia Search Indexing and there you can use their document scraper with Pipenv as well.
(see https://docsearch.algolia.com/docs/run-your-own/)

Might be worth the effort, since Nico did mention plans to use an indexing search for the new docs.

Would love your thoughts on this.

Regards,

Shan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#610): https://lists.yoctoproject.org/g/docs/message/610
Mute This Topic: https://lists.yoctoproject.org/mt/78169702/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Joshua Watt Nov. 11, 2020, 10:05 p.m.
On 11/11/20 3:30 PM, shantanoo.desai@gmail.com wrote:
>
> Hi Joshua,
>
> I would suggest adding sphinx-serve 
> <https://pypi.org/project/sphinx-serve/> as a dev-package to serve the 
> docs during local development/tests.
>
I'd be fine with that. We can see if anyone else objects, or we can also 
merge as is and add that as a separate patch.

> I was able to serve the Sphinx-RTD on my machine simply by executing 
> |sphinx-serve| in the |documentations/| folder. Maybe mention it in 
> the README too?.
>
> I think Pipenv might be required since I was digging into the Algolia 
> Search Indexing and there you can use their document scraper with 
> Pipenv as well. (see https://docsearch.algolia.com/docs/run-your-own/)
>
> Might be worth the effort, since Nico did mention plans to use an 
> indexing search for the new docs.
>
> Would love your thoughts on this.
>
> Regards,
>
> Shan
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#611): https://lists.yoctoproject.org/g/docs/message/611
Mute This Topic: https://lists.yoctoproject.org/mt/78169702/3617530
Group Owner: docs+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-