Reference
ITensorPkgSkeleton.all_templates — Method
all_templates()
All available templates when constructing a package. Includes the following templates: ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]
ITensorPkgSkeleton.default_templates — Method
default_templates()
Default templates when constructing a package. Includes the following templates: ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]
ITensorPkgSkeleton.generate — Method
generate(
pkgname;
path,
templates,
ignore_templates,
user_replacements...
)
This function might overwrite existing code if you specify a path to a package that already exists, use with caution! See PkgSkeleton.jl for more details. If you are updating an existing package, make sure you save everything you want to keep (for example, commit all of your changes if it is a git repository).
Generate a package template for a package, by default in the ITensor organization, or update an existing package. This is a wrapper around PkgSkeleton.generate but with extra functionality, custom templates used in the ITensor organization, and defaults biased towards creating a package in the ITensor organization.
Examples
julia> using ITensorPkgSkeleton: ITensorPkgSkeleton;
julia> ITensorPkgSkeleton.generate("NewPkg"; path = mktempdir());
julia> ITensorPkgSkeleton.generate("NewPkg"; path = mktempdir());
julia> ITensorPkgSkeleton.generate(
"NewPkg";
path = mktempdir(),
templates = ITensorPkgSkeleton.default_templates()
);
julia> ITensorPkgSkeleton.generate("NewPkg"; path = mktempdir(), templates = ["github"]);
julia> ITensorPkgSkeleton.generate(
"NewPkg"; path = mktempdir(), templates = ["src", "github"]
);
julia> ITensorPkgSkeleton.generate(
"NewPkg"; path = mktempdir(), ignore_templates = ["src", "github"]
);
julia> ITensorPkgSkeleton.generate("NewPkg"; path = mktempdir(), ghuser = "MyOrg");
julia> ITensorPkgSkeleton.generate(
"NewPkg"; path = mktempdir(), downstreampkgs = ["ITensors", "ITensorMPS"]
);
Arguments
pkgname::AbstractString: Name of the package (without the.jlextension). Replaces{PKGNAME}in the template.
Keywords
path::AbstractString: Path where the package will be generated. Defaults to the development directory, i.e./home/runner/.julia/dev.templates: A list of templates to use. Select a subset ofITensorPkgSkeleton.all_templates() = ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]. Defaults toITensorPkgSkeleton.default_templates() = ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"].ignore_templates: A list of templates to ignore. This is the same as settingtemplates=setdiff(templates, ignore_templates). # Process downstream package information.downstreampkgs: Specify the downstream packages that depend on this package. This populates theIntegrationTest.ymlmatrix in thegithubtemplate. If empty, the workflow defaults to__none__.uuid: Replaces{UUID}in the template. Defaults to the existing UUID in theProject.tomlif the path points to an existing package, otherwise generates one randomly withUUIDs.uuid4().year: Replaces{YEAR}in the template. Year the package/repository was created. Defaults to the current year. # Check if there are downstream tests.
ITensorPkgSkeleton.runtests — Method
runtests(; testdir::AbstractString, args = ARGS, env = ENV)Discover and run test files named test_*.jl under testdir as isolated testsets.
Subdirectories of testdir are treated as test groups and can be filtered with --group=... or ENV["GROUP"].
Files with "setup" in the name are skipped. Files ending with _notest.jl in the examples/ directory are also skipped.