Skip to content

Commit ed7f413

Browse files
authored
Add setup instructions (#10)
1 parent 56595be commit ed7f413

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ your own.
2020

2121
_This here, is only the documentation of the project, not the project iself._
2222

23+
## Setup
24+
25+
Refer to the
26+
[setup instructions](https://omniport.readthedocs.io/en/latest/setting_up/omniport_docs.html).
27+
2328
## Contribution guidelines
2429

2530
- Fork the repository to your account.

docs/source/setting_up/index.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ development servers and production servers.
2020
docker
2121
omniport_docker
2222
development
23-
production
23+
production
24+
omniport_docs
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Omniport Docs
2+
=============
3+
4+
.. note::
5+
6+
You must have ``Python 3.8`` and ``pipenv`` installed before you can set
7+
up the documentation locally.
8+
9+
#. Install the project dependencies.
10+
11+
.. code-block:: console
12+
13+
$ pipenv install --skip-lock
14+
15+
Omit the flag ``--skip-lock`` if you want the latest packages. Keep in mind
16+
that the project has been tested on the versions of the packages specified
17+
in the ``Pipfile.lock`` so its compatibilty with the latest packages might
18+
not be assured.
19+
20+
#. Start the ``pipenv`` virtual environment via running the following command.
21+
Or you can prefix the commands for starting the server or for building docs
22+
using ``pipenv run``.
23+
24+
.. code-block:: console
25+
26+
$ pipenv shell
27+
28+
#. To start the development server, run the following commands inside ``/docs``.
29+
This will automatically re-build your changes as you make them.
30+
31+
.. code-block:: console
32+
33+
$ make dev
34+
35+
Pass extra flags like port (default: 8000) by suffixing
36+
``SPHINXDEVOPTS="-p 8080"`` with the above command.
37+
38+
#. Build the documentation into HTML pages by running the following command
39+
inside ``/docs``.
40+
41+
.. code-block:: console
42+
43+
$ make html
44+
45+
This will create the ``docs/build`` directory. You can preview it using one
46+
of Python's module called ``http.server``.
47+
48+
#. To build the documentation into some other format, refer to ``make help``
49+
command for all the options available.
50+
51+
Cannot start the virtual environment?
52+
-------------------------------------
53+
54+
If you keep getting the following error when you try to run ``pipenv shell``:
55+
56+
.. code-block:: none
57+
58+
Shell for UNKNOWN_VIRTUAL_ENVIRONMENT already activated.
59+
No action taken to avoid nested environments.
60+
61+
Run ``exit`` to resolve the issue. You will be able to start the virtual
62+
environment now.

0 commit comments

Comments
 (0)