diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 964513e0a..dfcfef42a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,15 +12,24 @@ -## Types of changes - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +## Labels for Types of changes + + + +- "ai assisted" - code was developed with AI assistance +- "breaking" - fix or feature that would cause existing functionality to not work as expected +- "bug fix" - non-breaking change which fixes an issue +- "cleanup" - refactoring or other cleanup, no new features +- "documentation" - documentation only changes, no functionality changes +- "enhancement" - non-breaking change which adds functionality +- "new agent" - introduce a new agent to the repo ## Checklist: - [ ] My code follows the code style of this project. -- [ ] My change requires a change to the documentation. -- [ ] I have updated the documentation accordingly. +- [ ] I have updated related documentation _or_ an update to the documentation is not required. + +## AI Usage Disclosure + + diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index aacc9adba..3d0928ca4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,32 +5,8 @@ Contributing to SOCS Branches -------- -Following release v0.4.1, socs now has a single ``main`` branch, which replaces -the old ``master`` and ``develop`` branch model, described below. ``main`` -functions like ``develop`` used to, and is the new default branch. Feature -branches should be based off of the latest ``main``, and pull requests should -be made into ``main``. - -Users that want a "stable" installation of socs should install from PyPI and/or -use tagged Docker images corresponding to the targeted release, i.e. v0.4.1. -Installing from source (i.e. from the ``main`` branch) comes with the usual -caveats of potential instability. - -Old Branching Model -``````````````````` - **Note:** This branching model is no longer used, but the description is - left here while we transition to the new one. - -There are two long-lived branches in SOCS, ``master`` and ``develop``. -``master`` should be considered stable, and will only move forward on official -releases. ``develop`` may be unstable, and is where all development should take -place. This branching model follows the one in the OCS_ repository. - -What this means for you, the contributor, is that you should base your feature -branches off of the latest ``develop`` branch, and pull request them into -``develop``. Detailed steps below. - -.. _OCS: https://github.com/simonsobs/ocs +socs has a single ``main`` branch Feature branches should be based off of the +latest ``main``, and pull requests should be made into ``main``. Pull Requests ------------- @@ -46,31 +22,60 @@ submit a PR from there. See the `GitHub documentation `_ for details on how to do so. -Releases --------- +PR Template +``````````` +When you open a PR, a template will automatically populate the text field. Please +fill out all sections of the template. - **Note:** Releases will be issued by core maintainers of SOCS. +Force Pushes +```````````` +Please refrain from force pushing a rebase onto a branch after marking your PR +ready for review, unless requested to do so by a maintainer. Doing so makes it +difficult for the reviewers to follow changes you have made in response to the +review. -If you are trying to issue a release of SOCS you should follow these steps: +AI Usage +```````` +Use of AI tools is allowed under the Simons Observatory `AI Governance +Policy`_, provided the usage is disclosed. Before submitting a PR with AI +generated code, please make sure to read the AI policy and follow the +guidelines within. -1. Test the release properly builds and publishes with a pre-release. You can - do so by pushing a tag matching ``v0.*.*a*``, ``v0.*.*b*``, or - ``v0.*.*rc*``. -2. If no new commits are made following a pre-release, remove the pre-release - tag. Multiple tags may prevent the official release from publishing properly. -3. Use the GitHub releases interface to draft a new release, creating a new tag - targeting the ``main`` branch. -4. Write the release notes. Make use of the "Generate release notes" feature. - It is helpful to organize these into sections as done in past releases. Be - sure to highlight any breaking changes and include instructions for any - actions users must take when updating. +As a way of marking which Agents were developed with and without AI assistance, +the Agent reference pages should contain one of two badges: + +.. image:: https://img.shields.io/badge/AI-assisted-orange + :alt: Agent written with AI assistance + +:: + + .. image:: https://img.shields.io/badge/AI-assisted-orange + :alt: Agent written with AI assistance + +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + +:: + + .. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + +You must also include the following comment at the top of every source file +that was generated using AI:: + + # Code developed with AI assistance. + +Most agents in this repo pre-date AI tools, and so contain AI free code, to the +best of the maintainer's knowledge. + +.. _AI Governance Policy: https://simonsobservatory.org/wp-content/uploads/2026/08/Digital_Assets_Policy_20260811.pdf Development Guide ----------------- Contributors should follow the recommendations made in the `SO Developer Guide`_. -.. _SO Developer Guide: https://simons1.princeton.edu/docs/so_dev_guide/ +.. _SO Developer Guide: https://simonsobs-dev-guide.readthedocs.io/en/latest/ pre-commit `````````` @@ -82,7 +87,7 @@ when submitting pull requests. You should set this up before making and committing your changes. To do so make sure the ``pre-commit`` package is installed (it is in ``requirements.txt``):: - $ pip install -r requirements.txt + $ python -m pip install -r requirements.txt Then run:: @@ -91,8 +96,8 @@ Then run:: This will install the configured git hooks and any dependencies. Now, whenever you commit the hooks will run. If there are issues you will see them in the output. This may automatically make changes to your staged files. These -changes will be unstaged and need to be reviewed (typically with a ``git -diff``), restaged, and recommitted. For example, if you have trailing +changes will be unstaged and need to be reviewed (typically with a ``git diff``), +restaged, and recommitted. For example, if you have trailing whitespace on a line, pre-commit will prevent the commit and remove the whitespace. You will then stage the new changes with another ``git add `` and then re-run the commit. Here is the expected git output for this example: @@ -133,3 +138,27 @@ and then re-run the commit. Here is the expected git output for this example: $ git commit .. _pre-commit: https://pre-commit.com/ + +For Repo Maintainers +-------------------- + +The following sections are only relevant for repo maintainers. + +Releases +```````` + + **Note:** Releases will be issued by core maintainers of SOCS. + +If you are trying to issue a release of SOCS you should follow these steps: + +1. Test the release properly builds and publishes with a pre-release. You can + do so by pushing a tag matching ``v0.*.*a*``, ``v0.*.*b*``, or + ``v0.*.*rc*``. +2. If no new commits are made following a pre-release, remove the pre-release + tag. Multiple tags may prevent the official release from publishing properly. +3. Use the GitHub releases interface to draft a new release, creating a new tag + targeting the ``main`` branch. +4. Write the release notes. Make use of the "Generate release notes" feature. + It is helpful to organize these into sections as done in past releases. Be + sure to highlight any breaking changes and include instructions for any + actions users must take when updating. diff --git a/README.rst b/README.rst index 1c2b73228..585f1a423 100644 --- a/README.rst +++ b/README.rst @@ -20,19 +20,19 @@ Installation Install and update with pip:: - $ pip3 install -U socs + $ python -m pip install -U socs You may install optional dependencies by including one or more agent group names on installation, for example:: - $ pip3 install -U socs[labjack,synacc] + $ python -m pip install -U socs[labjack,synacc] 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] + $ python -m pip install -U socs[all] **Note:** Not all optional dependencies can be installed this way. See the `Installation Documentation`_ for more info on specific agent dependencies. @@ -48,10 +48,10 @@ and install using pip: .. code-block:: bash - git clone https://github.com/simonsobs/socs.git - cd socs/ - pip3 install -r requirements.txt - pip3 install . + $ git clone https://github.com/simonsobs/socs.git + $ cd socs/ + $ python -m pip install -r requirements.txt + $ python -m pip install . Docker Images ------------- @@ -74,9 +74,9 @@ The SOCS documentation can be built using Sphinx. There is a separate ``requirements.txt`` file in the ``docs/`` directory to install Sphinx and any additional documentation dependencies:: - cd docs/ - pip3 install -r requirements.txt - make html + $ cd docs/ + $ python -m pip install -r requirements.txt + $ make html You can then open ``docs/_build/html/index.html`` in your preferred web browser. You can also find a copy hosted on `Read the Docs`_. @@ -88,8 +88,8 @@ Tests The tests for SOCS are run using pytest, and should be run from the ``tests/`` directory:: - $ cd tests/ - $ python3 -m pytest --cov + $ cd tests/ + $ python -m pytest --cov For more details see `tests/README.rst `_. @@ -97,7 +97,7 @@ For more details see `tests/README.rst `_. Contributing ------------ -For guidelines on how to contribute to OCS see `CONTRIBUTING.rst`_. +For guidelines on how to contribute to SOCS see `CONTRIBUTING.rst`_. .. _CONTRIBUTING.rst: https://github.com/simonsobs/socs/blob/main/CONTRIBUTING.rst diff --git a/docs/agents/acu_agent.rst b/docs/agents/acu_agent.rst index d4a6007da..80e7b5f75 100644 --- a/docs/agents/acu_agent.rst +++ b/docs/agents/acu_agent.rst @@ -6,6 +6,9 @@ ACU Agent ========= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Antenna Control Unit (ACU) is an industrial PC with VxWorks installed. It is used for readout of encoder measurements and control of telescope platforms. diff --git a/docs/agents/bluefors_agent.rst b/docs/agents/bluefors_agent.rst index fa486323a..afc70114d 100644 --- a/docs/agents/bluefors_agent.rst +++ b/docs/agents/bluefors_agent.rst @@ -6,6 +6,9 @@ Bluefors Agent ============== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Bluefors Agent is an OCS Agent which tracks the contents of the Bluefors logs and passes them to the live monitor and to the OCS housekeeping data aggregator. diff --git a/docs/agents/cryomech_cpa.rst b/docs/agents/cryomech_cpa.rst index 194cd14f2..363d3201f 100644 --- a/docs/agents/cryomech_cpa.rst +++ b/docs/agents/cryomech_cpa.rst @@ -6,6 +6,9 @@ Cryomech CPA Agent ================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Cryomech CPA compressor is a commonly used compressor model for the pulse tubes within SO. The CPA Agent interfaces with the compressor over ethernet to monitor the health of the unit, including stats such as Helium diff --git a/docs/agents/devantech_dS378.rst b/docs/agents/devantech_dS378.rst index 73c1608f5..4fa12fa4b 100644 --- a/docs/agents/devantech_dS378.rst +++ b/docs/agents/devantech_dS378.rst @@ -6,6 +6,9 @@ Devantech dS378 Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent is designed to interface with devantech's dS378 ethernet relay. diff --git a/docs/agents/fls.rst b/docs/agents/fls.rst index 4cf184d1c..167272634 100644 --- a/docs/agents/fls.rst +++ b/docs/agents/fls.rst @@ -6,6 +6,9 @@ FLS Agent ========= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Frequency-selectable Laser Source (FLS) is a calibrator that uses the Toptica TeraScan 1550 laser system, installed in a setup with attenuating prisms and mirrors. The calibrator is used for passband measurements with diff --git a/docs/agents/fts_agent.rst b/docs/agents/fts_agent.rst index 391dda266..a527c56f9 100644 --- a/docs/agents/fts_agent.rst +++ b/docs/agents/fts_agent.rst @@ -6,6 +6,9 @@ FTS Aerotech Agent ================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent is used to communicate with the FTS mirror stage for two FTSs with Aerotech motion controllers. diff --git a/docs/agents/galil_axis.rst b/docs/agents/galil_axis.rst index f57b9e51e..1e81678f4 100644 --- a/docs/agents/galil_axis.rst +++ b/docs/agents/galil_axis.rst @@ -6,6 +6,9 @@ Galil Axis Agent ================ +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Galil Axis Agent provides motion control and telemetry readout for the Galil DMC motor controller. When used in the Simons Observatory SAT Coupling Optics system, the agent controls four axes—two linear and two angular—that move diff --git a/docs/agents/generator.rst b/docs/agents/generator.rst index cbd07adc6..4fd0e2fb0 100644 --- a/docs/agents/generator.rst +++ b/docs/agents/generator.rst @@ -6,6 +6,9 @@ Generator Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Generator Agent is an OCS Agent which monitors on-site generators via Modbus. .. argparse:: diff --git a/docs/agents/hi6200.rst b/docs/agents/hi6200.rst index 98f3d58e7..00d85ccf9 100644 --- a/docs/agents/hi6200.rst +++ b/docs/agents/hi6200.rst @@ -6,6 +6,9 @@ Hi6200 Agent ============== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent uses Modbus TCP to communicate with the Hi6200 Weight Sensor. This agent uses ModbusClient from pyModbusTCP to facilitate the communication. The agent is able to communicate over ethernet to read and monitor the net and diff --git a/docs/agents/holo_fpga.rst b/docs/agents/holo_fpga.rst index c1f6b9da9..ceb01a245 100644 --- a/docs/agents/holo_fpga.rst +++ b/docs/agents/holo_fpga.rst @@ -6,6 +6,9 @@ Holography FPGA Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Holography FPGA Agent is provided with OCS to help demonstrate and debug issues with the holography ROACH2 FPGA. It will connect the computer to the ROACH via an ethernet port, take data, and pass it to the OCS feed. diff --git a/docs/agents/holo_synth.rst b/docs/agents/holo_synth.rst index d9e51ef19..a1800dd30 100644 --- a/docs/agents/holo_synth.rst +++ b/docs/agents/holo_synth.rst @@ -6,6 +6,9 @@ Holography Synthesizer Agent ============================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Holography Synthesizer Agent is provided with OCS to help demonstrate and debug issues with the holography synthesizers. The synthesizers provide a signal at a desired frequency for holography measurements. This agent will diff --git a/docs/agents/http_camera.rst b/docs/agents/http_camera.rst index f93f85901..a5793cdaa 100644 --- a/docs/agents/http_camera.rst +++ b/docs/agents/http_camera.rst @@ -6,6 +6,9 @@ HTTP Camera Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The HTTP Camera Agent is an OCS Agent which grabs screenshots from cameras using HTTP requests and saves files to a directory. diff --git a/docs/agents/hwp_encoder.rst b/docs/agents/hwp_encoder.rst index 68e859433..91cda734f 100644 --- a/docs/agents/hwp_encoder.rst +++ b/docs/agents/hwp_encoder.rst @@ -6,6 +6,9 @@ HWP Encoder BBB Agent ===================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The optical encoder signals of the CHWP are captured by Beaglebone Black (BBB) boards with the IRIG-B timing reference. This agent receives and decodes UDP packets from BBB and publishes the data diff --git a/docs/agents/hwp_gripper.rst b/docs/agents/hwp_gripper.rst index d239c52a7..d66987e72 100644 --- a/docs/agents/hwp_gripper.rst +++ b/docs/agents/hwp_gripper.rst @@ -6,6 +6,9 @@ HWP Gripper Agent ================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + Agent which controls and monitor's the HWP's set of three LEY32C-30 linear actuators. .. argparse:: diff --git a/docs/agents/hwp_pcu.rst b/docs/agents/hwp_pcu.rst index af584efdc..02c9ba314 100644 --- a/docs/agents/hwp_pcu.rst +++ b/docs/agents/hwp_pcu.rst @@ -6,6 +6,9 @@ HWP PCU Agent ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The HWP Phase Compensation Unit (PCU) Agent interfaces with a 8 channel USB relay module (Numato Lab, product Number SKU:RL80001) to apply the discrete phase compensation in 120-degree increments for the HWP motor drive circuit. When used in conjunction with diff --git a/docs/agents/hwp_picoscope.rst b/docs/agents/hwp_picoscope.rst index 012139bf1..700734c6a 100644 --- a/docs/agents/hwp_picoscope.rst +++ b/docs/agents/hwp_picoscope.rst @@ -6,6 +6,9 @@ HWP Picoscope Agent ====================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The HWP picoscope agent interfaces with Picoscope 3403D MSO to operate the LC sensors which remotely measures the 3 dimentional position and temperature of hwp. This agent biases the LC sensors and measures the 4 channels of analog input and 8 channels of digital input. diff --git a/docs/agents/hwp_pid.rst b/docs/agents/hwp_pid.rst index 8b0193fa6..a8fdbbfd7 100644 --- a/docs/agents/hwp_pid.rst +++ b/docs/agents/hwp_pid.rst @@ -6,6 +6,9 @@ HWP PID Agent ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + .. argparse:: :filename: ../socs/agents/hwp_pid/agent.py :func: make_parser diff --git a/docs/agents/hwp_pmx.rst b/docs/agents/hwp_pmx.rst index 7ba0630d2..8d6eed2dd 100644 --- a/docs/agents/hwp_pmx.rst +++ b/docs/agents/hwp_pmx.rst @@ -6,6 +6,9 @@ HWP PMX Agent ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + .. argparse:: :filename: ../socs/agents/hwp_pmx/agent.py :func: make_parser diff --git a/docs/agents/hwp_supervisor_agent.rst b/docs/agents/hwp_supervisor_agent.rst index 5d84032cd..667ba482a 100644 --- a/docs/agents/hwp_supervisor_agent.rst +++ b/docs/agents/hwp_supervisor_agent.rst @@ -6,6 +6,9 @@ HWP Supervisor Agent ===================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The HWP supervisor agent monitors and can issue commands to hwp subsystems, and monitors data from other agents on the network that may be relevant to HWP operation. Session data from the supervisor agent's ``monitor`` task can be diff --git a/docs/agents/ibootbar.rst b/docs/agents/ibootbar.rst index 52ee65550..4bef9e02b 100644 --- a/docs/agents/ibootbar.rst +++ b/docs/agents/ibootbar.rst @@ -6,6 +6,9 @@ iBootbar Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The iBootbar Agent is an OCS Agent which monitors and sends commands to the dataprobe iBoot PDU or iBoot Bar. iBoot Bar is an older device. Monitoring and commanding is performed via SNMP. diff --git a/docs/agents/ifm_sbn246_flowmeter.rst b/docs/agents/ifm_sbn246_flowmeter.rst index 3265fec2c..3bc876765 100644 --- a/docs/agents/ifm_sbn246_flowmeter.rst +++ b/docs/agents/ifm_sbn246_flowmeter.rst @@ -6,6 +6,9 @@ IFM SBN246 Flowmeter Agent ========================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The IFM SBN246 Flowmeter Agent is an OCS Agent which monitors flow in liters per minute and temperature in Celsius of the cooling loop of the DRs installed at the site. Monitoring is performed by connecting the flowmeter device to an diff --git a/docs/agents/kikusui_pcr500ma.rst b/docs/agents/kikusui_pcr500ma.rst index c7c4af58f..04759b69d 100644 --- a/docs/agents/kikusui_pcr500ma.rst +++ b/docs/agents/kikusui_pcr500ma.rst @@ -6,6 +6,9 @@ KIKUSUI PCR500MA Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent is designed to interface with KIKUSUI's PCR500MA AC power supply. diff --git a/docs/agents/labjack.rst b/docs/agents/labjack.rst index f9f1c343b..6f35402fb 100644 --- a/docs/agents/labjack.rst +++ b/docs/agents/labjack.rst @@ -6,6 +6,9 @@ LabJack Agent ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + LabJacks are generic devices for interfacing with different sensors, providing analog and digital inputs and outputs. They are then commanded and queried over Ethernet. diff --git a/docs/agents/lakeshore240.rst b/docs/agents/lakeshore240.rst index 3cac61b9d..a488cffa9 100644 --- a/docs/agents/lakeshore240.rst +++ b/docs/agents/lakeshore240.rst @@ -6,6 +6,9 @@ Lakeshore 240 ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Lakeshore 240 is a 4-lead meausrement device used for readout of ROXes and Diodes at 1K and above. diff --git a/docs/agents/lakeshore336.rst b/docs/agents/lakeshore336.rst index ddf838342..9aa855341 100644 --- a/docs/agents/lakeshore336.rst +++ b/docs/agents/lakeshore336.rst @@ -6,6 +6,9 @@ Lakeshore 336 ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Lakeshore 336 Agent interfaces with the Lakeshore 336 (LS336) hardware to perform temperature monitoring and servoing on the LS336's four channels. This setup is currently primarily being used for controlling a cold load. diff --git a/docs/agents/lakeshore370.rst b/docs/agents/lakeshore370.rst index 78c06d7b3..701c64379 100644 --- a/docs/agents/lakeshore370.rst +++ b/docs/agents/lakeshore370.rst @@ -6,6 +6,9 @@ Lakeshore 370 ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Lakeshore 370 (LS370) units are an older version of the Lakshore 372, used for 100 mK and 1K thermometer readout. Basic functionality to interface and control an LS370 is provided by the diff --git a/docs/agents/lakeshore372.rst b/docs/agents/lakeshore372.rst index 80e6d4f6f..ec167935b 100644 --- a/docs/agents/lakeshore372.rst +++ b/docs/agents/lakeshore372.rst @@ -6,6 +6,9 @@ Lakeshore 372 ============= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Lakeshore 372 Agent interfaces with the Lakeshore 372 (LS372) hardware to perform 100 mK and 1K thermometer readout and control heater output. Basic functionality to interface and control an LS372 is provided by the diff --git a/docs/agents/lakeshore425.rst b/docs/agents/lakeshore425.rst index b61902545..dcd904b3a 100644 --- a/docs/agents/lakeshore425.rst +++ b/docs/agents/lakeshore425.rst @@ -6,6 +6,9 @@ Lakeshore 425 ====================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Lakeshore Model 425 gaussmeter is a device which measure the magnetic field by hall sensor. This agent is used to measure the magnetic field from the superconducting magnetic bearing of the CHWP rotation mechanism and to monitoring the status of floating and rotating CHWP. diff --git a/docs/agents/latrt_xy_stage.rst b/docs/agents/latrt_xy_stage.rst index 7a5b9f647..a984d75a6 100644 --- a/docs/agents/latrt_xy_stage.rst +++ b/docs/agents/latrt_xy_stage.rst @@ -6,6 +6,9 @@ LATRt XY Stage Agent ===================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent is used to communicate with the XY Stages used in the LATRt lab. These stages are run off a Raspberry Pi connected to some custom electronics boards for communicating with the stages. diff --git a/docs/agents/ld_monitor.rst b/docs/agents/ld_monitor.rst index 6072eec37..b53c46f31 100644 --- a/docs/agents/ld_monitor.rst +++ b/docs/agents/ld_monitor.rst @@ -4,6 +4,9 @@ Lightning Detector Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The lightning detector agent communicates with the Lightning Detector System at the site and parses the data to obtain approximate lightning strike distances and standardized alarm levels. diff --git a/docs/agents/magpie.rst b/docs/agents/magpie.rst index dd264ab04..d6aa9d31d 100644 --- a/docs/agents/magpie.rst +++ b/docs/agents/magpie.rst @@ -6,6 +6,9 @@ Magpie Agent =============== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The magpie is an incredibly intelligent bird, with a decent ability to mimic other bird calls, though not as good as `the superb lyrebird `_. In the context of OCS, the job diff --git a/docs/agents/meinberg_m1000_agent.rst b/docs/agents/meinberg_m1000_agent.rst index 2757cc447..500613f25 100644 --- a/docs/agents/meinberg_m1000_agent.rst +++ b/docs/agents/meinberg_m1000_agent.rst @@ -4,6 +4,9 @@ Meinberg M1000 Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Meinberg M1000 Agent is an OCS Agent which monitors the Meinberg M1000, the main source of timing for the SO site. Monitoring is performed via SNMP. diff --git a/docs/agents/meinberg_syncbox_agent.rst b/docs/agents/meinberg_syncbox_agent.rst index c602acbb2..31fd26766 100644 --- a/docs/agents/meinberg_syncbox_agent.rst +++ b/docs/agents/meinberg_syncbox_agent.rst @@ -6,6 +6,9 @@ Meinberg Syncbox Agent ====================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Meinberg Syncbox Agent is an OCS Agent which monitors the Meinberg syncbox, the Monitoring is performed via SNMP. diff --git a/docs/agents/orientalmotor_blh.rst b/docs/agents/orientalmotor_blh.rst index b1c0bd269..c338648b1 100644 --- a/docs/agents/orientalmotor_blh.rst +++ b/docs/agents/orientalmotor_blh.rst @@ -6,6 +6,9 @@ Oriental Motor BLH Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent is designed to interface with Oriental Motor's BLH series motor controllers. Only controllers with a model number that includes '-KD' are compatible with this agent. The controller is identified as a serial port, diff --git a/docs/agents/pfeiffer.rst b/docs/agents/pfeiffer.rst index 0d4b04ec5..bfc7e0bea 100644 --- a/docs/agents/pfeiffer.rst +++ b/docs/agents/pfeiffer.rst @@ -7,6 +7,9 @@ Pfeiffer TPG 366 Agent ====================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Pfeiffer TPG 366 Controller is a six channel pressure gauge monitor. The Pfeiffer agent communicates with the Controller module, and reads out pressure readingss from the six different channels. diff --git a/docs/agents/pfeiffer_tc400.rst b/docs/agents/pfeiffer_tc400.rst index 73016e36f..2d5331402 100644 --- a/docs/agents/pfeiffer_tc400.rst +++ b/docs/agents/pfeiffer_tc400.rst @@ -6,6 +6,9 @@ Pfeiffer TC 400 Agent ===================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Pfeiffer TC 400 Agent is an OCS Agent which controls the Pfeiffer TC 400 electronic drive unit, which control the turbos used for the bluefors DR. The communcation is done over serial, and should be diff --git a/docs/agents/pysmurf-controller.rst b/docs/agents/pysmurf-controller.rst index f5b9d4998..efc0f23c6 100644 --- a/docs/agents/pysmurf-controller.rst +++ b/docs/agents/pysmurf-controller.rst @@ -6,6 +6,9 @@ Pysmurf Controller ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Pysmurf Controller OCS agent provides an interface to run pysmurf and sodetlib control scripts on the smurf-server through an OCS client. diff --git a/docs/agents/pysmurf-monitor.rst b/docs/agents/pysmurf-monitor.rst index 2ee55b3ea..3718b472a 100644 --- a/docs/agents/pysmurf-monitor.rst +++ b/docs/agents/pysmurf-monitor.rst @@ -6,6 +6,9 @@ Pysmurf Monitor ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The pysmurf_monitor agent listens to the UDP messages that the *pysmurf publisher* sends and acts on them. It will add newly registered filse to the pysmurf_files database, and send session info to pysmurf-controller diff --git a/docs/agents/rtsp_camera.rst b/docs/agents/rtsp_camera.rst index acd7e8a72..de40fba16 100644 --- a/docs/agents/rtsp_camera.rst +++ b/docs/agents/rtsp_camera.rst @@ -6,6 +6,9 @@ RTSP Camera Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This OCS Agent which grabs screenshots and records video from IP cameras supporting the RTSP streaming protocol. diff --git a/docs/agents/scpi_psu.rst b/docs/agents/scpi_psu.rst index 9be2fc5c0..9bc9f6f66 100644 --- a/docs/agents/scpi_psu.rst +++ b/docs/agents/scpi_psu.rst @@ -6,6 +6,9 @@ SCPI PSU Agent ============== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent uses Standard Commands for Programmable Instruments (SCPI) It works for many power supplies, including the Keithley 2230G and BK Precision 9130. It connects to the PSU over ethernet, and allows diff --git a/docs/agents/smurf_crate_monitor.rst b/docs/agents/smurf_crate_monitor.rst index d6e2d4e32..2ebdc6bf9 100644 --- a/docs/agents/smurf_crate_monitor.rst +++ b/docs/agents/smurf_crate_monitor.rst @@ -6,6 +6,9 @@ Smurf Crate Monitor Agent ========================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The SMuRF readout system uses Advanced Telecommunications Computing Architecture (ATCA) crates for powering and communicating between boards and the site networking and timing infrastructure. This Agent monitors the sensors in these ATCA crates. diff --git a/docs/agents/smurf_file_emulator.rst b/docs/agents/smurf_file_emulator.rst index 7c0623396..39c7f9c42 100644 --- a/docs/agents/smurf_file_emulator.rst +++ b/docs/agents/smurf_file_emulator.rst @@ -6,6 +6,9 @@ Smurf File Emulator ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Smurf File Emulator agent creates fake pysmurf and g3 files using the same directory structure that we're currently archiving on simons1. This is for DAQ end-to-end and bookbinder tests. diff --git a/docs/agents/smurf_hammer.rst b/docs/agents/smurf_hammer.rst index 3efe61ed7..9a041a868 100644 --- a/docs/agents/smurf_hammer.rst +++ b/docs/agents/smurf_hammer.rst @@ -7,7 +7,7 @@ SMuRF Hammer Agent ================== .. image:: https://img.shields.io/badge/AI-assisted-orange - :alt: Agent written with AI assitance + :alt: Agent written with AI assistance The SMuRF Hammer Agent wraps sodetlib's ``jackhammer hammer`` CLI command as an OCS agent. It operates on the crate controlled by the SMuRF server to which it diff --git a/docs/agents/smurf_timing_card.rst b/docs/agents/smurf_timing_card.rst index 1cea92151..14cf02e64 100644 --- a/docs/agents/smurf_timing_card.rst +++ b/docs/agents/smurf_timing_card.rst @@ -5,6 +5,10 @@ ======================== Smurf Timing Card Agent ======================== + +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Smurf Timing Card Agent monitors several diagnostic EPICS registers from SLAC's timing software. diff --git a/docs/agents/srs_cg635.rst b/docs/agents/srs_cg635.rst index b452cd0e8..be981911b 100644 --- a/docs/agents/srs_cg635.rst +++ b/docs/agents/srs_cg635.rst @@ -6,6 +6,9 @@ SRS CG635 Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The SRS CG635 Agent is an OCS Agent which retrieves data from the SRS CG635 clock via a Prologix GPIB interface. diff --git a/docs/agents/stimulator_encoder.rst b/docs/agents/stimulator_encoder.rst index 912098f15..bf6d549c4 100644 --- a/docs/agents/stimulator_encoder.rst +++ b/docs/agents/stimulator_encoder.rst @@ -6,6 +6,9 @@ Stimulator Encoder Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The optical encoder signals of the stimulator are captured by Kria KR260 boards with the PTP timing reference. This agent runs inside the KR260 to publish captured data to the crossbar. diff --git a/docs/agents/stimulator_thermometer.rst b/docs/agents/stimulator_thermometer.rst index 4302a4283..cb34b5cab 100644 --- a/docs/agents/stimulator_thermometer.rst +++ b/docs/agents/stimulator_thermometer.rst @@ -5,6 +5,10 @@ ============================ Stimulator Thermometer Agent ============================ + +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This is an OCS agent to acquire temperature data of the stimulator. .. argparse:: diff --git a/docs/agents/suprsync.rst b/docs/agents/suprsync.rst index 4150ba40c..58ee0e866 100644 --- a/docs/agents/suprsync.rst +++ b/docs/agents/suprsync.rst @@ -6,6 +6,9 @@ SupRsync Agent ============== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The SupRsync agent keeps a local directory synced with a remote server. It continuously copies over new files to its destination, verifying the copy by checking the md5sum and deleting the local files after a specified amount diff --git a/docs/agents/synacc.rst b/docs/agents/synacc.rst index 455acf66e..1251a3c59 100644 --- a/docs/agents/synacc.rst +++ b/docs/agents/synacc.rst @@ -5,6 +5,10 @@ ================== Synaccess Agent ================== + +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Synaccess Agent interfaces with the power strip over ethernet to control different outlets as well as get their status. diff --git a/docs/agents/tektronix3021c.rst b/docs/agents/tektronix3021c.rst index c5f47bbd6..8fa9e0bd1 100644 --- a/docs/agents/tektronix3021c.rst +++ b/docs/agents/tektronix3021c.rst @@ -6,6 +6,9 @@ Tektronix AWG Agent =================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + This agent uses Standard Commands for Programmable Instruments (SCPI) It works for many function generators, including the Tektronix3021c. It connects to the function generator over ethernet, and allows diff --git a/docs/agents/thorlabs_mc2000b.rst b/docs/agents/thorlabs_mc2000b.rst index ddb1a8d79..4be914906 100644 --- a/docs/agents/thorlabs_mc2000b.rst +++ b/docs/agents/thorlabs_mc2000b.rst @@ -6,6 +6,9 @@ Thorlabs MC2000B Agent ======================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Thorlabs MC2000B Agent is an OCS agent which helps monitor input and output frequencies of the Thorlabs chopper, and sends commands to set the frequency of the chopper, as well as other features such as the bladetype and reference modes of the device. diff --git a/docs/agents/ucsc_radiometer.rst b/docs/agents/ucsc_radiometer.rst index 2aecb41ee..c71ff0df2 100644 --- a/docs/agents/ucsc_radiometer.rst +++ b/docs/agents/ucsc_radiometer.rst @@ -6,6 +6,9 @@ UCSC Radiometer Agent ===================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The UCSC Radiometer Agent monitors the PWV through the UCSC Radiometer web server. .. argparse:: diff --git a/docs/agents/ups.rst b/docs/agents/ups.rst index 7c9d37092..6dcb7cbad 100644 --- a/docs/agents/ups.rst +++ b/docs/agents/ups.rst @@ -6,6 +6,9 @@ UPS Agent ==================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The UPS Agent is an OCS Agent which monitors various UPS models via SNMP. .. argparse:: diff --git a/docs/agents/vantage_pro2.rst b/docs/agents/vantage_pro2.rst index 776d20b8c..8e521ebf8 100644 --- a/docs/agents/vantage_pro2.rst +++ b/docs/agents/vantage_pro2.rst @@ -6,6 +6,9 @@ Vantage Pro2 Agent ================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Davis Instruments Vantage Pro2 is a weather system + monitor used to acquire and readout weather data. The Vantage Pro2 monitor is connected to the laboratory computer via usb cable and data is sent though that connection. diff --git a/docs/agents/wiregrid_actuator.rst b/docs/agents/wiregrid_actuator.rst index a154adadb..74ed08625 100644 --- a/docs/agents/wiregrid_actuator.rst +++ b/docs/agents/wiregrid_actuator.rst @@ -6,6 +6,9 @@ Wiregrid Actuator Agent ======================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Wiregrid Actuator Agent controls the linear actuator to insert or eject the wire-grid via a GALIL motor controller. It communicates with the controller via an ethernet. diff --git a/docs/agents/wiregrid_encoder.rst b/docs/agents/wiregrid_encoder.rst index 761b7c788..022fd69eb 100644 --- a/docs/agents/wiregrid_encoder.rst +++ b/docs/agents/wiregrid_encoder.rst @@ -6,6 +6,9 @@ Wiregrid Encoder Agent ======================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Wiregrid Encoder Agent records the wire-grid encoder outputs related to the rotational angle of the wire-grid. The encoder reader data is read by a BeagleBoneBlack diff --git a/docs/agents/wiregrid_kikusui.rst b/docs/agents/wiregrid_kikusui.rst index e32d1d042..a19982ca5 100644 --- a/docs/agents/wiregrid_kikusui.rst +++ b/docs/agents/wiregrid_kikusui.rst @@ -6,6 +6,9 @@ Wiregrid Kikusui Agent ======================= +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Wiregrid Kikusui Agent controls the wire-grid rotation. The KIKUSUI is a power supply and it is controlled via serial-to-ethernet converter. diff --git a/docs/agents/wiregrid_tiltsensor.rst b/docs/agents/wiregrid_tiltsensor.rst index ecfb9837c..faf36cf10 100644 --- a/docs/agents/wiregrid_tiltsensor.rst +++ b/docs/agents/wiregrid_tiltsensor.rst @@ -6,6 +6,9 @@ Wiregrid Tilt Sensor Agent ========================== +.. image:: https://img.shields.io/badge/AI-free-green + :alt: Agent written without AI assistance + The Wiregrid Tilt Sensor Agent records the wire-grid tilt sensor outputs related to the tilt angle of the wire-grid plane along the gravitaional direction. There is two types of tilt sensors, DWL and sherborne. diff --git a/docs/user/installation.rst b/docs/user/installation.rst index b73171fae..a987baa06 100644 --- a/docs/user/installation.rst +++ b/docs/user/installation.rst @@ -5,12 +5,12 @@ Installation Install and update with pip:: - $ pip install -U socs + $ python -m pip install -U socs You may install optional dependencies by including one or more agent group names on installation, for example:: - $ pip3 install -U socs[labjack,pfeiffer] + $ python -m pip install -U socs[labjack,pfeiffer] The different groups, and the agents they provide dependencies for are: @@ -40,7 +40,7 @@ The different groups, and the agents they provide dependencies for are: If you would like to install all optional dependencies use the special varient "all":: - $ pip3 install -U socs[all] + $ python -m pip install -U socs[all] .. note:: Some Agents have additional dependencies that cannot be installed with pip. @@ -61,8 +61,8 @@ To install from source, clone the respository and install with pip:: git clone https://github.com/simonsobs/socs.git cd socs/ - pip3 install -r requirements.txt - pip3 install . + python -m pip install -r requirements.txt + python -m pip install . .. note:: If you are expecting to develop socs code you should consider using diff --git a/socs/agents/smurf_hammer/agent.py b/socs/agents/smurf_hammer/agent.py index 340feeac4..33c705f60 100644 --- a/socs/agents/smurf_hammer/agent.py +++ b/socs/agents/smurf_hammer/agent.py @@ -1,4 +1,4 @@ -# Agent developed with AI assistance. +# Code developed with AI assistance. import argparse import os diff --git a/tests/README.rst b/tests/README.rst index 2fc91f700..432233dcb 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -4,7 +4,7 @@ Tests We use `pytest `_ as the test runner for SOCS. To run all of the tests, from with in the ``socs/tests/`` directory, run pytest:: - $ python3 -m pytest --cov + $ python -m pytest --cov This will run every test, both unit and integration tests. Integration tests depend on mocked up versions of the hardware the agents in question interface @@ -19,11 +19,11 @@ to limit which tests run. Here are some examples. Run only one test file:: - $ python3 -m pytest --cov socs agents/test_ls372_agent.py + $ python -m pytest --cov socs agents/test_ls372_agent.py Run tests based on test name(s):: - $ python3 -m pytest --cov -k 'test_ls372_init_lakeshore_task' + $ python -m pytest --cov -k 'test_ls372_init_lakeshore_task' Note that this will match to the beginning of the test names, so the above will match 'test_ls372_init_lakeshore_task' as well as @@ -38,11 +38,11 @@ be used to select or deselect tests. To run only the unit tests run:: - $ python3 -m pytest --cov -m 'not integtest' + $ python -m pytest --cov -m 'not integtest' To run only the integration tests:: - $ python3 -m pytest --cov -m 'integtest' + $ python -m pytest --cov -m 'integtest' .. note:: The integration tests depend on '--cov' being used, so all examples here @@ -51,7 +51,7 @@ To run only the integration tests:: You can view the available markers with:: - $ python3 -m pytest --markers + $ python -m pytest --markers @pytest.mark.integtest: marks tests as integration test (deselect with '-m "not integtest"') @pytest.mark.spt3g: marks tests that depend on spt3g (deselect with '-m "not spt3g"') @@ -63,7 +63,7 @@ with `Coverage.py `_. To obtain code coverage:: - $ python3 -m pytest --cov --cov-report=html + $ python -m pytest --cov --cov-report=html You can then view the coverage report in the ``htmlcov/`` directory. Coverage for SOCS is also automatically reported to @@ -84,5 +84,5 @@ ignored by the automatic test discovery in pytest. When running against hardware, call only the test you'd like to run. For instance, to test just the Lakeshore 372:: - $ cd hardware/ - $ python3 -m pytest test_ls372.py + $ cd hardware/ + $ python -m pytest test_ls372.py