Skip to content

Commit

Permalink
Updated package manager documentation (#8745)
Browse files Browse the repository at this point in the history
Fixes #8147
Added API and OMEdit cross references.
Updated OMEdit screenshots.
  • Loading branch information
adeas31 committed Mar 23, 2022
1 parent 8b26253 commit e8ee9c8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
Binary file modified doc/UsersGuide/source/media/omedit_convert_library.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/UsersGuide/source/media/omedit_install_library.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions doc/UsersGuide/source/omedit.rst
Expand Up @@ -1720,6 +1720,8 @@ MSL but if you really need to and understand the consequences then follow these
- Add *$OPENMODELICAHOME/lib/omlibrary/Modelica X.X/package.mo* under user libraries.
- Restart OMEdit.

.. _omedit-install-library :

Install Library
---------------

Expand All @@ -1732,10 +1734,12 @@ that are available for installation through the package manager.
Install Library.
Upgrade Libraries using Conversion Scripts
.. _omedit-convert-library :

Convert Libraries using Conversion Scripts
------------------------------------------

In order to upgrade the libraries used in the model/package right-click the model/package in the
In order to convert the libraries right-click the model/package in the
`Libraries Browser` and choose `Convert to newer versions of used libraries`. OMEdit will read the used
libraries from the uses-annotation and list any new version of the library that provide the conversion
using the conversion script.
Expand Down
41 changes: 22 additions & 19 deletions doc/UsersGuide/source/packagemanager.rst
Expand Up @@ -68,7 +68,7 @@ own Modelica packages. It can be run both from the OMEdit GUI and from the comma

Note that the Package Manager may install multiple builds of the same library version on your PC, if they are indexed on the
OSMC servers. When this happens, they are distinguished among each other by means of
`semver <https://https://semver.org/#semantic-versioning-specification-semver>`_-style pre- or post-release metadata in the
`semver <https://semver.org/#semantic-versioning-specification-semver>`_-style pre- or post-release metadata in the
top directory name on the file system. Post-release builds are denoted by a plus sign (e.g. ``2.0.0+build.02``)
and have higher priority over the corresponding plain release
(e.g. ``2.0.0``), while pre-release builds are denoted by a minus sign (e.g. ``2.0.0-dev.30``) and have a lower priority.
Expand All @@ -83,15 +83,18 @@ In any case, semver version semantics is only used to order the releases, while
is determined exclusively on the basis of ``noneFromVersion`` annotations.

Package Management in OMEdit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TBD: Show how to install new packages and manage installed ones
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:ref:`Installing a new library in OMEdit <omedit-install-library>`.

Running Conversion Scripts in OMEdit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TBD: Show how to run conversion scripts in OMEdit

:ref:`Converting a library in OMEdit <omedit-convert-library>`.

Automatically Loaded Packages in OMEdit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When you start OMEdit, some packages are automatically loaded into the environment, and shown in the Libraries
Browser. You can configure which ones are loaded from the Tools|Options|Libraries menu.

Expand Down Expand Up @@ -124,23 +127,23 @@ Using the Package Manager from the Interactive Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The Package Manager can also be used from the Interactive Environment command line shell. Here is a list
of examples of relevant commands; please type them followed by ``getErrorString()``,
e.g., ``updatePackageIndex();getErrorString()``, in order to get additional information,
of examples of relevant commands; please type them followed by ``:ref:`getErrorString```,
e.g., ``:ref:`updatePackageIndex`;:ref:`getErrorString```, in order to get additional information,
notifications and error messages.

- ``updatePackageIndex()``: this command puts the Package Manager in contact with the OSMC servers and updates
the internally stored list of available packages;
- ``getAvailablePackageVersions(Buildings, "")``: lists all available versions of the Buildings library on the OSMC server,
starting from the most recent one, in descending order of priority. Note that pre-release versions have lower priority
than all other versions;
- ``getAvailablePackageVersions(Buildings, "7.0.0")``: lists all available versions of the Buildings library on
the OSMC server that are backwards-compatible with version ``7.0.0``, in descending order of priority;
- ``installPackage(Buildings, "")``:install the most recent version of the Building libraries, *and all its dependencies*;
- ``installPackage(Buildings, "7.0.0")``: install the most recent version of the Building libraries which is backwards-compatible
with version ``7.0.0``, *and all its dependencies*;
- ``installPackage(Buildings, "7.0.0", exactMatch = true)``: install version ``7.0.0`` even if there are more recent
backwards-compatible versions available, *and all its dependencies*;
- ``upgradeInstalledPackages(installNewestVersions = true)``: installs the latest available version of all installed packages.
- ``:ref:`updatePackageIndex```: this command puts the Package Manager in contact with the OSMC servers and updates
the internally stored list of available packages;
- ``:ref:`getAvailablePackageVersions`(Buildings, "")``: lists all available versions of the Buildings library on the OSMC server,
starting from the most recent one, in descending order of priority. Note that pre-release versions have lower priority
than all other versions;
- ``:ref:`getAvailablePackageVersions`(Buildings, "7.0.0")``: lists all available versions of the Buildings library on
the OSMC server that are backwards-compatible with version ``7.0.0``, in descending order of priority;
- ``:ref:`installPackage`(Buildings, "")``: install the most recent version of the Building libraries, *and all its dependencies*;
- ``:ref:`installPackage`(Buildings, "7.0.0")``: install the most recent version of the Building libraries which is backwards-compatible
with version ``7.0.0``, *and all its dependencies*;
- ``:ref:`installPackage`(Buildings, "7.0.0", exactMatch = true)``: install version ``7.0.0`` even if there are more recent
backwards-compatible versions available, *and all its dependencies*;
- ``:ref:`upgradeInstalledPackages`(installNewestVersions = true)``: installs the latest available version of all installed packages.

How the package index works
---------------------------
Expand Down

0 comments on commit e8ee9c8

Please sign in to comment.