|
| 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