Working with Packages
In AtScale, packages are additional Git repositories whose objects can be used in the current repository. These function similarly to Git submodules, and enable you to share objects between multiple repositories and models.
The packages available to the current repository are defined by the
package.yml
file. This file contains a list of the repositories you
want to use objects from.
The packages themselves appear in the packages/
folder in the Repo
Browser. This folder automatically appears when you create a package
file, and is automatically populated with the repositories defined in
the file.
The following sections describe how to work with packages in AtScale.
Adding packages
To add packages to the current repository:
- In the Repo Browser, click the new object button and select
package.yml. The
package.yml
file andpackages/
folder appear in the Repo Browser. - Open
package.yml
for editing and define the repositories you want to use. For more information, see the AtScale SML Object Documentation on GitHub. - Click Save File.
The repositories defined in the file are automatically added to the
packages/
folder in the Repo Browser.
Working with shared objects
You can browse packages via the Repo Browser as you would any other folder in the repository. You can also open individual objects within the packages for viewing.
Note: Objects in packages are read only: you cannot edit them when
working in the current repository. If you need to edit a shared object,
you must first switch to the repository and branch it belongs to. After
making your changes, be sure to update the version
property for the
modified package with the appropriate commit ID so that your changes are
available in the current repository.
To add an object from a package to a model in the current repository, locate the object within the Repo Browser, click its context menu, and select Add to model. The object is added to the model.
Removing packages
To remove a single package from the current repository, open the package
file and delete the reference to that package. When you save the file,
the package no longer appears in the packages/
folder.
To remove all packages from the current repository, delete the package
file. This automatically removes the entire packages/
folder and its
contents from the Repo Browser.