-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from Saransh-cpp/docs
Migrate docs to `Documenter.jl`
- Loading branch information
Showing
21 changed files
with
310 additions
and
151 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
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 "documenter@juliadocs.github.io" | ||
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", | ||
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.