Package: hera-mc
hera_mcThis is the main repository for HERA's monitor and control subsystems.The HERA M&C system contains two primary types of tables and data:Configuration Management: This is the information about how all the hardware in
the telescope is connected together. This is a fairly small dataset and is only updated
when people change things. This data can be useful for users to have locally to be
able to identify how things are connected together. The actual data is stored in a
separate repository,hera_cm_db_updates. If you only need configuration management
data, you can do a relatively light-weight install ofhera_mcand import the data
from that repo using SQLITE (which comes installed on many operating systems including
Macs).Real-time monitoring: This is the information about how the telescope is
operating. It includes information about commanded and actual settings of the various
systems as well as telemetry like temperatures. This is fairly large data and is
available onsite or at NRAO (based on a copy of the database that is refreshed weekly)
in an online PostgreSQL server. Much of this data can also be viewed in various
dashboards (including via grafana) linked fromhttps://heranow.reionization.org.DocumentationA detailed description of the monitor and control system and the database schema can be
found in ourdescription document.InstallationSimple installation via pip is available for users, developers should follow
the directions underDeveloper Installationbelow.For simple installation, the latest stable version is available via pip
(pip install hera_mc).There are some optional dependencies that are required for specific functionality,
which will not be installed automatically by pip.
SeeDependenciesfor details on installing optional dependencies.If you want to use the configuration management information and connect to either an
SQLITE or PostgreSQL database, follow the detailed installation
instructions indatabase_setup.md.DependenciesThe required dependencies are:alembicastropynumpypsycopg2pyyamlredis-pysetuptools_scmsqlalchemythe optional dependencies are:cartopyh5pypandaspsutilpython-dateutilpyuvdatatabulatetornadoWe suggest using conda to install all the dependencies.If you do not want to use conda, the packages are also available on PyPI. You can
install the optional dependencies via pip by specifying an option
when you install hera_mc, as inpip install hera_mc[sqlite]which will install all the required packages for using the lightweight configuration
management tools. The options that can be passed in this way are:
[sqlite,all,dev]. Thealloption will install all optional
dependencies,devadds packages that may be useful for developers.Developer InstallationClone the repository usinggit clone https://github.com/HERA-Team/hera_mcNavigate into the hera_mc directory and runpip install .(note thatpython setup.py installdoes not work).
Note that this will attempt to automatically install any missing dependencies.
If you use conda or another package manager you might prefer to first install
the dependencies as described inDependencies.To install without dependencies, runpip install --no-deps .If you want to do development on hera_mc, in addition to the other dependencies
you will need the following packages:pytestpytest-covcoveragepre-commitOne way to ensure you have all the needed packages is to use the includedenvironment.yamlfile to create a new environment that will contain all the optional
dependencies along with dependencies required development
(conda env create -f environment.yaml). Alternatively, you can specifydevwhen
installing hera_mc (as inpip install hera_mc[dev]) to install the packages needed
for development.To use pre-commit to prevent committing code that does not follow our style, you'll
need to runpre-commit installin the top levelhera_mcdirectory.For more instructions for developers, especially related to working with the database
and schema changes, see theDeveloper Instructions.TestsUses thepytestpackage to execute test suite. From the source hera_mc directory runpytest.