-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Migrate docs to Documenter.jl
#199
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
290aed6
Migrate to `Documenter.jl`
Saransh-cpp 6433f27
Fix syntactical errors
Saransh-cpp ce6c3e4
Add assets, prettyurls
Saransh-cpp 0a0d4c5
Final touches
Saransh-cpp ef4ccec
Final final touches
Saransh-cpp 23cca48
Use `@autodocs` and fix references
Saransh-cpp b44e11c
Forgot the note
Saransh-cpp d844d00
Fix more cross-references
Saransh-cpp 3277ffb
Update links in README
Saransh-cpp c3f0c60
Rebase errors
Saransh-cpp 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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
# from https://github.com/CliMA/ClimaTimeSteppers.jl | ||
name: Doc Preview Cleanup | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
doc-preview-cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
- name: Delete preview and history + push changes | ||
run: | | ||
if [ -d "previews/PR$PRNUM" ]; then | ||
git config user.name "Documenter.jl" | ||
git config user.email "[email protected]" | ||
git rm -rf "previews/PR$PRNUM" | ||
git commit -m "delete preview" | ||
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) | ||
git push --force origin gh-pages-new:gh-pages | ||
fi | ||
env: | ||
PRNUM: ${{ github.event.number }} |
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,14 @@ | ||
name: pr_comment | ||
on: | ||
pull_request: | ||
types: [labeled] | ||
jobs: | ||
pr_comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create PR comment | ||
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name && github.event.label.name == 'documentation' # if this is a pull request build AND the pull request is NOT made from a fork | ||
uses: thollander/actions-comment-pull-request@71efef56b184328c7ef1f213577c3a90edaa4aff | ||
with: | ||
message: 'Once the documentation build has completed, you can preview any updated documentation at this URL: https://fluxml.ai/Metalhead.jl/previews/PR${{ github.event.number }}/' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,2 @@ | ||
build/ | ||
site/ |
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,6 +1,8 @@ | ||
[deps] | ||
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" | ||
DataAugmentation = "88a5189c-e7ff-4f85-ac6b-e6158070f02e" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" | ||
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" | ||
Metalhead = "dbeba491-748d-5e0e-a39e-b530a07fa0cc" | ||
Publish = "f065f642-d108-4f50-8aa5-6749150a895a" | ||
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" | ||
OneHotArrays = "0b1bfda6-eb8a-41d2-88d8-f5af5cad476f" |
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,17 +1,26 @@ | ||
using Pkg | ||
using Documenter, Metalhead, Artifacts, LazyArtifacts, Images, OneHotArrays, DataAugmentation, Flux | ||
|
||
Pkg.develop(; path = "..") | ||
DocMeta.setdocmeta!(Metalhead, :DocTestSetup, :(using Metalhead); recursive = true) | ||
|
||
using Publish | ||
using Artifacts, LazyArtifacts | ||
using Metalhead | ||
makedocs(modules = [Metalhead, Artifacts, LazyArtifacts, Images, OneHotArrays, DataAugmentation, Flux], | ||
sitename = "Metalhead.jl", | ||
doctest = false, | ||
pages = ["Home" => "index.md", | ||
"Tutorials" => [ | ||
"tutorials/quickstart.md", | ||
], | ||
"Developer guide" => "contributing.md", | ||
"API reference" => [ | ||
"api/reference.md", | ||
], | ||
], | ||
format = Documenter.HTML( | ||
canonical = "https://fluxml.ai/Metalhead.jl/stable/", | ||
# analytics = "UA-36890222-9", | ||
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. I am not sure if this is supposed to be the same across all |
||
assets = ["assets/flux.css"], | ||
prettyurls = get(ENV, "CI", nothing) == "true"), | ||
) | ||
|
||
# override default theme | ||
cp(artifact"flux-theme", "../_flux-theme"; force = true) | ||
|
||
p = Publish.Project(Metalhead) | ||
|
||
function build_and_deploy(label) | ||
rm(label; recursive = true, force = true) | ||
return deploy(Metalhead; root = "/Metalhead.jl", label = label) | ||
end | ||
deploydocs(repo = "github.com/FluxML/Metalhead.jl.git", | ||
target = "build", | ||
push_preview = true) |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
# API Reference | ||
|
||
The API reference of `Metalhead.jl`. | ||
|
||
**Note**: This page is still in progress. | ||
|
||
```@autodocs | ||
Modules = [Metalhead] | ||
``` | ||
|
||
```@docs | ||
Metalhead.create_classifier | ||
Metalhead.squeeze_excite | ||
Metalhead.LayerScale | ||
Metalhead.DropBlock | ||
Metalhead.StochasticDepth | ||
``` |
Oops, something went wrong.
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.
The maintainers will need to add this to the repository secrets.