Skip to content

Commit f62a4bb

Browse files
Initial public commit
0 parents  commit f62a4bb

12 files changed

Lines changed: 831 additions & 0 deletions

File tree

.JuliaFormatter.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
indent = 4

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
groups:
5+
# Group all GitHub Actions PRs into a single PR:
6+
all-github-actions:
7+
patterns:
8+
- "*"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
open-pull-requests-limit: 100
13+
labels:
14+
- "dependencies"
15+
- "github-actions"

.github/workflows/CI.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
on:
3+
merge_group:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
# Skip intermediate builds: all builds except for builds on the `master` branch
11+
# Cancel intermediate builds: only pull request builds
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
finalize:
20+
timeout-minutes: 10
21+
needs: [test]
22+
if: always()
23+
runs-on: ubuntu-latest
24+
steps:
25+
- run: |
26+
echo test: ${{ needs.test.result }}
27+
- run: exit 1
28+
if: (needs.test.result != 'success')
29+
30+
test:
31+
runs-on: ${{ matrix.os }}
32+
timeout-minutes: 180
33+
env:
34+
JULIA_PKG_SERVER: "pkg.julialang.org"
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os:
39+
- ubuntu-latest
40+
- windows-latest
41+
- macOS-latest
42+
43+
steps:
44+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
with:
46+
persist-credentials: false
47+
48+
- uses: julia-actions/install-juliaup@1da6847c869cd68e3a32b8f52fe8f005b8cd5ece # v2.2.1
49+
with:
50+
channel: "release"
51+
52+
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0
53+
54+
- uses: julia-actions/julia-runtest@678da69444cd5f13d7e674a90cb4f534639a14f9 # v1.11.2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Manifest.toml

Artifacts.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[PumasProductRegistry]
2+
git-tree-sha1 = "45cc8d739b5b74c63571f52811fea54ad47799d3"
3+
4+
[[PumasProductRegistry.download]]
5+
sha256 = "db97b07909c1de11c951822409a81f919f911191bec06907b670f93366ab53fe"
6+
url = "https://pumas-product-bundles.s3.us-east-1.amazonaws.com/bundle-6de6099262863579b2d3bb9de3c73157f2ce1b95/PumasProductRegistry.tar.gz"

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2025 PumasAI Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

Project.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name = "PumasProductManager"
2+
uuid = "aef49cb6-75a8-4add-8242-3d3875347889"
3+
authors = ["MichaelHatherly <michael@pumas.ai>"]
4+
version = "0.1.0"
5+
6+
[deps]
7+
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
8+
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
9+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
10+
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
11+
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
12+
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

README.md

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
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

Comments
 (0)