-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use interlinks and citations in docs (#223)
* Add DocumenterInterLinks as docs dependency * Add links to package docs * Add links to packages with no inventory * Add external links to docstrings * Use external links in docs * Add DocumenterCitations as dependency * Set up references * Format citations using CSS * Add references bibtex * Use references in docstrings * Use references in docs pages * Switch back to numeric style * Increment patch number
- Loading branch information
Showing
19 changed files
with
218 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Pathfinder" | ||
uuid = "b1d3bc72-d0e7-4279-b92f-7fa5d6d2d454" | ||
authors = ["Seth Axen <[email protected]> and contributors"] | ||
version = "0.9.6" | ||
version = "0.9.7" | ||
|
||
[deps] | ||
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" | ||
|
This file contains 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 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,11 @@ | ||
# DocInventory version 1 | ||
project = "Distributions.jl" | ||
version = "0.25.113" | ||
|
||
# Filtered to just the types we link to | ||
[[jl.type]] | ||
name = "Distributions.MixtureModel" | ||
uri = "mixture/#$" | ||
[[jl.type]] | ||
name = "Distributions.MvNormal" | ||
uri = "multivariate/#$" |
This file contains 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,13 @@ | ||
# DocInventory version 1 | ||
project = "DynamicHMC.jl" | ||
version = "3.4.7" | ||
|
||
# Filtered to just the types we link to | ||
[[std.doc]] | ||
dispname = "A worked example" | ||
name = "worked_example" | ||
uri = "worked_example/" | ||
|
||
[[jl.type]] | ||
name = "DynamicHMC.GaussianKineticEnergy" | ||
uri = "interface/#$" |
This file contains 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,11 @@ | ||
# DocInventory version 1 | ||
project = "Transducers.jl" | ||
version = "0.4.84" | ||
|
||
# Filtered to just the types we link to | ||
[[jl.type]] | ||
name = "Transducers.PreferParallel" | ||
uri = "reference/manual/#$" | ||
[[jl.type]] | ||
name = "Transducers.SequentialEx" | ||
uri = "reference/manual/#$" |
This file contains 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 |
---|---|---|
@@ -1,8 +1,41 @@ | ||
using Pathfinder | ||
using Documenter | ||
using DocumenterCitations | ||
using DocumenterInterLinks | ||
|
||
DocMeta.setdocmeta!(Pathfinder, :DocTestSetup, :(using Pathfinder); recursive=true) | ||
|
||
bib = CitationBibliography(joinpath(@__DIR__, "src", "references.bib"); style=:numeric) | ||
|
||
links = InterLinks( | ||
"AdvancedHMC" => "https://turinglang.org/AdvancedHMC.jl/stable/", | ||
"ADTypes" => "https://sciml.github.io/ADTypes.jl/stable/", | ||
"Distributions" => ( | ||
"https://juliastats.org/Distributions.jl/stable/", | ||
"https://juliastats.org/Distributions.jl/dev/objects.inv", | ||
joinpath(@__DIR__, "inventories", "Distributions.toml"), | ||
), | ||
"DynamicHMC" => ( | ||
"https://www.tamaspapp.eu/DynamicHMC.jl/stable/", | ||
"https://www.tamaspapp.eu/DynamicHMC.jl/dev/objects.inv", | ||
joinpath(@__DIR__, "inventories", "DynamicHMC.toml"), | ||
), | ||
"DynamicPPL" => "https://turinglang.org/DynamicPPL.jl/stable/", | ||
"LogDensityProblems" => "https://www.tamaspapp.eu/LogDensityProblems.jl/stable/", | ||
"MCMCChains" => ( | ||
"https://turinglang.org/MCMCChains.jl/stable/", | ||
"https://turinglang.org/MCMCChains.jl/dev/objects.inv", | ||
), | ||
"Optim" => "https://julianlsolvers.github.io/Optim.jl/stable/", | ||
"Optimization" => "https://docs.sciml.ai/Optimization/stable/", | ||
"PSIS" => "https://julia.arviz.org/PSIS/stable/", | ||
"Transducers" => ( | ||
"https://juliafolds2.github.io/Transducers.jl/stable/", # not built for a while | ||
"https://juliafolds2.github.io/Transducers.jl/dev/objects.inv", | ||
joinpath(@__DIR__, "inventories", "Transducers.toml"), | ||
), | ||
) | ||
|
||
makedocs(; | ||
modules=[Pathfinder], | ||
authors="Seth Axen <[email protected]> and contributors", | ||
|
@@ -11,7 +44,7 @@ makedocs(; | |
format=Documenter.HTML(; | ||
prettyurls=get(ENV, "CI", "false") == "true", | ||
canonical="https://mlcolab.github.io/Pathfinder.jl", | ||
assets=String[], | ||
assets=String["assets/citations.css"], | ||
), | ||
pages=[ | ||
"Home" => "index.md", | ||
|
@@ -21,7 +54,9 @@ makedocs(; | |
"Initializing HMC" => "examples/initializing-hmc.md", | ||
"Turing usage" => "examples/turing.md", | ||
], | ||
"References" => "references.md", | ||
], | ||
plugins=[bib, links], | ||
) | ||
|
||
if get(ENV, "DEPLOY_DOCS", "true") == "true" | ||
|
This file contains 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,29 @@ | ||
/* Adapted from DocumenterCitations.jl's docs */ | ||
.citation dl { | ||
display: grid; | ||
grid-template-columns: max-content auto; | ||
} | ||
|
||
.citation dt { | ||
grid-column-start: 1; | ||
} | ||
|
||
.citation dd { | ||
grid-column-start: 2; | ||
margin-bottom: 0.75em; | ||
} | ||
|
||
.citation ul { | ||
padding: 0 0 2.25em 0; | ||
margin: 0; | ||
list-style: none !important; | ||
} | ||
|
||
.citation ul li { | ||
text-indent: -2.25em; | ||
margin: 0.33em 0.5em 0.5em 2.25em; | ||
} | ||
|
||
.citation ol li { | ||
padding-left: 0.75em; | ||
} |
This file contains 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 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 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 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 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,34 @@ | ||
@article{Byrd1994, | ||
title = {Representations of Quasi-{{Newton}} Matrices and Their Use in Limited Memory Methods}, | ||
author = {Byrd, Richard H. and Nocedal, Jorge and Schnabel, Robert B.}, | ||
year = {1994}, | ||
month = jan, | ||
journal = {Mathematical Programming}, | ||
volume = {63}, | ||
number = {1-3}, | ||
pages = {129--156}, | ||
issn = {0025-5610, 1436-4646}, | ||
doi = {10.1007/BF01582063} | ||
} | ||
|
||
@misc{StanHMCParameters, | ||
title = {Stan Reference Manual: {HMC} algorithm parameters}, | ||
urldate = {2024-12-06}, | ||
url = {https://mc-stan.org/docs/reference-manual/mcmc.html#hmc-algorithm-parameters} | ||
} | ||
|
||
@article{ZhangPathfinder2021, | ||
title = {Pathfinder: {{Parallel}} Quasi-{{Newton}} Variational Inference}, | ||
shorttitle = {Pathfinder}, | ||
author = {Zhang, Lu and Carpenter, Bob and Gelman, Andrew and Vehtari, Aki}, | ||
year = {2022}, | ||
journal = {Journal of Machine Learning Research}, | ||
volume = {23}, | ||
number = {306}, | ||
pages = {1--49}, | ||
issn = {1533-7928}, | ||
urldate = {2024-12-06}, | ||
url = {http://jmlr.org/papers/v23/21-0889.html}, | ||
eprint = {2108.03782}, | ||
eprinttype = {arXiv} | ||
} |
This file contains 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,4 @@ | ||
# References | ||
|
||
```@bibliography | ||
``` |
This file contains 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 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 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
Oops, something went wrong.
d0ec5f0
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.
@JuliaRegistrator register
d0ec5f0
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.
Registration pull request created: JuliaRegistries/General/120837
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
Also, note the warning: Version 0.9.7 skips over 0.9.6
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.
d0ec5f0
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.
@JuliaRegistrator register
d0ec5f0
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.
Registration pull request updated: JuliaRegistries/General/120837
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: