Skip to content

Update code in docs for style and deprecations#394

Merged
bob-carpenter merged 13 commits into
masterfrom
update-style-deprecations
Sep 8, 2021
Merged

Update code in docs for style and deprecations#394
bob-carpenter merged 13 commits into
masterfrom
update-style-deprecations

Conversation

@WardBrian
Copy link
Copy Markdown
Member

Submission Checklist

  • Builds locally
  • Declare copyright holder and open-source license: see below

Summary

Resolves #383. Fixes spacing and syntax in all examples:

array[] T syntax over T[]

Spaces following commas

Mark all stan code with ```stan

Unify format of if/for/while loops to always use {} for clarity

Some of these changes were done automatically. It's hard to be certain if I caught every outdated example, but I have checked and am reasonable certain all the changes here are valid.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@WardBrian WardBrian changed the title Update style deprecations Update code in docs for style and deprecations Sep 7, 2021
Copy link
Copy Markdown
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic, despite the fact that I need an ice pack for my forearm after all the scrolling. All the code changes look good. Only a few comments/questions.

Comment thread src/cmdstan-guide/diagnose_utility.Rmd

<!-- T[]; rep_array; (T x, int n); -->
\index{{\tt \bfseries rep\_array }!{\tt (T x, int n): T[]}|hyperpage}
<!-- array[] T; rep_array; (T x, int n); -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These commented forms are for export to things like RStudio. Are you sure they can handle this array[] T format? If not, @bgoodri or @jgabry may know what RStudio needs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to add signatures for that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were simply caught by the find-and-replace done for the formatted output. I was assuming the comments were there as a more human-readable note in the source text, that's my bad. I can change them back if it's too much of a problem?

Comment thread src/reference-manual/expressions.Rmd
Comment thread src/reference-manual/statements.Rmd
Comment thread src/reference-manual/types.Rmd
Comment thread src/stan-users-guide/for-bugs-users.Rmd Outdated
Comment thread src/stan-users-guide/for-bugs-users.Rmd Outdated
Comment thread src/stan-users-guide/odes.Rmd
Comment thread src/stan-users-guide/style-guide.Rmd
Comment thread src/stan-users-guide/user-functions.Rmd Outdated
@WardBrian
Copy link
Copy Markdown
Member Author

@bob-carpenter this is ready for re-review, you should be able to look at just the diff on the most recent 3 commits

Copy link
Copy Markdown
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for all the updates.

@bob-carpenter bob-carpenter merged commit fa452ac into master Sep 8, 2021
@WardBrian WardBrian deleted the update-style-deprecations branch March 28, 2022 13:45
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 this pull request may close these issues.

revise variable typing in all doc

3 participants