You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
5
+
## Unreleased
6
+
7
+
### Changed
8
+
9
+
* When submitting an appbundle with the two-argument `JuliaHub.appbundle(bundle_directory, codefile)` method, JuliaHub.jl now ensures that `@__DIR__``@__FILE`, and `include()` in the user code now work correctly. There is a subtle behavior change due to this, where now the user script _must_ be present within the uploaded appbundle tarball (previously it was possible to use a file that would get filtered out by `.juliabundleignore`). (#37, #53)
Copy file name to clipboardExpand all lines: docs/src/guides/jobs.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,8 @@ The Julia environment in the directory is also immediately added into the bundle
79
79
80
80
An appbundle can be constructed with the [`appbundle`](@ref) function, which takes as arguments the path to the directory to be bundled up, and a script _within that directory_.
81
81
This is meant to be used for project directories where you have your Julia environment in the top level of the directory or repository.
82
-
For example, you can submit an bundle from a submit script on the top level of your project directory as follows:
82
+
83
+
For example, suppose you have a script at the top level of your project directory, then you can submit a bundle as follows:
83
84
84
85
```@example
85
86
import JuliaHub # hide
@@ -98,8 +99,9 @@ When the job starts on JuliaHub, this environment is instantiated.
98
99
A key feature of the appbundle is that development dependencies of the environment (i.e. packages added with `pkg> develop` or `Pkg.develop()`) are also bundled up into the archive that gets submitted to JuliaHub (including any current, uncommitted changes).
99
100
Registered packages are installed via the package manager via the standard environment instantiation, and their source code is not included in the bundle directly.
100
101
101
-
When the JuliaHub job starts, the bundle is unpacked into the `appbundle/` directory (relative to the starting working directory).
102
-
E.g. if you have a `mydata.dat` file in the bundled directory, you can access it in the script at `joinpath("appbundle", "mydata.dat")`.
102
+
When the JuliaHub job starts, the working directory is set to the root of the unpacked appbundle directory.
103
+
This should be kept in mind especially when launching a script that is not at the root itself, and trying to open other files from the appbundle in that script (e.g. with `open`).
104
+
You can still use `@__DIR__` to load files relative to the script, and `include`s also work as expected (i.e. relative to the script file).
103
105
104
106
Finally, a `.juliabundleignore` file can be used to exclude certain directories, by adding the relevant [globs](https://en.wikipedia.org/wiki/Glob_(programming)), similar to how `.gitignore` files work.
105
107
In addition, `.git` directories are also automatically excluded from the bundle.
0 commit comments