PacletAssurance`
PacletAssurance`

PacletDeploy

PacletDeploy[paclet]

builds paclet using PacletBuild before running PacletInstall on the resulting .paclet file.

PacletDeploy[paclet,builddir]

builds paclet into builddir before installing.

Details and Options

  • PacletDeploy combines both the building and installation of a paclet into a single command.
  • PacletDeploy is similar to PacletBuildInstall except that it has more configuration options. These include, for example, ensuring that a build excludes specified files, encodes specified kernel files as well as running all paclet tests following the paclet's installation.
  • The following options can be given:
  • "ExcludeExtensionFiles"$ExcludedExtensionFilesextension files to exclude during deployment
    "Encode"Truewhether or not to encode all kernel files during a paclet build
    "Assurance"Automaticassurance used to certify that a paclet is deployable
  • The options of PacletDeployinclude all the options of PacletBuild and PacletInstall which are then used when these functions are applied during internal invocations.
  • The default value of builddir is dir/deploy where dir is the directory containing the corresponding .paclet file.
  • PacletDeploy first makes a copy of the directory containing the corresponding .paclet file in a temporary directory, deletes/encodes files as optionally specified, runs PacletBuild on this modified copy, transfers the built.paclet file to builddir, runs PacletInstall on this .paclet file before, if specified, running any paclet tests on the installed paclet and finally, deleting the temporary directory originally created.
  • PacletDeploy does not perform incremental documentation builds and hence should typically be performed after a paclet's documentation has been finalized.
  • The default setting of $ExcludedExtensionFilesensures that in the Kernel and TestFiles directories, all .nb files are removed during deployment. This supports workflows where code development takes place in .nb notebooks containing package code in "initialization cells".
  • With the option "Assurance"->"AllTestsSucceeded", all of the tests in TestFiles[paclet] are run with deployment succeeding only if all these tests also succeed.

Examples

Basic Examples  (1)

Create OnsocExamplePaclet placing it automatically in $DeveloperDirectory

Count how many files there are in the Kernel sub-directory of OnsocExamplePaclet

Deploy the paclet

The deployed version strips the paclet of any development-related files. For example, in the Kernel folder only those with .m or .wl extensions are retained with, by default all .nb files not being copied over into the deployed paclet.

By default, all code is automatically obfuscated in deployed paclets.

Deployed paclets are similar to installed paclets except that additional processing pertinent to commercial deployment is performed. In particular, deployed paclets can also be uninstalled

Tech Notes
  • Paclet Workflow