Saravanan666/pypi-org huggingface dataset:
Package: sdss-archon
archonA library and actor to communicate with an STA Archon controller.InstallationIn general you should be able to installarchonby doingpip install sdss-archonTo build from source, usegit clone git@github.com:sdss/archoncd archonpip install .DockerThe actor can run as a Docker container; new images formain(pointing to taglatest) and tags are created via a GitHub Action. The images are stored in the GitHub Container Registry. To pull the latest image rundocker pull ghcr.io/sdss/archon:latestTo run a containerdocker run --name archon --rm --detach --network host ghcr.io/sdss/archon:latestThis assumes that RabbitMQ is running on the default port in the host computer and that the Archon controllers are accessible over the host network.Developmentarchonusespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installarchonin a virtual environment by doingpoetry installOr in editable modepip install -e .Note that the latter will only install the production dependencies, not the development ones. You'll need to install those manually (seepyproject.toml[tool.poetry.dev-dependencies]).Style and type checkingThis project uses theblackcode style with 88-character line lengths for code and docstrings. It is recommended that you runblackon save. Imports must be sorted usingisort. The GitHub test workflow checks all the Python file to make sure they comply with the black formatting.Linting usesflake8andisortrules implemented usingruff.For Visual Studio Code, the following project file is compatible with the project configuration:{"[python]":{"editor.formatOnSave":true,"editor.codeActionsOnSave":{"source.fixAll":"explicit","source.organizeImports.ruff":"explicit"},"editor.wordWrap":"off","editor.tabSize":4,"editor.defaultFormatter":"ms-python.black-formatter"},"[markdown]":{"editor.wordWrapColumn":88},"[restructuredtext]":{"editor.wordWrapColumn":88},"[json]":{"editor.quickSuggestions":{"strings":true},"editor.suggest.insertMode":"replace","gitlens.codeLens.scopes":["document"],"editor.formatOnSave":true,"editor.defaultFormatter":"esbenp.prettier-vscode","editor.tabSize":2},"[yaml]":{"editor.insertSpaces":true,"editor.formatOnSave":true,"editor.tabSize":2,"editor.autoIndent":"advanced","gitlens.codeLens.scopes":["document"]},"prettier.tabWidth":2,"editor.rulers":[88],"editor.wordWrapColumn":88,"python.analysis.typeCheckingMode":"basic"}This assumes that thePythonandPylanceextensions are installed.This project usestype hints.
Package: sdss-basecam
basecambasecamprovides a wrapper around CCD camera APIs with an SDSS-style TCP/IP actor. The main benefits of usingbasecamare:Simplifies the creation of production-level camera libraries by providing all the common boilerplate so that you only need to focus on implementing the parts that are specific to your camera API.Provides a common API regardless of the underlying camera being handled.Powerful event handling and notification.
Package: sdss-bossICC
bossICCbossICC is the Instrument Control Computer for the BOSS spectrographs. It manages communications between other actors and the BOSS firmware, starting, stopping, and reading out exposures, moving collimators and other spectrograph mechanicals, and monitoring and managing voltages, pressures, and temperatures.Configuration (e.g. hosts/ports/logging directories) are found in thepython/bossICC/etc/directory. It should only be run on thesdss5-boss-iccvirtual machine.This product also can communicate with the engineering "benchboss" system by runningpython python/bossICC/bossICC.py benchboss.
Package: sdss-brain
sdss_brainSDSS product for streamlining and simplifying user experiences around SDSS data products.It combines the utility of other core SDSS packages, e.g.sdss-access,sdss-tree,sdssdb,sdsstoolsto enable more high level interaction between the SDSS data products.sdss_brain is in active development. Although the code is stable and can be used for production, the implementation of existing features may be changed without previous notice. This will change when we reach version 1.0.0.Useful linksGitHub:https://github.com/sdss/sdss_brainDocumentation:https://sdss-brain.readthedocs.orgIssues:https://github.com/sdss/sdss_brain/issues
Package: sdss-catl-utils
SDSS_Catl_Utils - Utilities for SDSS CataloguesRepository for handling the catalogues used in Calderon et al. (2018)
for the SDSS DR7 group galaxy catalogues.LicenseThis project is Copyright (c) Victor Calderon and licensed under
the terms of the BSD 3-Clause license. This package is based upon
theAstropy package templatewhich is licensed under the BSD 3-clause licence. See the licenses folder for
more information.
Package: sdss-cerebro
cerebroA library to gather time-series data from different sources and store them, with focus on InfluxDB databases. Documentation and concepts are definedhere.InstallationIn general you should be able to installcerebroby doingpip install sdss-cerebroTo build from source, usegit clone git@github.com:sdss/cerebrocd cerebropip install .Usecerebrois meant to run as a daemon. The simplest way to run it is simplycerebro startThis will run all the sources and use all the observers. You can define a specific profile to usecerebro --profile lvm-lab startor a series of sourcescerebro --sources lvm_govee_clean_room,lvm_sens4_r1 startNormallycerebrowill run in detached/daemon mode. It's also possible to pass the flag--debug(cerebro start --debug) to run the code in the foreground.Runcerebro --helpto get all the options available.Developmentcerebrousespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installcerebroin a virtual environment by doingpoetry installPip does not support editable installs with PEP-517 yet. That means that runningpip install -e .will fail becausepoetrydoesn't use asetup.pyfile. As a workaround, you can use thecreate_setup.pyfile to generate a temporarysetup.pyfile. To installcerebroin editable mode withoutpoetry, dopip install poetrypython create_setup.pypip install -e .The style code isblack.
Package: sdss-cherno
chernoSDSS guider actorInstallationIn general you should be able to installchernoby doingpip install sdss-chernoTo build from source, usegit clone git@github.com:sdss/chernocd chernopip install .Developmentchernousespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installchernoin a virtual environment by doingpoetry installStyle and type checkingThis project uses theblackcode style with 88-character line lengths for code and docstrings. It is recommended that you runblackon save. Imports must be sorted usingisort. The GitHub test workflow checks all the Python file to make sure they comply with the black formatting.Configuration files forflake8,isort, andblackare provided and will be applied by most editors. For Visual Studio Code, the following project file is compatible with the project configuration:{"python.formatting.provider":"black","[python]":{"editor.codeActionsOnSave":{"source.organizeImports":true},"editor.formatOnSave":true},"[markdown]":{"editor.wordWrapColumn":88},"[restructuredtext]":{"editor.wordWrapColumn":88},"editor.rulers":[88],"editor.wordWrapColumn":88,"python.analysis.typeCheckingMode":"basic"}This assumes that thePythonandPylanceextensions are installed.This project usestype hints. Typing is enforced by the test workflow usingpyright(in practice this means that ifPylancedoesn't produce any errors in basic mode,pyrightshouldn't).
Package: sdss-clu
CLUimplements a new protocol for SDSS actor while providing support for legacy-style actor.FeaturesAsynchronous API based onasyncio.New-style actor with message passing based onAMQPandRabbitMQ.Legacy-style actor for TCP socket communication viatron.Tools for device handling.Messages are validated JSON strings.click-enabled command parser.InstallationCLUcan be installed usingpipaspip install sdss-cluor from sourcegit clone https://github.com/sdss/clu
cd clu
pip install .Developmentcluusespoetryfor dependency management and packaging. To work with an editable install it’s recommended that you setuppoetryand installcluin a virtual environment by doingpoetry installPip does not support editable installs with PEP-517 yet. That means that runningpip install-e.will fail becausepoetrydoesn’t use asetup.pyfile. As a workaround, you can use thecreate_setup.pyfile to generate a temporarysetup.pyfile. To installcluin editable mode withoutpoetry, dopip install --pre poetry
pip install -U setuptools
python create_setup.py
pip install -e .Quick startCreating a new actor withCLUis easy. To instantiate and run an actor you can simply doimportasynciofromcluimportAMQPActorasyncdefmain(loop):actor=awaitActor('my_actor').start()awaitactor.run_forever()asyncio.run(main(loop))Next, head to theGetting startedsection for more information about using actors. More examples are availablehere.Why a new messaging protocol for SDSS?Say whatever you want about it, thecurrent SDSS message passing protocolbased onTron,opscore, andactorcoreis stable and robust. So, why should we replace it? Here is a list of reasons:It reinvents the wheel. Ok, in all honestyTronandopscorewere written when wheel were still not completely circular, but the truth is that nowadays there are more robust, standard, and better documented technologies out there for message passing.We can remove the need for a central hub product by relying in open-source message brokers such asRabbitMQ.Tronandopscoreare Python 2 and it’s unclear the amount of effort that would be needed to convert them to Python 3.While there is some documentation forTronandopscore, and the code is well written, it’s also cumbersome and difficult to modify by people that didn’t write it. It’s ultimately non-maintainable.Theopsctore/actorkeysdatamodel is custom-built and extremely difficult to maintain. Standard solutions such as JSON with aJSON schemavalidator should be preferred.asyncioprovides an asynchronous API that is cleaner and easier to code than using threads. It is also more readable and less convoluted thantwistedand it’s a Python core library with very active development.CLU usesclickfor parsing commands, providing a well-defined, easy to use parser.
Package: sdss-cluplus
CLU+adds some enhancements to sdss-cluFeaturesRPC/Corba/Zeroc Ice style actor communicationsAsyncio python usageComplex data transfer with jsonAlternative data handling with json-pickle, eg: numpyRecursive config file loadingInstallationCLU+can be installed usingpipaspip install sdss-cluplusor from sourcegit clone https://github.com/sdss/cluplus
cd cluplus
pip install .Next, head to theGetting startedsection for more information about using clu+.
Package: sdssdb
SDSSproduct for database management.sdssdb is in active development. Although the code is stable and can be used for production, the implementation of existing features may be changed without previous notice. This will change when we reach version 1.0.0.Useful linksGitHub:https://github.com/sdss/sdssdbDocumentation:https://sdssdb.readthedocs.orgIssues:https://github.com/sdss/sdssdb/issuesHow to use>>> from sdssdb.peewee.sdss5db import catalogdb
>>> targets = catalogdb.GaiaDR2Source.select().where(catalogdb.GaiaDR2Source.phot_g_mean_mag < 15)
Package: sdss-drift
SDSS-V Modbus PCL libraryThis library provides an asynchronous interface with modbus devices over a TCP ethernet controller (such asthis one) and control of the connected I/O modules. The code is a relatively thin wrapper aroundPymodbuswith the main feature being that it's possible to define a PLC controller and a complete set of modules as a YAML configuration file which can then be loaded. It also provides convenience methods to read and write to the I/O modules and to convert the read values to physical units.This code is mostly intended to interface with the SDSS-VFPSelectronic boxes but is probably general enough for other uses. It's originally based on Rick Pogge'sWAGO code.InstallationTo install, runpip install sdss-driftTo install from source, git clone or download the code, navigate to the root of the downloaded directory, and dopip install .sdss-driftusesPoetryfor development. To install it in development mode dopoetry install -E docsDocumentationRefer to the Read the Docsdocumentationfor more details.
Package: sdss-flicamera
flicameraA library to control Finger Lakes Instrumentation cameras. It provides the SDSSgfaCameraandfvcCameraactors to control the Guide, Focus and Acquisition cameras and Field View Camera, respectively.InstallationIn general you should be able to installflicameraby doingpip install sdss-flicameraAlthoughflicamerashould handle all the compilation of the FLI libraries, you may still need to modify your system to give your user access to the FLI USB devices. Seeherefor more details.To build from source, usegit clone git@github.com:sdss/flicameracd flicamerapip install .[docs]Developmentflicamerausespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installflicamerain a virtual environment by doingpoetry installPip does not support editable installs with PEP-517 yet. That means that runningpip install -e .will fail becausepoetrydoesn't use asetup.pyfile. As a workaround, you can use thecreate_setup.pyfile to generate a temporarysetup.pyfile. To installflicamerain editable mode withoutpoetry, dopip install --pre poetrypython create_setup.pypip install -e .
Package: sdss-fliswarm
fliswarmA tool to create and manage Docker instances offlicamera.InstallationYou can installfliswarmby doingpip install sdss-fliswarmTo build from source, usegit clone git@github.com:sdss/fliswarmcd fliswarmpip install .Developmentfliswarmusespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installfliswarmin a virtual environment by doingpoetry installPip does not support editable installs with PEP-517 yet. That means that runningpip install -e .will fail becausepoetrydoesn't use asetup.pyfile. As a workaround, you can use thecreate_setup.pyfile to generate a temporarysetup.pyfile. To installfliswarmin editable mode withoutpoetry, dopip install poetrypython create_setup.pypip install -e .
Package: sdss-lcolamps
lcolampsA library to control the LCO M2 lamps.InstallationIn general you should be able to installlcolampsby doingpip install sdss-lcolampsTo build from source, usegit clone git@github.com:sdss/lcolampscd lcolampspip install .[docs]Developmentlcolampsusespoetryfor dependency management and packaging. To work with an editable install it's recommended that you setuppoetryand installlcolampsin a virtual environment by doingpoetry install
Package: sdss-lvmagp
lvmagplvmagp which controls focuser, guide camera and mount.QuickstartInstallgit clone --recurse-submodules -j8 --remote-submodules https://github.com/sdss/lvm.git
cd lvm
(cd lvmcam && git switch refactor && poetry update && poetry install)
(cd lvmagp && git switch refactor && poetry update && poetry install)Run actors(cd lvmtan && poetry run container_start --kill --name lvm.all)
(cd lvmpwi && poetry run container_start --simulator --name=lvm.sci.pwi&)

(cd lvmcam && poetry run lvmcam -c python/lvmcam/etc/lvm.sci.agcam.yml start --debug &)
(cd lvmcam && poetry run python utils/simple_camui.py &)

(cd lvmagp && poetry run lvmagp -c python/lvmagp/etc/lvm.sci.agp.yml start --debug &)Run example scripts - maybe in a extra shellcd lvmagp 

poetry run python python/lvm/tel/aquisition.py --help

poetry run python python/lvm/tel/aquisition.py -r 22 -d -46 -v 

poetry run python python/lvm/tel/focus.py -f -v

poetry run python python/lvm/tel/calibrate.py -o 20 -vGuider start/stop from python shellDo not use this in a python script without try/except.import sys
import uuid
from logging import DEBUG
from clu import AMQPClient, CommandStatus
from cluplus.proxy import Proxy, invoke, unpack

amqpc = AMQPClient(name=f"{sys.argv[0]}.client-{uuid.uuid4().hex[:8]}")
ag = Proxy(amqpc, "lvm.sci.ag").start()
ag.guideStart()
ag.status()
ag.guideStop()
Package: sdss-lvmecp
lvmecpSDSS-V LVM Enclosure Control PackageFeaturesCLU Actor based interfaceSupportsDirectLogic 205 (Micro Modular PLC)PrerequisiteInstallPoetryby using PyPI.$ pip install poetry
$ python create_setup.py
$ pip install -e .InstallRabbitMQby using apt-get.$ sudo apt-get install -y erlang
$ sudo apt-get install -y rabbitmq-server
$ sudo systemctl enable rabbitmq-server
$ sudo systemctl start rabbitmq-serverInstallCLUby using PyPI.$ pip install sdss-cluInstallationClone this repository.$ git clone https://github.com/sdss/lvmecp
$ cd lvmecp
$ poetry installQuick StartStart the actorBefore you start the actor, you must have the PLC or simulator.Startlvmecpactor.$ lvmecp startIn another terminal, typecluandlvmecp pingfor test.$ clu
lvmecp ping
     07:41:22.636 lvmecp >
     07:41:22.645 lvmecp : {
         "text": "Pong."
         }Stoplvmecpactor.$ lvmecp stopExampleIn terminal which you are turning clu on, you can use the command for lvmecp.$ clu
lvmecp help
13:05:25.386 lvmecp >
13:05:25.387 lvmecp : {
    "help": [
        "Usage: lvmecp [OPTIONS] COMMAND [ARGS]...",
        "",
        "Options:",
        "  --help  Show this message and exit.",
        "",
        "Commands:",
        "  dome        tasks for Dome",
        "  estop       activate the emergency status.",
        "  get_schema  Returns the schema of the actor as a JSON schema.",
        "  help        Shows the help.",
        "  keyword     Prints human-readable information about a keyword.",
        "  light       tasks for lights",
        "  monitor     return the status of HVAC system and air purge system.",
        "  ping        Pings the actor.",
        "  telemetry   return the status of the enclosure",
        "  version     Reports the version."
    ]
}
lvmecp dome status
13:05:56.294 lvmecp >
13:05:56.295 lvmecp i {
    "text": "checking the Dome"
}
13:05:56.302 lvmecp i {
    "status": {
        "Dome": "CLOSE"
    }
}
13:05:56.302 lvmecp :
lvmecp dome move
13:06:21.701 lvmecp >
13:06:21.703 lvmecp i {
    "text": "moving the Dome"
}
13:06:21.708 lvmecp i {
    "status": {
        "Dome": "OPEN"
    }
}
13:06:21.709 lvmecp :
Package: sdss-lvmieb
lvmiebControl software for the SDSS-V LVM (Local Volume Mapper) spectrograph Instrument Electronics Box (IEB).Quick StartInstallationlvmiebuses theCLUframework and requires a RabbitMQ instance running in the background.lvmiebcan be installed usingpippip install sdss-lvmiebor by cloning this repositorygit clone https://github.com/sdss/lvmiebThe preferred installation for development is usingpoetrycd lvmiebpoetry installBasic ping-pong testStart thelvmiebactor.lvmieb startIn another terminal, typecluandlvmieb pingfor test.$clulvmieb ping07:41:22.636 lvmieb >07:41:22.645 lvmieb : {"text": "Pong."}Stoplvmiebactor.lvmieb stop
Package: sdss-lvmscp
lvmscpSDSS-V LVM (Local Volume Mapper) control software for the spectrograph system.Quick StartInstallationlvmscpuses theCLUframework and requires a RabbitMQ instance running in the background.lvmscpcan be installed usingpippip install sdss-lvmscpor by cloning this repositorygit clone https://github.com/sdss/lvmscpThe preferred installation for development is usingpoetrycd lvmscppoetry install
Package: sdss-lvmscraper
lvm scraperscraps dataFeaturesscraps data from the rabbitmq exchangesimple web interfacecreates 8key fits cards from dataInstallationlvm scrapercan be installed usingpipaspip install sdss-lvmscraperor from sourcegit clone https://github.com/sdss/lvmscraper
cd lvmscraper
pip install .Quickstartpoetry run lvmscraper startTodoUsageStart some actorsThe actor interface has two commands data & fits with an option –filter#>clulvm.scraper data
10:03:03.729 lvm.scraper >
10:03:03.751 lvm.scraper : {
   ...
}
lvm.scraper data --filter lvm.*.foc
10:03:20.792 lvm.scraper >
10:03:20.858 lvm.scraper : {
   ...
}
lvm.scraper fits
10:03:27.498 lvm.scraper >
10:03:27.507 lvm.scraper : {
   ...
}
lvm.scraper fits --filter *.foc
10:03:37.945 lvm.scraper >
10:03:37.957 lvm.scraper : {
  ...
}On port 8085 there is a webserver
Package: sdss-lvmtan
lvmtanLvm Tan Clu WrapperFeaturesCLU based wrapper forTwiceAsNiceUses a container for deployment and testing.Uses podman¹ for building the container.¹ Setting an alias to use docker might work.alias podman="sudo docker"NoteAs of version 0.0.9 the container is renamed from ubuntu_lvmt_tan to lvmtanQuickstartBeginning with version  0.0.9 the container doesnt have to be build, a container is download automatically from github.git clone https://github.com/sdss/lvmtan.git
cd lvmtan      
poetry run container_start --kill --name lvm.allPrerequisitesSome linux distributions do not have python >= 3.7 as the standard python3 version.Centos 8.X# as root
yum install python38
# as user 
python3.8  -m pip  install --user --upgrade pip
pip3.8 install poetry
export PATH=~/.local/bin/:$PATHOpenSuSe 15.2/15.3# as root
zypper ar https://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Leap_15.2/ devel_python
zypper install python39-devel
# as user 
python3.9 -m ensurepip --default-pip # Alternatve: python3.9 -m venv ~/.local 
pip3.9 install --upgrade pip
pip3.9 install poetry
export PATH=~/.local/bin/:$PATHFor running tests or containers a running RabbitMQ on localhost is expected with guest/guestDownloadgit clone https://github.com/sdss/lvmtan.git
cd lvmtanBuild# update local py env
poetry update

# build sdist & wheel
poetry build

# build tan container
poetry run container_build
# rebuild tan container from scratch
poetry run container_build --no-cacheRun container# default config test.first.focus_stage-sim.conf
poetry run container_start
poetry run container_stop

# all stages config lvm.all-sim.conf
poetry run container_start --name lvm.all
poetry run container_stop --name lvm.all

# all stages config lvm.all-sim.conf and kill running container
poetry run container_start --kill --name lvm.all

# log of the running container, -f output appended data as the file grows.
podman logs -f lvm.all

# config test.first.focus_stage-svr.conf with real hardware
poetry run container_start --with-hw
poetry run container_stop

# derotator km with real hardware - check confige file config/test/derot/test.derot.km-dev.conf for correct MOD.TRAJ.CFG.CONNECTION.ADDRESS and MOD.TRAJ.CFG.CONNECTION.MODULE parameters
poetry run container_start --name test.derot.km --with-hw

# debug option, the local version is used instead of the latest github version when the container was built.
poetry run container_start --debugRun tests# run tests
poetry run pytest
# ... include slow tests with enabled log to stdout
poetry run pytest -p no:logging -s -v --runslow
# ... only test 02
poetry run pytest -k test_02_lvm_all.py
# ... without UI
DISPLAY= poetry run pytest -p no:logging -s -v -k test_02_lvm_all.pyPublish# publish to pypi
poetry publish --username=USER --password=PASS
# build rpm package
poetry run python setup.py bdist_rpm
# build deb package - needs python3-stdeb
poetry run python setup.py --command-packages=stdeb.command bdist_deb