|
| 1 | +# PumasProductManager |
| 2 | + |
| 3 | +This is the Pumas product manager package. Use it to install any version of |
| 4 | +Pumas or DeepPumas. Currently supported versions of products are: |
| 5 | + |
| 6 | +- `Pumas@2.6.0` |
| 7 | +- `Pumas@2.6.1` |
| 8 | +- `DeepPumas@0.8.0` |
| 9 | +- `DeepPumas@0.8.1` |
| 10 | + |
| 11 | +> [!IMPORTANT] |
| 12 | +> |
| 13 | +> Support requests should be sent to support@pumas.ai rather than this GitHub |
| 14 | +> repository. In your support request please state that you are installing your |
| 15 | +> product via this repository rather than Pumas Desktop. |
| 16 | +
|
| 17 | +## Installation |
| 18 | + |
| 19 | +Install `julia` via https://julialang.org/downloads/#install_julia and make |
| 20 | +sure that the first option is chosen, which installs the `juliaup` version |
| 21 | +manager. This is essential for the product manager to work. |
| 22 | + |
| 23 | +Next run the following command in a terminal window to install the product manager package: |
| 24 | + |
| 25 | +``` |
| 26 | +julia --project=@PumasProductManager -i -e 'import Pkg; Pkg.add(url="https://github.com/PumasAI/PumasProductManager.jl"); import PumasProductManager' |
| 27 | +``` |
| 28 | + |
| 29 | +This will start up `julia` with the product manager installed and available. |
| 30 | +Now enter Julia's package manager by pressing `]` and run the following command: |
| 31 | + |
| 32 | +```plaintext |
| 33 | +pkg> pumas list |
| 34 | +DeepPumas@0.8.0 |
| 35 | +DeepPumas@0.8.1 |
| 36 | +Pumas@2.6.0 |
| 37 | +Pumas@2.6.1 |
| 38 | +``` |
| 39 | + |
| 40 | +Then initialize any of the listed products to install them, for example: |
| 41 | + |
| 42 | +```plaintext |
| 43 | +pkg> pumas init Pumas@2.6.1 |
| 44 | +``` |
| 45 | + |
| 46 | +This will download and install all the required packages for Pumas 2.6.1 and |
| 47 | +then precompile them. Once completed you can restart Julia with this newly |
| 48 | +installed version of Pumas with the following: |
| 49 | + |
| 50 | +```plaintext |
| 51 | +$ julia +Pumas@2.6.1 |
| 52 | +
|
| 53 | +julia> using Pumas |
| 54 | +``` |
| 55 | + |
| 56 | +## Managing products |
| 57 | + |
| 58 | +All of the `pumas` commands described below require `PumasProductManager` to |
| 59 | +be loaded into the `julia` process. Do that with |
| 60 | + |
| 61 | +```plaintext |
| 62 | +$ julia +PumasProductManager |
| 63 | +``` |
| 64 | + |
| 65 | +All available commands can be accessed via the normal Julia Package Manager, |
| 66 | +which is entered by pressing `]` in the Julia REPL. All PumasProductManager |
| 67 | +commands start with `pumas`. Tab completion is available for all `pumas` |
| 68 | +commands, similar to the Julia package manager. |
| 69 | + |
| 70 | +Prefixing a command with `?` will display the help for that command. |
| 71 | + |
| 72 | +### `list`ing available products |
| 73 | + |
| 74 | +To view the available products that can be installed use the `pumas list` command. |
| 75 | + |
| 76 | +```plaintext |
| 77 | +pkg> pumas list |
| 78 | +DeepPumas@0.8.0 |
| 79 | +DeepPumas@0.8.1 |
| 80 | +Pumas@2.6.0 |
| 81 | +Pumas@2.6.1 |
| 82 | +``` |
| 83 | + |
| 84 | +### `init`ializing products |
| 85 | + |
| 86 | +To install a specific version of a product use the `pumas init` command. |
| 87 | + |
| 88 | +```plaintext |
| 89 | +pkg> pumas init <product> [<path>] |
| 90 | +``` |
| 91 | + |
| 92 | +Tab completion is available for the product name as well as paths. |
| 93 | + |
| 94 | +This Initializes a new Pumas product installation at the provided path. Use `.` |
| 95 | +for the current path. The path cannot contain a `Project.toml` or |
| 96 | +`Manifest.toml` file already. When no path is provided then a global |
| 97 | +environment is created. |
| 98 | + |
| 99 | +After running `init` you can then start using the product via the |
| 100 | +custom `juliaup` channel that is added, for example: |
| 101 | + |
| 102 | +```plaintext |
| 103 | +pkg> pumas init Pumas@2.6.1 |
| 104 | +
|
| 105 | +[output skipped...] |
| 106 | +
|
| 107 | +julia> exit() |
| 108 | +
|
| 109 | +$ julia +Pumas@2.6.1 |
| 110 | +
|
| 111 | +julia> using Pumas |
| 112 | +``` |
| 113 | + |
| 114 | +If you specified a `path` when initializing then specify that with the |
| 115 | +`--project` flag: |
| 116 | + |
| 117 | +```plaintext |
| 118 | +pkg> pumas init Pumas@2.6.1 my-project |
| 119 | +
|
| 120 | +[output skipped...] |
| 121 | +
|
| 122 | +julia> exit() |
| 123 | +
|
| 124 | +$ julia +Pumas@2.6.1 --project=my-project |
| 125 | +
|
| 126 | +julia> using Pumas |
| 127 | +``` |
| 128 | + |
| 129 | +Should you want to set this custom channel as the default then you can use the |
| 130 | +normal `juliaup default` command to do this: |
| 131 | + |
| 132 | +```plaintext |
| 133 | +$ juliaup default Pumas@2.6.1 |
| 134 | +``` |
| 135 | + |
| 136 | +### Updating the Pumas product manager |
| 137 | + |
| 138 | +If you wish to check for new product versions then use the following: |
| 139 | + |
| 140 | +```plaintext |
| 141 | +$ julia +PumasProductManager |
| 142 | +
|
| 143 | +pkg> update |
| 144 | +
|
| 145 | +julia> exit() |
| 146 | +
|
| 147 | +$ julia +PumasProductManager |
| 148 | +
|
| 149 | +pkg> pumas list |
| 150 | +``` |
| 151 | + |
| 152 | +To update an existing product installation to a newer version remove the |
| 153 | +existing `Project.toml` and `Manifest.toml` files and then run the `init` |
| 154 | +command again and specify the new version you would like to use. |
| 155 | + |
| 156 | +### Adding packages to initialized environments |
| 157 | + |
| 158 | +The provided Julia environments include a limited set of extra Julia packages |
| 159 | +that you can use in conjunction with the Pumas products. You can add more |
| 160 | +packages to a particular environment using the normal package manager `add` |
| 161 | +operation. |
| 162 | + |
| 163 | +```plaintext |
| 164 | +julia +Pumas@2.6.1 |
| 165 | +
|
| 166 | +pkg> add --preserve=all ExtraPackage |
| 167 | +``` |
| 168 | + |
| 169 | +If Julia's package manager throws an error related to incompatible versions of |
| 170 | +packages then that means that `ExtraPackage` is not compatible with this |
| 171 | +particular version of Pumas and cannot be added. |
| 172 | + |
| 173 | +Should you need to update a version of a package that you manaually installed |
| 174 | +then just run the same `add --preserve=all` command again and the package will |
| 175 | +be updated. Do not run `update` directly, since all Pumas-provided packages are |
| 176 | +intended to be fixed to a specific version. |
| 177 | + |
| 178 | +### Uninstalling |
| 179 | + |
| 180 | +Just remove the directory that contains the `Project.toml` and `Manifest.toml` |
| 181 | +files. |
| 182 | + |
| 183 | +If you really need to clean up space you can also run `Pkg.jl`'s `Pkg.gc()` |
| 184 | +function as well if you wish to clean up any unused artifacts. This is usually |
| 185 | +not needed though. |
| 186 | + |
| 187 | +To uninstall the product manager itself. Just remove the global environment that |
| 188 | +it was installed into, usually `@PumasProductManager` if the default installation |
| 189 | +procedure was followed. The path can be found by running the following: |
| 190 | + |
| 191 | +```plaintext |
| 192 | +$ julia +PumasProductManager |
| 193 | +
|
| 194 | +pkg> status |
| 195 | +``` |
| 196 | + |
| 197 | +which will print out the path to the environment that the product manager was |
| 198 | +installed into. |
| 199 | + |
| 200 | +If you wish to uninstall `julia` itself please refer to the `juliaup` |
| 201 | +documentation itself for details. |
| 202 | + |
| 203 | +## Usage with Quarto |
| 204 | + |
| 205 | +If you've set your `juliaup` default channel to a specific product version then |
| 206 | +using it in a Quarto notebook should require no special setup. Just include |
| 207 | +`engine: julia` in your frontmatter to select the right engine. |
| 208 | + |
| 209 | +Should you have not set a default channel then you can specify the channel and |
| 210 | +project using the notebook's frontmatter as follows: |
| 211 | + |
| 212 | +````qmd |
| 213 | +--- |
| 214 | +engine: julia |
| 215 | +julia: |
| 216 | + exeflags: ["+Pumas@2.6.0"] |
| 217 | +--- |
| 218 | + |
| 219 | +```{julia} |
| 220 | +using Pumas |
| 221 | +``` |
| 222 | +```` |
| 223 | + |
0 commit comments