Skip to content

Commit

Permalink
Merge pull request #3 from JuliaPluto/tests-from-pluto
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Feb 7, 2024
2 parents 891d41f + a8f6351 commit f26dc9a
Show file tree
Hide file tree
Showing 9 changed files with 1,026 additions and 12 deletions.
6 changes: 0 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,3 @@ ExpressionExplorer = "0.6"
InteractiveUtils = "1"
Markdown = "1"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ Take a look at the [**Documentation →**](https://plutojl.org/en/docs/plutodepe

To work on this package, clone both the Pluto.jl and PlutoDependencyExplorer.jl repositories to your local drive. Then:

1. Enter the Pluto.jl package directory: `~ cd ~/Documents/Pluto.jl/`
2. Open Julia in this environment: `julia --project`
3. In the Pluto.jl package, develop the PlutoDependencyExplorer package: `(Pluto.jl) pkg> dev ~/Documents/PlutoDependencyExplorer.jl/`
4. Restart Julia. In your global environment, develop the Pluto.jl package `(@1.10) pkg> dev ~/Documents/Pluto.jl`
5. Also develop: `(@1.10) pkg> dev ~/Documents/PlutoDependencyExplorer.jl`
6. You can now run or test Pluto, and it will use your local copy of PlutoDependencyExplorer.
1. In your global environment, develop the Pluto and PlutoDependencyExplorer packages:
`(@1.10) pkg> dev ~/Documents/Pluto.jl`
`(@1.10) pkg> dev ~/Documents/PlutoDependencyExplorer.jl`
2. You can now run or `Pkg.test()` Pluto, and it will use your local copy of PlutoDependencyExplorer.

### Advanced: making a change to Pluto and PlutoDependencyExplorer at the same time.

If you are working on a change to PlutoDependencyExplorer that requires a matching change in Pluto, then you open a branch/PR on both repositories.

We need to tell PlutoDependencyExplorer which version of Pluto to use. To do this, edit the file `PlutoDependencyExplorer.jl/test/pluto integration/DEV EDIT ME pluto pkg source.jl`.


5 changes: 5 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
46 changes: 46 additions & 0 deletions test/pluto integration/DEV EDIT ME pluto pkg source.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""
# HOW THIS WORKS:
the PackageSpec written in this file will be used to import Pluto during these tests.
# DO I NEED IT?
When developing PlutoDependencyExplorer, and you don't need matching changes from Pluto, then leave this file empty.
In the special case that you need to make changes to PlutoDependencyExplorer and Pluto at the same time, you can use this file.
# HOW TO USE IT
## Step 1:
If this change needs a matching Pluto change, set:
```julia
i_need_a_special_pluto_branch = true
```
and continue to Step 2. Otherwise, set it to `false` and you're done.
## Step 2:
"""



i_need_a_special_pluto_branch = true


if i_need_a_special_pluto_branch
if get(ENV, "CI", "🍄") == "true"
Pkg.PackageSpec(
name="Pluto",
rev="PlutoDependencyExplorer-split",
)
else
Pkg.PackageSpec(
name="Pluto",
path="/Users/fons/Documents/Pluto.jl"
)
end
else
nothing
end


Loading

0 comments on commit f26dc9a

Please sign in to comment.