Using telmodel repository
The telmodel repository is a gitlab repo that the yanda team have created. The idea of this repo is that it will be the central hub for all static data that needs to be shared across teams. Each team hosts the data that they are responsible for themselves, and they have the right to change/edit the data, but once you upload the data to the telmodel repo all other teams can access, read and use it.
To read more about it see here https://developer.skao.int/projects/ska-telmodel-client/en/latest/
The basics are:
Accessing the data
To access the telmodel you must first install it,
uv add ska-telmodel-client
Data retrieval used to live in ska-telmodel; following ADR-122 it now lives in
ska-telmodel-client (schema validation moved to ska-schemas).
To avoid Gitlab rate limiting, set SKA_TELMODEL_GITLAB_PRIVATE_TOKEN
(CI_JOB_TOKEN is used automatically in CI).
Once it is installed you can access the data by
from ska_telmodel_client import TMData
tmdata = TMData()
print(tmdata['instrument/ska1_low/layout/low-layout.json'].get_dict())
Exporting data
Exporting the data is simple, create a directory called tmdata at the top level of your repo. Place any data/files you wish to export inside this directory. Then add the following stage to the gitlab pipeline
# Telescope model data job
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/tmdata.gitlab-ci.yml'
And include the tmdata build step in the Makefile
include .make/tmdata.mk