{"id":18620531,"url":"https://github.com/simonsobs/ocs","last_synced_at":"2025-10-31T20:03:23.476Z","repository":{"id":35657224,"uuid":"123955674","full_name":"simonsobs/ocs","owner":"simonsobs","description":"A distributed control system for astronomical observatories.","archived":false,"fork":false,"pushed_at":"2025-03-31T17:10:31.000Z","size":4127,"stargazers_count":17,"open_issues_count":43,"forks_count":6,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-04-10T16:53:42.808Z","etag":null,"topics":["docker","library","monitoring","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonsobs.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-05T17:41:12.000Z","updated_at":"2025-02-24T22:53:10.000Z","dependencies_parsed_at":"2023-01-16T02:20:33.435Z","dependency_job_id":"cca89416-4238-4ab6-bafb-51ac6c6681c2","html_url":"https://github.com/simonsobs/ocs","commit_stats":{"total_commits":888,"total_committers":15,"mean_commits":59.2,"dds":0.6463963963963963,"last_synced_commit":"91c51d58f0f3b8cd924e463a6550b901965c217d"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Focs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Focs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Focs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonsobs%2Focs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonsobs","download_url":"https://codeload.github.com/simonsobs/ocs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329556,"owners_count":21085559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","library","monitoring","python"],"created_at":"2024-11-07T04:06:52.625Z","updated_at":"2025-10-31T20:03:23.403Z","avatar_url":"https://github.com/simonsobs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"================================\nOCS - Observatory Control System\n================================\n\n| |pypi| |versions| |docker| |license|\n| |tests| |pre-commit| |coverage| |docs|\n\nOverview\n--------\n\nThe OCS makes it easy to coordinate hardware operation and I/O tasks in a\ndistributed system such as an astronomical observatory or test laboratory. OCS\nrelies on the use of a central WAMP router (currently `crossbar.io`_) for\ncoordinating the communication and control of these distributed systems.\n\nThe OCS provides Python (and JavaScript) functions and classes to allow\n\"Clients\" to talk to \"Agents\". An Agent is a software program that knows how to\ndo something interesting and useful, such as acquire data from some device or\nperform cleanup operations on a particular file system. A Control Client could\nbe a web page with control buttons and log windows, or a script written by a\nuser to perform a series of unattended, interlocking data acquisition tasks.\n\nThis repository, `OCS`_, contains library code and core system\ncomponents.  Additional code for operating specific hardware can be\nfound in the `Simons Observatory Control System (SOCS)`_ repository.\nGrafana and InfluxDB are supported to provide a near real-time monitoring and\nhistorical look back of the housekeeping data.\n\n.. _crossbar.io: http://crossbario.com\n.. _`OCS`: https://github.com/simonsobs/ocs/\n.. _`Simons Observatory Control System (SOCS)`: https://github.com/simonsobs/socs/\n\nDependencies\n------------\n\nThis code targets Python 3.7+.\n\n* `so3g`_ - Required for using the HK Aggregator Agent.\n* `crossbar`_ (optional) - The supported WAMP router. Controllable via\n  `ocsbow`. Can be installed with pip\n  or run via Docker.\n\n.. _so3g: https://github.com/simonsobs/so3g\n.. _crossbar: https://pypi.org/project/crossbar/\n\nInstallation\n------------\n\nInstall and update with pip::\n\n    $ pip3 install -U ocs\n\nIf you need to install the optional so3g module you can do so via::\n\n    $ pip3 install -U ocs[so3g]\n\nInstalling from Source\n``````````````````````\n\nIf you are considering contributing to OCS, or would like to use an unreleased\nfeature, you will want to install from source. To do so, clone this repository\nand install using pip::\n\n  $ git clone https://github.com/simonsobs/ocs.git\n  $ cd ocs/\n  $ pip3 install -r requirements.txt\n  $ pip3 install .\n\n**Note:** If you want to install locally, not globally, throw the `--user` flag\non the pip3 commands.\n\nDocker Images\n-------------\nDocker images for OCS and each Agent are available on `Docker Hub`_. Official\nreleases will be tagged with their release version, i.e. ``v0.1.0``. These are\nonly built on release, and the ``latest`` tag will point to the latest of these\nreleased tags. These should be considered stable.\n\nTest images will be tagged with the latest released version tag, the number of\ncommits ahead of that release, the latest commit hash, i.e.\n``v0.6.0-53-g0e390f6``. These get built on each commit to the ``main`` branch,\nand are useful for testing and development, but should be considered unstable.\n\n.. _Docker Hub: https://hub.docker.com/u/simonsobs\n\nDocumentation\n-------------\nThe OCS documentation can be built using Sphinx. There is a separate\n``requirements.txt`` file in the ``docs/`` directory to install Sphinx and any\nadditional documentation dependencies::\n\n  $ cd docs/\n  $ pip3 install -r requirements.txt\n  $ make html\n\nYou can then open ``docs/_build/html/index.html`` in your preferred web\nbrowser. You can also find a copy hosted on `Read the Docs`_.\n\n.. _Read the Docs: https://ocs.readthedocs.io/en/latest/\n\nTests\n-----\nThe tests for OCS can be run using pytest, and should be run from the\n``tests/`` directory::\n\n  $ cd tests/\n  $ python3 -m pytest\n\nTo run the tests within a Docker container (useful if your local environment is\nmissing some dependencies), first make sure you build the latest ocs image,\nthen use docker run::\n\n  $ docker build -t ocs .\n  $ docker run --rm -w=\"/app/ocs/tests/\" ocs sh -c \"python3 -m pytest -m 'not integtest'\"\n\nFor more details see `tests/README.rst \u003ctests_\u003e`_.\n\n.. _tests: https://github.com/simonsobs/ocs/blob/main/tests/README.rst\n\nExample\n-------\n\nA self contained example, demonstrating the operation of a small observatory\nwith a single OCS Agent is contained in `example/miniobs/`_.  See the `readme`_\nin that directory for details.\n\n.. _example/miniobs/: https://github.com/simonsobs/ocs/tree/main/example/miniobs\n.. _readme: https://github.com/simonsobs/ocs/blob/main/example/miniobs/README.rst\n\nContributing\n------------\nFor guidelines on how to contribute to OCS see `CONTRIBUTING.rst`_.\n\n.. _CONTRIBUTING.rst: https://github.com/simonsobs/ocs/blob/main/CONTRIBUTING.rst\n\nLicense\n--------\nThis project is licensed under the BSD 2-Clause License - see the\n`LICENSE.txt`_ file for details.\n\n.. _LICENSE.txt: https://github.com/simonsobs/ocs/blob/main/LICENSE.txt\n\n\n.. |coverage| image:: https://codecov.io/gh/simonsobs/ocs/graph/badge.svg?token=UTX0AEPTX8\n    :target: https://codecov.io/gh/simonsobs/ocs\n\n.. |docker| image:: https://img.shields.io/badge/dockerhub-latest-blue\n    :target: https://hub.docker.com/r/simonsobs/ocs/tags\n\n.. |docs| image:: https://readthedocs.org/projects/ocs/badge/?version=main\n    :target: https://ocs.readthedocs.io/en/main/?badge=main\n    :alt: Documentation Status\n\n.. |license| image:: https://img.shields.io/pypi/l/ocs\n    :target: LICENSE.txt\n    :alt: PyPI - License\n\n.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/simonsobs/ocs/main.svg\n    :target: https://results.pre-commit.ci/latest/github/simonsobs/ocs/main\n    :alt: pre-commit.ci status\n\n.. |pypi| image:: https://img.shields.io/pypi/v/ocs\n    :target: https://pypi.org/project/ocs/\n    :alt: PyPI Package\n\n.. |tests| image:: https://img.shields.io/github/actions/workflow/status/simonsobs/ocs/develop.yml?branch=main\n    :target: https://github.com/simonsobs/ocs/actions?query=workflow%3A%22Build+Test+Images%22\n    :alt: GitHub Workflow Status\n\n.. |versions| image:: https://img.shields.io/pypi/pyversions/ocs\n    :alt: PyPI - Python Version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Focs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonsobs%2Focs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonsobs%2Focs/lists"}