Skip to content

Commit

Permalink
Merge pull request #368 from simonsobs/develop
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
BrianJKoopman authored Nov 9, 2022
2 parents 53758a1 + 1b72121 commit f0caa71
Show file tree
Hide file tree
Showing 253 changed files with 3,128 additions and 2,448 deletions.
11 changes: 7 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ in-place = true
recursive = true
aggressive = 2
exclude =
agents/meinberg_m1000/mibs/MBG-SNMP-LTNG-MIB.py,
agents/meinberg_m1000/mibs/SNMPv2-MIB.py,
agents/meinberg_m1000/mibs/MBG-SNMP-ROOT-MIB.py,
agents/ibootbar/mibs/IBOOTPDU-MIB.py,
socs/mibs/MBG-SNMP-LTNG-MIB.py,
socs/mibs/SNMPv2-MIB.py,
socs/mibs/MBG-SNMP-ROOT-MIB.py,
socs/mibs/IBOOTPDU-MIB.py,
versioneer.py,
docs/conf.py,
per-file-ignores =
# Windows only dependency
socs/agents/thorlabs_mc2000b/agent.py:F405
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ jobs:
run: |
python3 -m pip install dist/socs*.whl
- name: install testing requirements
- name: install requirements for testing
run: |
pip3 install -r requirements/testing.txt
pip3 install -r requirements.txt
- name: Run unit tests
working-directory: ./tests
run: |
python3 -m pytest -m 'not (integtest or spt3g)'
python3 -m pytest -m 'not integtest'
- name: upload to PyPI
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
run: |
python3 -m pip install dist/socs*.whl
- name: install testing requirements
- name: install requirements for testing
run: |
pip3 install -r requirements/testing.txt
pip3 install -r requirements.txt
- name: Run unit tests
working-directory: ./tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

Expand Down
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ repos:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.7.0
rev: v2.0.0
hooks:
- id: autopep8
- repo: https://github.com/pycqa/flake8
Expand Down
49 changes: 44 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,52 @@
# A container setup with an installation of socs.

# Use the ocs image as a base
FROM simonsobs/ocs:v0.9.3
FROM simonsobs/ocs:v0.10.0

# Copy the current directory contents into the container at /app
COPY . /app/socs/
# Set up the cryo/smurf user and group so this can run on smurf-servers
# See link for how all other smurf-containers are set up:
# https://github.com/slaclab/smurf-base-docker/blob/master/Dockerfile
RUN useradd -d /home/cryo -M cryo -u 1000 && \
groupadd smurf -g 1001 && \
usermod -aG smurf cryo && \
usermod -g smurf cryo && \
mkdir /home/cryo && \
chown cryo:smurf /home/cryo

# Install packages
# suprsync agent - rsync
# labjack agent - wget, python3-pip, libusb-1.0-0-dev, udev
RUN apt-get update && apt-get install -y rsync \
wget \
python3-pip \
libusb-1.0-0-dev \
udev

# Install labjack ljm module
# Copied from the labjack ljm dockerfile:
# https://hub.docker.com/r/labjack/ljm/dockerfile
WORKDIR /app/labjack/
RUN wget https://cdn.docsie.io/file/workspace_u4AEu22YJT50zKF8J/doc_VDWGWsJAhd453cYSI/boo_9BFzMKFachlhscG9Z/file_NNCdkmsmvPHtgkHk8/labjack_ljm_software_2020_03_30_x86_64_betatar.gz -O labjack_ljm_software_2020_03_30_x86_64_beta.tar.gz
RUN tar zxf ./labjack_ljm_software_2020_03_30_x86_64_beta.tar.gz
RUN ./labjack_ljm_software_2020_03_30_x86_64/labjack_ljm_installer.run -- --no-restart-device-rules

# Copy in and install requirements
COPY requirements/ /app/socs/requirements
COPY requirements.txt /app/socs/requirements.txt
WORKDIR /app/socs/
RUN pip3 install -r requirements.txt

# Copy the current directory contents into the container at /app
COPY . /app/socs/

# Install socs
RUN pip3 install -r requirements.txt && \
pip3 install .
RUN pip3 install .

# Reset workdir to avoid local imports
WORKDIR /

# Port for HWP Encoder Beaglebone connection
EXPOSE 8080/udp

# Run agent on container startup
ENTRYPOINT ["dumb-init", "ocs-agent-cli"]
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ Install and update with pip::

$ pip3 install -U socs

If you need to install the optional so3g module you can do so via::
You may install optional dependencies by including one or more agent group
names on installation, for example::

$ pip3 install -U socs[so3g]
$ pip3 install -U socs[labjack,pysmurf]

For a complete list of agent groups see the `Installation Documentation`_.

If you would like to install all optional dependencies use the special varient
"all"::

$ pip3 install -U socs[all]

.. _`Installation Documentation`: https://socs.readthedocs.io/en/develop/user/installation.html

Installing from Source
``````````````````````
Expand Down
19 changes: 0 additions & 19 deletions agents/bluefors/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions agents/chwp/Dockerfile

This file was deleted.

Binary file not shown.
21 changes: 0 additions & 21 deletions agents/cryomech_cpa/Dockerfile

This file was deleted.

Binary file removed agents/cryomech_cpa/PT420RM_CPA1114_manual.pdf
Binary file not shown.
16 changes: 0 additions & 16 deletions agents/hwp_rotation/Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions agents/ibootbar/Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions agents/labjack/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions agents/labjack/requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions agents/lakeshore240/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions agents/lakeshore336/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions agents/lakeshore370/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions agents/lakeshore372/Dockerfile

This file was deleted.

17 changes: 0 additions & 17 deletions agents/lakeshore425/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions agents/magpie/Dockerfile

This file was deleted.

Loading

0 comments on commit f0caa71

Please sign in to comment.