Configuration¶
Skare3-tools configuration.
The configuration is automatically set with default values which specify the location of the skare3 repository, the different conda channels used, the Github organizations who own the packages, and the directory where to store cached data. This happens the first time this module is imported.
Normally, a user does not need to do anything except to add an environment variable with the standard password to conda channels called CONDA_PASSWORD.
The configuration is saved in JSON format, in the data directory:
specified by the SKARE3_TOOLS_DATA environmental variable,
or $SKA/data/skare3/skare3_data.
The directory must already exist: it is operational data (on synced hosts it rides the $SKA/data sync). If it cannot be determined, does not exist, or needs to be written and is not writable, init fails with an error saying so. The one exception is a pending config-version upgrade on a read-only copy (e.g. a synced host): the upgraded config is kept in memory and not persisted.
The default looks like this:
{
"config_version": 3,
"repository": "https://github.com/sot/skare3",
"conda_channels": {
"masters": [
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/masters"
],
"main": [
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/flight"
],
"test": [
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/flight",
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/test"
]
},
"organizations": [
"sot",
"acisops"
],
"store_url": "https://cxc.cfa.harvard.edu/mta/ASPECT/skare3/dashboard",
"data_dir": ""
}
Repository exclusions are not configuration: they live in repository_status.json
at the store root (see skare3_tools.packages.store), so they can change
without a skare3_tools release.
Data Directory¶
The data store lives in the data subdirectory of the configuration directory. That location is
derived from the environment on every run, and stored empty in config.json: the configuration
file sits inside the store and is copied with it (the $SKA/data rsync), so a path written by the
producing machine would otherwise follow the files onto every other machine. A data_dir found in
the configuration that is not inside this machine’s data root is ignored for that reason. To point
skare3_tools at a different store, set SKARE3_TOOLS_DATA, which does not travel with the data,
or pass --data-dir to the commands that accept it.
Conda Channels¶
Conda channels are specified as a dictionary, with identifying strings as keys, and list of URL strings as values:
{
"conda_channels": {
"masters": [
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/masters"
],
"main": [
"https://ska:{CONDA_PASSWORD}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda"
]
},
}