Skip to content

Commit

Permalink
Merge branch 'main' into more-notebook-pkg-api
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Nov 11, 2024
2 parents 907a474 + e512f24 commit 57f5fb6
Show file tree
Hide file tree
Showing 141 changed files with 16,443 additions and 24,561 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: fonsp
open_collective: julialang
10 changes: 8 additions & 2 deletions .github/workflows/Bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ concurrency:
jobs:
trigger:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
# We use that PAT token instead of GITHUB_TOKEN because we are triggering another github action on the 'release' event.
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
# Do the actual bundling
- uses: actions/setup-node@v4
with:
node-version: 17.x
node-version: 22.x
cache: "npm"
cache-dependency-path: frontend-bundler/package-lock.json

Expand All @@ -59,7 +60,12 @@ jobs:
working-directory: frontend-bundler
run: |
(npm run build) || (npm run build) || (npm run build)
- name: List generated files
working-directory: frontend-dist
run: |
ls -lha
- name: Check for corrupt files
working-directory: frontend-dist
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/FrontendTest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pluto frontend tests
name: Chrome frontend tests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
Expand Down Expand Up @@ -26,9 +26,9 @@ jobs:
- uses: actions/checkout@v4

# Makes thes `julia` command available
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: "1.6" # our lowest supported version
version: "1.10" # our lowest supported version

- name: Install Pluto.jl packages
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ on:
branches-ignore:
- release

env:
JULIA_PLUTO_IGNORE_CDN_BUNDLE_WARNING: true

jobs:
test:
name: ${{ matrix.package.repo }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/LaunchTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
strategy:
matrix:
# We test quite a lot of versions because we do some OS and version specific things unfortunately
julia-version: ["1.6", "1.7"]
julia-version: ["lts", "1"]
os: [windows-latest, ubuntu-latest]

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Makes thes `julia` command available
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ jobs:
fail-fast: false
matrix:
# We test quite a lot of versions because we do some OS and version specific things unfortunately
julia-version: ["1.6", "1.10", "~1.11.0-0", "nightly"] # "~1.12.0-0"]
julia-version: ["1.10", "1.11"] #, "nightly"] # "~1.12.0-0"]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Makes the `julia` command available
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v1
arch: ${{ runner.arch }}

- uses: julia-actions/cache@v2

# 🚗
- uses: julia-actions/julia-runtest@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/TestBundledExport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: "1.8"
version: "1.10"

- name: Generate exports and check for warnings
run: |
Expand Down
130 changes: 130 additions & 0 deletions .github/workflows/TestFirefox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Browser basic launch test

# same as the frontend tests
on:
push:
paths-ignore:
- "**.md"
branches:
- main
- release
pull_request:
paths-ignore:
- "**.md"
branches-ignore:
- release


jobs:
firefox-test:
runs-on: macos-latest
timeout-minutes: 15
strategy:
matrix:
browser: ['firefox', 'safari', 'chrome']

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Makes thes `julia` command available
- uses: julia-actions/setup-julia@v2
with:
version: "1.10" # our lowest supported version
arch: x64

- name: Install Pluto.jl packages
run: |
julia --project=$GITHUB_WORKSPACE -e "using Pkg; Pkg.instantiate()"
- id: setup-firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: 'latest-esr'

- id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: 'latest'


- run: |
${{ steps.setup-firefox.outputs.firefox-path }} --version
- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version
- run: |
julia --project=$GITHUB_WORKSPACE -e 'import Pluto
nb = Pluto.Notebook([
Pluto.Cell("Text(x)"),
Pluto.Cell("""
@bind x html"\""
<script>
currentScript.value = "hello from " + navigator.userAgent
currentScript.dispatchEvent(new CustomEvent("input"))
</script>
"\""
""")
])
sesh = Pluto.ServerSession()
Pluto.SessionActions.add(sesh, nb)
@info "Running notebook..."
Pluto.update_save_run!(sesh, nb, nb.cells; run_async=false)
@info "Running notebook done"
get_x() = nb.cells[1].output.body
@info "Value before" get_x()
sesh.options.server.port = 1235
url = "http://localhost:$(sesh.options.server.port)/edit?secret=$(sesh.secret)&id=$(nb.notebook_id)"
process = Pluto.run!(sesh)
@info "Server started"
sleep(3)
const browser = "${{ matrix.browser }}"
@info "Starting browser..." browser
@assert browser ∈ ["chrome", "firefox", "safari"]
browser_process = @async try
run(
if browser == "chrome"
`${{ steps.setup-chrome.outputs.chrome-path }} --no-first-run $(url)`
elseif browser == "firefox"
`${{ steps.setup-firefox.outputs.firefox-path }} -headless -private-window $(url)`
else
`open -a Safari $(url)`
end
)
catch e
@error "Browser task failed" e
end
tstart = time()
begin
while get_x() == "missing"
@info "Waiting..."
sleep(1)
if time() - tstart > 120
error("This took too long!")
end
end
@info "yay it worked!" get_x()
end'
45 changes: 30 additions & 15 deletions .github/workflows/TryThisPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,37 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:

- uses: denoland/setup-deno@v1
with:
deno-version: "1.16.1"
- uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
## Try this Pull Request!
Open Julia and type:
\`\`\`jl
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="${context.payload.pull_request.head.repo.html_url}", rev="${context.payload.pull_request.head.ref}")
julia> using ${context.payload.repository.name.replace(/\.jl$/,"")}
\`\`\`
`
})
require("fs").writeFileSync("context.json", JSON.stringify(context))
- name: Generate comment
id: generate-comment
run: |
deno eval '
const context = JSON.parse(await Deno.readTextFile("context.json"));
const body = `
## Try this Pull Request!
Open Julia and type:
\`\`\`jl
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="${context.payload.pull_request.head.repo.html_url}", rev="${context.payload.pull_request.head.ref}")
julia> using ${context.payload.repository.name.replace(/\.jl$/,"")}
\`\`\`
`
await Deno.writeTextFile("comment.txt", body);
'
- uses: nefrob/[email protected]
with:
content: "comment.txt"
contentIsFilePath: "true"
regex: "jkhsdkjhasdfkjhawkejfbawkehfkajshdfkjahsdf"
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/TypeScriptCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: "18.x"
node-version: "21.x"

- run: npm install typescript@5.0.4 -g
- run: npm install typescript@5.4.3 -g

- run: npm install
working-directory: frontend
Expand Down
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Pluto"
uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
license = "MIT"
authors = ["Fons van der Plas <[email protected]>"]
version = "0.19.40"
version = "0.20.3"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down Expand Up @@ -42,18 +42,18 @@ Dates = "0, 1"
Downloads = "1"
ExpressionExplorer = "0.5, 0.6, 1"
FileWatching = "1"
FuzzyCompletions = "=0.5.4"
FuzzyCompletions = "=0.5.5"
HTTP = "^1.5.2"
HypertextLiteral = "0.7, 0.8, 0.9"
InteractiveUtils = "1"
Logging = "1"
LoggingExtras = "0.4, 1"
MIMEs = "0.1"
MIMEs = "0.1, 1"
Malt = "1.1"
Markdown = "1"
MsgPack = "1.1"
Pkg = "1"
PlutoDependencyExplorer = "~1.0"
PlutoDependencyExplorer = "~1.0, ~1.1"
PrecompileSignatures = "3"
PrecompileTools = "=1.2.1"
REPL = "1"
Expand All @@ -65,7 +65,7 @@ TOML = "1"
Tables = "1"
URIs = "1.3"
UUIDs = "1"
julia = "^1.6"
julia = "^1.10"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Expand Down
2 changes: 1 addition & 1 deletion frontend-bundler/.parcelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"..."
],
"reporters": [
"...",
"...",
"parcel-reporter-bundle-manifest"
]
}
Loading

0 comments on commit 57f5fb6

Please sign in to comment.