Skip to content

Commit

Permalink
Merge 2bbc5d2 into 5c3325a
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJKoopman committed Sep 28, 2020
2 parents 5c3325a + 2bbc5d2 commit 73d4fb3
Show file tree
Hide file tree
Showing 13 changed files with 68 additions and 82 deletions.
6 changes: 6 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2

python:
version: 3.7
install:
- requirements: requirements/docs.txt
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ COPY . /app/ocs/
WORKDIR /app/ocs/

# Install ocs
RUN pip3 install -r requirements.txt && \
RUN pip3 install -r requirements/dev.txt && \
pip3 install -e .
3 changes: 3 additions & 0 deletions agents/influxdb_publisher/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ FROM ocs:latest
WORKDIR /app/ocs/agents/influxdb_publisher/

COPY influxdb_publisher.py .
COPY requirements.txt .

RUN pip3 install -r requirements.txt

# Run publisher on container startup
ENTRYPOINT ["dumb-init", "python3", "-u", "influxdb_publisher.py"]
Expand Down
1 change: 1 addition & 0 deletions agents/influxdb_publisher/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
influxdb
8 changes: 0 additions & 8 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ ocs.ocs_twisted
:undoc-members:
:show-inheritance:

ocs.ocs_widgets
---------------

.. automodule:: ocs.ocs_widgets
:members:
:undoc-members:
:show-inheritance:

ocs.site_config
---------------

Expand Down
26 changes: 23 additions & 3 deletions docs/user/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,30 @@ software dependencies on host systems running OCS:

Python Dependencies
```````````````````
All python dependencies for OCS are listed in (and automatically installed via)
the ``requirements.txt`` file. Some of the dependencies are:
All python dependencies for OCS are listed in requirements files within
``requirements/``. These are split up into multiple files and should be
installed depending on the use of your OCS installation. The most common use
case will be to just run OCS clients on a local machine, for this, the default
``requirements.txt`` file includes the client and documentation requirements so
users can run OCS clients and build the OCS documentation locally.

These dependencies will be installed during the normal installation process,
which refers to ``requirements.txt``, and is covered in the next page. Other
dependencies must be explitly installed. For convenience these are split into
groups based on various tasks OCS users might want to accomplish.

* ``clients.txt`` - Dependencies required to run OCS clients.
* ``crossbar.txt`` - The crossbar server and any dependencies it might have.
This pulls in a lot of other python packages, some of which conflict with
other dependencies in OCS. We strongly encourage using the crossbar Docker
container described later, but if you want to run the crossbar server on the
host system, you will need these dependencies.
* ``dev.txt`` - Everything you need for locally developing an OCS Agent,
including pytest for running the test suite.
* ``docs.txt`` - Dependencies required to build the OCS documentation.

The major dependencies for running clients include:

* `crossbar.io`_ - An implementation of a WAMP router.
* `Autobahn`_ - Provides open-source implementations of WAMP.
* `twisted`_ - Used with Autobahn for networking.
* `wampy`_ - A non-asynchronus WAMP library providing RPC and Pub/Sub for
Expand Down
11 changes: 10 additions & 1 deletion docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ To install, clone the repository and use pip to install::
.. note::

If you want to install locally, not globally, throw the `--user` flag
on both the pip3 and setup.py commands.
on the pip3 command.

.. note::

If you need addiontional dependencies, such as if you are locally
developing an Agent, or want to run the test suite, you will need to install
additional dependnecies listed in the files within ``requirements/``. You can
do so using pip. For example::

pip3 install -r requirements/dev.txt

.. _Docker Compose: https://docs.docker.com/compose/install/
42 changes: 0 additions & 42 deletions ocs/ocs_widgets.py

This file was deleted.

29 changes: 2 additions & 27 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
crossbar
autobahn
twisted
wampy>=0.9.20
deprecation
msgpack
influxdb
ipywidgets

# Lakeshore240
pyserial

# Documentation generation
sphinx
sphinx-argparse
sphinx_rtd_theme

# checkdata
progress
colorama

# g32influx
tqdm

# testing
pytest
pytest-cov
-r requirements/clients.txt
-r requirements/docs.txt
11 changes: 11 additions & 0 deletions requirements/clients.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
autobahn
twisted
wampy>=0.9.20
deprecation

# checkdata
progress
colorama

# g32influx
tqdm
1 change: 1 addition & 0 deletions requirements/crossbar.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
crossbar
6 changes: 6 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-r clients.txt
-r docs.txt

# Testing
pytest
pytest-cov
4 changes: 4 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Documentation generation
sphinx
sphinx-argparse
sphinx_rtd_theme

0 comments on commit 73d4fb3

Please sign in to comment.