Skip to content
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

Code block in documentation not rendering properly #2248

Closed
ayushpatnaikgit opened this issue Apr 30, 2023 · 5 comments · Fixed by #2249
Closed

Code block in documentation not rendering properly #2248

ayushpatnaikgit opened this issue Apr 30, 2023 · 5 comments · Fixed by #2249

Comments

@ayushpatnaikgit
Copy link

A code block in RNN's documentation isn't rendering properly. Attaching screenshot.

image

I tried to fix it, but I am unable to compile the docs. When I try julia docs/make.jl (before making any changes), I find that a bunch of doctests are failing. Do I need to alter the command to compile the documentation?

@darsnack
Copy link
Member

Did you activate the docs folder as your Julia project when running that command? You can see the CI workflow under .github for a reference on running docs.

@mcabbott
Copy link
Member

mcabbott commented May 1, 2023

It's sometimes a bit of a pain to run locally. Unfortunately, if you make a PR (on a fork) CI won't check this... but since I have privileges to make them on the root, it does... so I made #2249 quickly.

@ayushpatnaikgit
Copy link
Author

Thanks, @darsnack.
I tried it, but I am still not able to run the tests. This time, there is no output, Julia seems stuck on doctests.

I didn't find anything on this in the contribution guidelines.

@mcabbott any suggestions on how I can run the tests locally? I want to contribute to this package going ahead.

@mcabbott
Copy link
Member

Something like this works for me locally. This is what Kyle means by activate the folder:

cd docs
rm Manifest.toml
julia --project
] instantiate
exit()
julia --project make.jl

It will print many warnings, some of which are things we should fix, and should report that doctests pass:

┌ Warning: invalid local link: unresolved path in gpu.md
│   link.text =
│    1-element Vector{Any}:
│     "basic example"
│   link.url = "@ref man-basics"
└ @ Documenter.Writers.HTMLWriter ~/.julia/packages/Documenter/H5y27/src/Writers/HTMLWriter.jl:2081
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: Skipped ExpandTemplates step (doctest only).
[ Info: Skipped CrossReferences step (doctest only).
[ Info: Skipped CheckDocument step (doctest only).
[ Info: Skipped Populate step (doctest only).
[ Info: Skipped RenderDocument step (doctest only).
Test Summary:  | Pass  Total     Time
Doctests: Flux |    1      1  1m19.9s

@ayushpatnaikgit
Copy link
Author

Thanks!
I think both your solutions are correct. Perhaps the GPUs that I am trying aren't powerful enough, I just had to wait a bit longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants