TorsExperimentalTools
Documentation for TorsExperimentalTools.
TorsExperimentalTools.add_default_args!TorsExperimentalTools.available_runsTorsExperimentalTools.default_nameTorsExperimentalTools.generate_nameTorsExperimentalTools.getcommitTorsExperimentalTools.getcommitTorsExperimentalTools.interactive_checkout_maybeTorsExperimentalTools.pkgversionTorsExperimentalTools.run_from_argsTorsExperimentalTools.@default_argparse_rulesTorsExperimentalTools.@parse_args
TorsExperimentalTools.add_default_args! — Methodadd_default_args!(s::ArgParseSettings)Add generally applicable arguments to s.
In particular, it adds the following arguments:
--ignore-commit--verbose
TorsExperimentalTools.available_runs — Methodavailable_runs(; prefix=nothing, commit=nothing, full_path=false)Return available runs.
Keyword arguments
prefix: filters based on the prefix of the runs.commit: filters based on the commit id from which the run is produced.full_path: iftrue, the full path to each run will be returned rather than only their directory names.
TorsExperimentalTools.default_name — Methoddefault_name(mod; include_commit_id=false)Construct a name from either repo information or package version of mod.
If the path of mod is a git-repo, return name of current branch, joined with the commit id if include_commit_id is true.
If path of mod is not a git-repo, it is assumed to be a release, resulting in a name of the form release-VERSION.
TorsExperimentalTools.generate_name — Methodgenerate_name([rng::Random.AbstractRNG]; kwargs...)Generate a random name.
Keyword arguments
rng: A random number generator. Default:Random.default_rng().already_taken: A set of names that are already taken. Default:Set{String}().prefix: A prefix to the name. Default:"".suffix: A suffix to the name. Default:"".
TorsExperimentalTools.getcommit — Methodgetcommit(repo::LibGit2.GitRepo)Return the commit ID of HEAD for repo.
TorsExperimentalTools.getcommit — MethodTorsExperimentalTools.interactive_checkout_maybe — Functioninteractive_checkout_maybe(source, repodir=projectdir())
interactive_checkout_maybe(source_commit::LibGit2.GitHash, repodir=projectdir())Check if commit of source matches current HEAD of repodir.
If source is specified instead of source_commit, then getcommit(source) is used.
TorsExperimentalTools.pkgversion — Methodpkgversion(m::Module)Return version of module m as listed in its Project.toml.
TorsExperimentalTools.run_from_args — Methodrun_from_args(mod::Module, args)Return a Run created from mod and args.
TorsExperimentalTools.@default_argparse_rules — Macro@default_argparse_rulesAdd generally applicable rules to ArgParseSettings.
In particular, it adds the following rules:
::Type{Date}:Date(x, dateformat"y-m-d")
TorsExperimentalTools.@parse_args — Macro@parse_args s
@parse_args s _argsCalls parse_args on s and _args, with _args = ARGS if _args is not defined.
This is convenient when wanting to run a script using include instead of from the command line, for example allowing temporary halting of a long-running process to save some results, and then resume.