TuringLang / docs

Documentation and tutorials for the Turing language
https://turinglang.org/docs/
MIT License
231 stars 99 forks source link

Format code #286

Closed devmotion closed 2 years ago

devmotion commented 2 years ago

I started going through the tutorials and updating them. But I thought it would be reasonable to apply a consistent code style first in a separate PR.

I think adopting a code style (I chose Blue style here since it is used in DynamicPPL, JuliaGPs, and some other Turing packages) will help to improve user experience and the quality of the tutorials. With https://github.com/domluna/JuliaFormatter.jl/pull/552 and https://github.com/domluna/JuliaFormatter.jl/pull/554, JuliaFormatter can also be used for jmd files which helps to enforce the code style.

The only issue was https://github.com/domluna/JuliaFormatter.jl/issues/555, caused by https://github.com/julia-vscode/CSTParser.jl/issues/328, which I worked around until a fix is available by disabling automatic formatting for the affected lines in the VI tutorial.

devmotion commented 2 years ago

Another worker misconfiguration, @staticfloat? Or is it an issue on our side?

staticfloat commented 2 years ago

Another worker misconfiguration, @staticfloat? Or is it an issue on our side?

Yes, I forgot about those two hosts (The exclusive ones). Fixed now.

xukai92 commented 2 years ago

What's the status of this PR? Is buildkite/turingtutorials supposed to succeed?

devmotion commented 2 years ago

Yes. I think I just have to rename one of the tutorials that were pushed to the master branch. The filenames are too long.