-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f71ab6e
commit 767a12a
Showing
32 changed files
with
1,313 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
black: true | ||
check-xml: true | ||
check-yaml: true | ||
clang-format: false | ||
flake8: true | ||
format-xmllint: false | ||
isort: true | ||
mypy: true | ||
ruff: true | ||
towncrier: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Copyright 2024 Association of Universities for Research in Astronomy, Inc. (AURA) | ||
Copyright 2023 Association of Universities for Research in Astronomy, Inc. (AURA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@Library('JenkinsShared')_ | ||
DevelopPipeline(name: "ts_mtreflector", module_name: "lsst.ts.mtreflector", idl_names: ["MTReflector"], extra_packages: ["lsst-ts/ts_ess_labjack", "lsst-ts/ts_ess_common"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@Library('JenkinsShared')_ | ||
CondaPipeline([], "ts-mtreflector", "lsst.ts.mtreflector", "noarch") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
############ | ||
ts_reflector | ||
############ | ||
############### | ||
ts_mtreflector | ||
############### | ||
|
||
|
||
|
||
.. Add a brief (few sentence) description of what this package provides. | ||
This CSC is used to connect to a labjack and operate the reflector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
# Python-only package | ||
scripts.BasicSConstruct("ts_reflector", disableCc=True, noCfgFile=True) | ||
scripts.BasicSConstruct("ts_mtreflector", disableCc=True, noCfgFile=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env python | ||
|
||
from lsst.ts.mtreflector import run_mtreflector | ||
|
||
run_mtreflector() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% set data= load_setup_py_data() %} | ||
package: | ||
name: ts-mtreflector | ||
version: {{ data.get('version') }} | ||
|
||
source: | ||
path: ../ | ||
|
||
build: | ||
noarch: python | ||
script: {{ PYTHON }} -m pip install --no-deps --ignore-installed . | ||
entry_points: | ||
- run_mtreflector = lsst.ts.mtreflector:run_mtreflector | ||
|
||
test: | ||
requires: | ||
- ts-conda-build =0.3 | ||
- ts-xml {{ xml_version }} | ||
- ts-utils | ||
- ts-salobj {{ salobj_version }} | ||
- labjack-ljm | ||
- ts-ess-common | ||
- ts-ess-labjack | ||
source_files: | ||
- pyproject.toml | ||
- python | ||
- tests | ||
commands: | ||
- pytest | ||
|
||
requirements: | ||
host: | ||
- python {{ python }} | ||
- pip | ||
- setuptools_scm | ||
- setuptools | ||
build: | ||
- python {{ python }} | ||
- setuptools_scm | ||
- setuptools | ||
- ts-conda-build =0.3 | ||
run: | ||
- python {{ python }} | ||
- ts-xml | ||
- ts-salobj | ||
- ts-utils | ||
- ts-ess-common | ||
- ts-ess-labjack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. py:currentmodule:: lsst.ts.mtreflector | ||
.. _lsst.ts.version_history: | ||
|
||
############### | ||
Version History | ||
############### | ||
|
||
v0.1.0 | ||
------ | ||
|
||
* The first release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
# Pytest configuration required to prevent pytest from looking for | ||
# configurations in parent directories. Can be empty. | ||
[build-system] | ||
requires = [ "setuptools", "setuptools_scm" ] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "ts_mtreflector" | ||
description = "CSC to operate switching of Reflector for calibration." | ||
license = { text = "GPL" } | ||
classifiers = [ "Programming Language :: Python :: 3" ] | ||
urls = { documentation = "https://ts-mtreflector.lsst.io", repository = "https://github.com/lsst-ts/ts_mtreflector" } | ||
dynamic = [ "version" ] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "setuptools_scm.get_version" } | ||
|
||
[tool.setuptools.packages.find] | ||
where = [ "python" ] | ||
|
||
[project.scripts] | ||
run_mtreflector = "lsst.ts.mtreflector:run_mtreflector" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "python/lsst/ts/mtreflector/version.py" | ||
write_to_template = """ | ||
# Generated by setuptools_scm | ||
__all__ = ["__version__"] | ||
__version__ = "{version}" | ||
""" | ||
|
||
[tool.pytest.ini_options] | ||
asyncio_mode = "auto" | ||
|
||
[project.optional-dependencies] | ||
dev = ["documenteer[pipelines]"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# This file is part of ts_mtreflector. | ||
# | ||
# Developed for the Vera C. Rubin Observatory Telescope and Site Systems. | ||
# This product includes software developed by the LSST Project | ||
# (https://www.lsst.org). | ||
# See the COPYRIGHT file at the top-level directory of this distribution | ||
# for details of code ownership. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
__all__ = ["CONFIG_SCHEMA"] | ||
|
||
import yaml | ||
|
||
# $schema: http://json-schema.org/draft-07/schema# | ||
# $id: https://github.com/lsst-ts/ | ||
# ts_mtreflector/python/lsst/ts/mtreflector/config_schema.py | ||
CONFIG_SCHEMA = yaml.safe_load( | ||
""" | ||
schema: http://json-schema.org/draft-07/schema# | ||
title: MTReflector v1 | ||
description: Schema for MTReflector | ||
type: object | ||
properties: | ||
device_type: | ||
description: LabJack model | ||
type: string | ||
default: T7 | ||
connection_type: | ||
description: Connection type | ||
type: string | ||
default: TCP | ||
identifier: | ||
description: >- | ||
LabJack indentifier: | ||
* A host name or IP address if connection_type = TCP or WIFI | ||
* A serial number if connection_type = USB | ||
* For testing in an environment with only one LabJack you may use ANY | ||
type: string | ||
topics: | ||
description: >- | ||
Array of batches of relevant sensors. | ||
type: array | ||
minItems: 1 | ||
items: | ||
types: object | ||
minItems: 1 | ||
properties: | ||
topic_name: | ||
description: Casual name for the sensor cluster. | ||
type: string | ||
sensor_name: | ||
description: Value for the sensor_name field of the topic. | ||
type: string | ||
location: | ||
description: >- | ||
Location of sensors. A comma-separated list, with one item per non-null channel_name. | ||
type: string | ||
channel_name: | ||
description: >- | ||
LabJack channel names, in order of the field array. | ||
type: string | ||
required: | ||
- topic_name | ||
- sensor_name | ||
- location | ||
- channel_name | ||
additionalProperties: false | ||
required: | ||
- device_type | ||
- connection_type | ||
- identifier | ||
- topics | ||
additionalProperties: false | ||
""" | ||
) |
Oops, something went wrong.