Scripts

skare3-bulk

Script to run the same command in a collection of subdirectories.

usage: skare3-bulk [-h] [--repositories REPOSITORIES] cmd [cmd ...]

Positional Arguments

cmd

The command to run

Named Arguments

--repositories

the name of the subdirectories

Default: “git_repositories”

skare3-build

Script to wrap the standard skare3 building script.

This script differs in a few ways from the standard build:

  • The input is a github repository, and the corresponding conda package name is inferred.

  • The package version of some conda packages can be overwritten. This is used when building a release candidate (with an added ‘rc’ at the end of the version) without modifying meta.yml.

  • Replace CONDA_PASSWORD in conda channel URLs on the fly (older conda versions failed to do this)

  • ensure there are non-empty directories linux-64, osx-64, noarch, and win-64 in the output.

NOTE: Argument order seems to matter. Any argument unknown to this script is passed to ska_builder. It seems that unknown arguments must be consecutive, and known arguments must be consecutive.

usage: skare3-build [-h] [--ska3-overwrite-version SKA3_OVERWRITE_VERSION]
                    [--skare3-overwrite-version SKA3_OVERWRITE_VERSION]
                    [--skare3-branch SKARE3_BRANCH]
                    package

Positional Arguments

package

The repository name in format {owner}/{name}

Named Arguments

--ska3-overwrite-version

the version of the resulting conda package

--skare3-overwrite-version

the version of the resulting conda package

--skare3-branch

The branch to build (default: master

Default: “master”

skare3-release-check

Check the environment and conda configuration files to determine which packages to build, if any.

It also does a sanity check, checking consistency between release tag and branch. It is assumed that the ‘target’ version (the version after all tests pass) is the name of the branch where the release is made. This script checks the meta information of all ska3-* packages to see which ones have version equal to the target version and adds those to a list of packages to build.

This script makes the following checks:

  • the given tag exists and follows PEP 0440 format (https://www.python.org/dev/peps/pep-0440),

  • there is an existing release with this tag,

  • the tag’s branch must be named ‘<release>’ or ‘<release>-<label>’,

  • there exists a PR based on this branch,

  • if tag_name contains an alpha/beta/candidate version, then release must be a pre-release,

  • if tag_name contains a label, then release must be a pre-release,

  • if GITHUB_SHA is defined, it must be the release commit. If not, the local copy of the skare3 repo must be in the tag branch.

usage: skare3-release-check [-h] --version VERSION [--skare3-path SKARE3_PATH]
                            [--repository REPOSITORY] [--token TOKEN]
                            [--no-check]

Named Arguments

--version

Target version to build

--skare3-path

local copy of the skare3 repo

Default: “.”

--repository

Github repository name

Default: “sot/skare3”

--token, -t

Github token, or name of file that contains token

--no-check

Checks for CI

Default: True

skare3-changes-summary

Produce a list of changes for meta-packages between versions.

The sets of versions can be specified in a few ways: 1. one string of flight, matlab, last_tag, 2. one string that must correspond to a package in conda-info file 3. the name of a json file containing a dictionary of versions indexed by package names (which can be created doing “conda search –info –json ska3-flight”, for example).

This script requires CONDA_PASSWORD to be defined.

usage: skare3-changes-summary [-h] [--initial-version INITIAL_VERSION]
                              [--final-version FINAL_VERSION]
                              [--meta-package META_PACKAGE]
                              [--conda-channel CONDA_CHANNEL] [--token TOKEN]

Named Arguments

--initial-version

A string id. The default is the last non-prerelease version.

--final-version

A string id. The default is the last version.

--meta-package

Name of the meta-package. Default is all meta-packages at the given final version.

Default: []

--conda-channel

Conda channel where info for the final version of the meta-package can be found.The default is to use the test channel.

Default: “test”

--token

Github token, or name of file that contains token

skare3-promote

Promote ska3 meta-packages or packages from a list of channels to one target channel.

”Promotion” usually means copying conda package files from the source channels to the target channel. The channels are expected to be within the same directory, which is specified by the ska3-conda argument.

The packages to be promoted must be defined in skare3. If the package is a ska3- metapackage, this script reads the metapackage’s meta.yaml requirements in skare3, finds the corresponding packages in the source channels, and copies/moves them to the target channel.

usage: skare3-promote [-h] [--ska3-conda SKA3_CONDA] [--from FROM_CHANNEL [--from FROM_CHANNEL ...] ] [--to TO_CHANNEL] [--dry-run] [--move] [--skare3-local-copy SKARE3] [--log-level {error,warning,info,debug}] [-v] <package name>==<version> [<package name>==<version> ...]

Positional Arguments

<package name>==<version>

Named Arguments

--ska3-conda

ska3-conda directory containing source and target channels (defaults to the standard location)

Default: “/proj/sot/ska/www/ASPECT_ICXC/ska3-conda”

--from

source channel (default: [‘masters’, ‘test’])

--to

target channel (default: ‘flight’)

--dry-run

do not copy/move and do not index target conda channel

Default: False

--move

move packages instead of copying

Default: False

--skare3-local-copy

path to the local copy of the skare3 repo (on a tempdir by default)

--log-level

Possible choices: error, warning, info, debug

verbosity level (error, warning, info, debug)

Default: “info”

-v

Debug verbosity

skare3-git-pass

Utility script to provide username/password when authenticating git.

This script reads the GIT_USERNAME and GIT_PASSWORD environmental variables and returns the corresponding value when requested.

If one sets the GIT_ASKPASS environmental variable to point to this script, and sets GIT_USERNAME and GIT_PASSWORD, git takes care of the rest.

usage: skare3-git-pass [-h] {username,password}

Positional Arguments

what

Possible choices: username, password

What is being requested (either password or username).