New#

Description#

Takes package name and version, and creates a new .<package>.wrapp file.

The new command does not operate on any files or packages, it rather is a shortcut to create a suitable .<package>.wrapp file to be used by subsequent install-commands.

For instance, when creating a new scenario and wanting to capture the asset packages used, it is useful to have a wrapp file that will record the dependencies installed.

Example:

wrapp new my_package 1.0.0
# Creates .my_package.wrapp in the current directory

.wrapp files are JSON files. The file format includes a schema version field and may evolve with new WRAPP versions.

new writes the .wrapp file and, when --create-package-standard <LICENSE> (or --cps) is given, also drops a package-standard definition seed next to it — identity only (package id and SPDX license, no BOM, since there is no content yet). A later create run from the same directory picks up that license automatically and generates the full sidecars, so the license only needs to be declared once. See WRAPP Metadata and SimReady Package-Standard Sidecars for the compatibility model and sidecar behavior.

For CLI options, run wrapp new --help.

Python API Reference#

async wrapp.new(
package_name: str,
version: str,
destination: str,
create_catalog: bool,
tags: bool = False,
ignores: str | IgnoreEvaluator | None = None,
local_hash: bool = False,
create_package_standard_license: str | None = None,
*,
context: CommandParameters = CommandParameters(debug=False, verbose=False, dry_run=False, log_file=None, hash_cache_file=None),
scheduler: SchedulerContext | None = None,
) None#

Takes package name and version, and creates a new .<package>.wrapp file

This creates a new .<package>.wrapp package file that can be used as a target for the install-command to record dependencies. Name and version are just strings, destination needs to be a URL pointing to a folder.

Parameters:
  • package_name – Name of the package

  • version – Initial version. Can be overridden by the first create command for this package

  • destination – URL of the package. In this directory the new .wrapp file will be created.

  • create_catalog – Specify whether to catalog the location and put the catalog into the wrapp file created.

  • tags – Specify this to also catalog the tags when cataloging the destination

  • ignores – Specify a name of an ignore rule file to use during cataloging, or an IgnoreEvaluator object

  • local_hash – Set this to allow calculating local hashes during cataloging. Might download data when creating in a remote server.

  • create_package_standard_license – SPDX license identifier. When set, a package-standard definition seed (identity only, no BOM) is written next to the new .wrapp file. A later create from this directory picks up the license automatically without re-specifying it.

  • context – Global configuration parameters

  • scheduler – Optionally pre-constructed SchedulerContext. When calling many functions in a row make sure to pre-construct the scheduler.

Raises:
  • FailedCommand – When prerequisites not matched

  • StorageOperationError – Raised when network or file operations fail