Reference

ITensorPkgSkeleton.all_templatesMethod
all_templates()

All available templates when constructing a package. Includes the following templates: ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]

source
ITensorPkgSkeleton.default_templatesMethod
default_templates()

Default templates when constructing a package. Includes the following templates: ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]

source
ITensorPkgSkeleton.generateMethod
generate(
    pkgname;
    path,
    templates,
    ignore_templates,
    user_replacements...
)
Warning

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 .jl extension). 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 of ITensorPkgSkeleton.all_templates() = ["project", "github", "gitignore", "examples", "test", "precommit", "src", "docs", "license", "benchmark"]. Defaults to ITensorPkgSkeleton.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 setting templates=setdiff(templates, ignore_templates). # Process downstream package information.
  • downstreampkgs: Specify the downstream packages that depend on this package. This populates the IntegrationTest.yml matrix in the github template. If empty, the workflow defaults to __none__.
  • uuid: Replaces {UUID} in the template. Defaults to the existing UUID in the Project.toml if the path points to an existing package, otherwise generates one randomly with UUIDs.uuid4().
  • year: Replaces {YEAR} in the template. Year the package/repository was created. Defaults to the current year. # Check if there are downstream tests.
source
ITensorPkgSkeleton.runtestsMethod
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.

source