-
Notifications
You must be signed in to change notification settings - Fork 40
Examples in the docs: base PR for cleaning up notebook workflow #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
1b1a560
copy make.jl from st/examples
st-- 7cabf13
add general docs dependencies
st-- d2cefec
clean up
st-- 60acddb
auto-collect examples as suggested
st-- 1831892
add docs dependencies for notebooks
st-- a594008
fix direct notebook bug
st-- 271d3d7
add blacklist as pairwise() is broken
st-- ef894a4
comment out examples as it breaks for non-existing directory (everyth…
st-- beb4adb
add docs README
st-- 00ccba9
Apply suggestions from code review
st-- feda9e0
remove duplicate doc entries
st-- e30169f
Merge branch 'st/examples-base' of github.com:JuliaGaussianProcesses/…
st-- 901b5d0
revert deletion
st-- a1718a3
separate examples into individual diretories with own Project.toml
st-- 66706c0
handle empty examples directory
st-- bddbea8
update README for non-unix systems
st-- c4a36f8
Apply suggestions from code review
st-- 384ac9c
Apply suggestions from code review
st-- 80deae7
revert removed doc
st-- 004d45e
Merge branch 'st/examples-base' of github.com:JuliaGaussianProcesses/…
st-- cd0bc2b
Apply suggestions from code review
st-- 75db97d
remove unused dependencies from svm example
st-- 8c657bc
fix bug in svm notebook
st-- 7ac29c6
Merge branch 'st/examples-base' of github.com:JuliaGaussianProcesses/…
st-- 001dfc3
Apply suggestions from code review
st-- a60e230
fix examples scripts compose
st-- b2faceb
Merge branch 'st/examples-base' of github.com:JuliaGaussianProcesses/…
st-- 14ad37d
fix script output name
st-- 715e0a5
bugfix
st-- 09990f8
include preprocessor for Documenter@setup
st-- 4f34f37
Apply suggestions from code review
st-- f2db1ea
Correct file_path for environment
theogf c8298ec
Adding the necessary header for the @setup replacement
theogf 754a8db
correct headers for remaining examples scripts
st-- 8641c78
fix KRR notebook and swap it with SVM in blacklist
st-- 407d6f0
do not execute notebook
st-- 3e452ae
update .gitignore
st-- 262ceef
Update docs/make.jl
st-- 495bf19
update docs and examples README and ignore examples/README in docs/ma…
st-- 34c97fa
fix plotting
st-- 87da659
Update examples/kernel-ridge-regression/script.jl
st-- e851307
add under-construction warnings to examples
st-- b3c8aa6
copy over fixes from KRR example
st-- 6fd8175
Apply suggestions from code review
st-- 16ba774
Merge branch 'master' of github.com:JuliaGaussianProcesses/KernelFunc…
st-- 11119c2
Merge remote-tracking branch 'origin' into st/examples-base
st-- f034c63
commit examples/*/Manifest.toml
st-- 2fa2f1b
fix optional package loading
st-- 6b3238b
doc fixes
st-- 1ea5c6c
explicit Pkg.add of Literate
st-- 241cf62
Apply suggestions from code review
st-- df1c526
Update examples/README.md
st-- cac9e7d
update README
st-- f2d8dcc
Update docs/Project.toml
st-- d060958
Merge branch 'master' into st/examples-base
st-- 2b1627b
update examples *.toml
st-- a91edc9
use cleaner f form
st-- 1daf1c3
fix errors
st-- b262ac0
fix example Manifest.tomls
st-- 4cce78e
Update examples/README.md
st-- 64d5ef7
better error messages?
st-- bf47391
Merge branch 'st/examples-base' of github.com:JuliaGaussianProcesses/…
st-- 853b437
Revert "better error messages?"
st-- eff7c11
give responsibility for adding Literate dependency back to examples
st-- a44d48f
preprocess header in italics
st-- fa0033b
Apply suggestions from code review
st-- 1fd657d
Update examples/README.md
st-- 735b437
compat for Kronecker in docs
st-- 03a6840
add [compat]
st-- 7aebf83
Apply suggestions from code review
st-- File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# How to build the docs locally | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to get improvements to the workflow. :) |
||
|
||
Assuming you are in this (docs/) directory: | ||
|
||
Install docs dependencies: | ||
```bash | ||
julia --project=. -e 'using Pkg; Pkg.instantiate()' | ||
``` | ||
This will use the last released KernelFunctions.jl for building the docs. | ||
|
||
If instead you want to reflect the local state of the Git repository in your built docs, make sure to change the dependency to the development version: | ||
```bash | ||
julia --project=. -e "using Pkg; Pkg.develop(path=\"$(readlink -f ..)\")" | ||
st-- marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
To undo the pinning to the local path by the previous command, run | ||
```bash | ||
julia --project=. -e 'using Pkg; Pkg.free("KernelFunctions")' | ||
``` | ||
|
||
To actually build the docs, run | ||
```bash | ||
julia --project=. make.jl | ||
``` | ||
The built docs will be underneath build/ | ||
st-- marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# How to contribute to the docs | ||
|
||
## To add additional docs dependencies | ||
|
||
```bash | ||
julia --project=. -e 'using Pkg; Pkg.add("NewDependency")' | ||
``` | ||
st-- marked this conversation as resolved.
Show resolved
Hide resolved
|
||
and commit the changes to Project.toml | ||
st-- marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be cleaner and probably easier to maintain (less conflicting dependencies etc) if
docs/Project.toml
only contains the dependencies for the actual documentation and each example uses a separate project environment with its own pinned dependencies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have played around with this in https://github.com/devmotion/CalibrationErrors.jl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree - I was wondering how you would make that work but the Pkg.activate() context manager is really neat, so I'll try to add that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm, that would mean having to run the Pkg.develop in every single example subdirectory if you want to work on them though, and would that not make it harder to check the examples run consistently with any future changes to KernelFunctions (in a PR)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the main point is to have independent environments. In this way you can avoid that dependencies of different examples are conflicting and it is clear which packages and which versions were used to run the individual examples.
They are re-run every time the documentation is built so one would just check that the build passes and the webpage looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, for the examples to actually pull in the in-development version of the package I think your make.jl would need to also include a
Pkg.develop(path=joinpath(@__DIR__, ".."))
, but with that I think it should work:)I think it'd still be good to provide a Makefile or some other way of making it easy for contributors to locally run tests, formatter, etc..