Skip to content

Commit

Permalink
Merge pull request #720 from stan-dev/remove-R
Browse files Browse the repository at this point in the history
Remove any dependency on R
  • Loading branch information
WardBrian authored Mar 1, 2024
2 parents b57e398 + 4aeb8ba commit 18027a4
Show file tree
Hide file tree
Showing 134 changed files with 457 additions and 524 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ src/_website
*._pdf


src/**/*.html
src/**/*.tex
!header.tex
!json.html

# eBook build output
*.epub
*.mobi
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ previously, we used [bookdown](https://github.com/rstudio/bookdown).
[Download quarto](https://quarto.org/docs/download/)
To build the pdf version of the docs, you will need to [install LaTeX](https://www.latex-project.org/get/) as well.


Quarto accepts both [Rmarkdown (`.Rmd`)](https://rmarkdown.rstudio.com)
and [`.qmd`](https://quarto.org/docs/authoring/markdown-basics.html) source files
Quarto accepts [`.qmd`](https://quarto.org/docs/authoring/markdown-basics.html) source files
and uses the [Pandoc](https://pandoc.org) conversion engine.

## Scripts to build and maintain the docset
Expand All @@ -47,7 +45,7 @@ Requires Python 3.7 or higher, due to call to `subprocess.run`, kwarg `capture_o
* `python build.py 2 35 website` - builds the docs website in `docs/2_42`.
* `python build.py 2 35 pdf functions-reference` - builds only the pdf version of the Stan functions reference, resulting document is `docs/2_35/functions-reference-2_35.pdf`
* `python build.py 2 35 pdf all` - builds all pdfs from the Stan documentation set, resulting pdfs are in `docs/2_35`.


**Additional scripts**

Expand Down
4 changes: 2 additions & 2 deletions extract_function_sigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def main():
sigs = set()
ref_dir = os.path.join('src', 'functions-reference')
with pushd(ref_dir):
for file in glob.glob('*.Rmd'):
for file in glob.glob('*.qmd'):
print(file)
with open(file) as rmd_file:
lines = rmd_file.readlines()
Expand All @@ -50,7 +50,7 @@ def main():
sigs.add('{}; {}; {}'.format(parts[1], parts[2], parts[0]))
else:
print('not a function sig: {}'.format(line))

with open(outfile_name, 'w') as outfile:
outfile.write('# This file is semicolon delimited\n')
outfile.write('StanFunction; Arguments; ReturnType\n')
Expand Down
5 changes: 0 additions & 5 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@
*.ind
*.toc

./**/*.html
./**/*.tex
!header.tex
!json.html

/.quarto/
10 changes: 0 additions & 10 deletions src/_functions.R

This file was deleted.

248 changes: 124 additions & 124 deletions src/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ project:
render:
- "index.qmd"
- "404.qmd"
- "cmdstan-guide/overview.qmd"
- "functions-reference/overview.qmd"
- "reference-manual/overview.qmd"
- "stan-users-guide/overview.qmd"
- "cmdstan-guide/*.Rmd"
- "functions-reference/*.Rmd"
- "reference-manual/*.Rmd"
- "stan-users-guide/*.Rmd"
- "!sdlc.Rmd"
- "cmdstan-guide/*.qmd"
- "functions-reference/*.qmd"
- "reference-manual/*.qmd"
- "stan-users-guide/*.qmd"
- "!sdlc.qmd"
- "!cmdstan-guide/index.qmd"
- "!functions-reference/index.qmd"
- "!reference-manual/index.qmd"
- "!stan-users-guide/index.qmd"

bibliography: bibtex/all.bib
biblio-style: apalike
Expand Down Expand Up @@ -93,48 +93,48 @@ website:
- section: "Version {{< env STAN_DOCS_VERSION >}}"
- section: "Example Models"
contents:
- stan-users-guide/regression.Rmd
- stan-users-guide/time-series.Rmd
- stan-users-guide/missing-data.Rmd
- stan-users-guide/truncation-censoring.Rmd
- stan-users-guide/finite-mixtures.Rmd
- stan-users-guide/measurement-error.Rmd
- stan-users-guide/latent-discrete.Rmd
- stan-users-guide/sparse-ragged.Rmd
- stan-users-guide/clustering.Rmd
- stan-users-guide/gaussian-processes.Rmd
- stan-users-guide/hyperspherical-models.Rmd
- stan-users-guide/algebraic-equations.Rmd
- stan-users-guide/odes.Rmd
- stan-users-guide/one-dimensional-integrals.Rmd
- stan-users-guide/complex-numbers.Rmd
- stan-users-guide/dae.Rmd
- stan-users-guide/regression.qmd
- stan-users-guide/time-series.qmd
- stan-users-guide/missing-data.qmd
- stan-users-guide/truncation-censoring.qmd
- stan-users-guide/finite-mixtures.qmd
- stan-users-guide/measurement-error.qmd
- stan-users-guide/latent-discrete.qmd
- stan-users-guide/sparse-ragged.qmd
- stan-users-guide/clustering.qmd
- stan-users-guide/gaussian-processes.qmd
- stan-users-guide/hyperspherical-models.qmd
- stan-users-guide/algebraic-equations.qmd
- stan-users-guide/odes.qmd
- stan-users-guide/one-dimensional-integrals.qmd
- stan-users-guide/complex-numbers.qmd
- stan-users-guide/dae.qmd
- section: "Programming Techniques"
contents:
- stan-users-guide/floating-point.Rmd
- stan-users-guide/matrices-arrays.Rmd
- stan-users-guide/multi-indexing.Rmd
- stan-users-guide/user-functions.Rmd
- stan-users-guide/custom-probability.Rmd
- stan-users-guide/proportionality-constants.Rmd
- stan-users-guide/problematic-posteriors.Rmd
- stan-users-guide/reparameterization.Rmd
- stan-users-guide/efficiency-tuning.Rmd
- stan-users-guide/parallelization.Rmd
- stan-users-guide/floating-point.qmd
- stan-users-guide/matrices-arrays.qmd
- stan-users-guide/multi-indexing.qmd
- stan-users-guide/user-functions.qmd
- stan-users-guide/custom-probability.qmd
- stan-users-guide/proportionality-constants.qmd
- stan-users-guide/problematic-posteriors.qmd
- stan-users-guide/reparameterization.qmd
- stan-users-guide/efficiency-tuning.qmd
- stan-users-guide/parallelization.qmd
- section: "Posterior Inference & Model Checking"
contents:
- stan-users-guide/posterior-prediction.Rmd
- stan-users-guide/simulation-based-calibration.Rmd
- stan-users-guide/posterior-predictive-checks.Rmd
- stan-users-guide/cross-validation.Rmd
- stan-users-guide/poststratification.Rmd
- stan-users-guide/decision-analysis.Rmd
- stan-users-guide/bootstrap.Rmd
- stan-users-guide/posterior-prediction.qmd
- stan-users-guide/simulation-based-calibration.qmd
- stan-users-guide/posterior-predictive-checks.qmd
- stan-users-guide/cross-validation.qmd
- stan-users-guide/poststratification.qmd
- stan-users-guide/decision-analysis.qmd
- stan-users-guide/bootstrap.qmd
- section: "Appendices"
contents:
- stan-users-guide/using-stanc.Rmd
- stan-users-guide/style-guide.Rmd
- stan-users-guide/for-bugs-users.Rmd
- stan-users-guide/using-stanc.qmd
- stan-users-guide/style-guide.qmd
- stan-users-guide/for-bugs-users.qmd

- id: reference-manual
title: "Reference Manual"
Expand All @@ -143,33 +143,33 @@ website:
- section: "Version {{< env STAN_DOCS_VERSION >}}"
- section: "Language"
contents:
- reference-manual/encoding.Rmd
- reference-manual/includes.Rmd
- reference-manual/comments.Rmd
- reference-manual/whitespace.Rmd
- reference-manual/types.Rmd
- reference-manual/expressions.Rmd
- reference-manual/statements.Rmd
- reference-manual/blocks.Rmd
- reference-manual/user-functions.Rmd
- reference-manual/transforms.Rmd
- reference-manual/syntax.Rmd
- reference-manual/execution.Rmd
- reference-manual/deprecations.Rmd
- reference-manual/removals.Rmd
- reference-manual/encoding.qmd
- reference-manual/includes.qmd
- reference-manual/comments.qmd
- reference-manual/whitespace.qmd
- reference-manual/types.qmd
- reference-manual/expressions.qmd
- reference-manual/statements.qmd
- reference-manual/blocks.qmd
- reference-manual/user-functions.qmd
- reference-manual/transforms.qmd
- reference-manual/syntax.qmd
- reference-manual/execution.qmd
- reference-manual/deprecations.qmd
- reference-manual/removals.qmd
- section: "Algorithms"
contents:
- reference-manual/mcmc.Rmd
- reference-manual/analysis.Rmd
- reference-manual/optimization.Rmd
- reference-manual/pathfinder.Rmd
- reference-manual/variational.Rmd
- reference-manual/laplace.Rmd
- reference-manual/diagnostics.Rmd
- reference-manual/mcmc.qmd
- reference-manual/analysis.qmd
- reference-manual/optimization.qmd
- reference-manual/pathfinder.qmd
- reference-manual/variational.qmd
- reference-manual/laplace.qmd
- reference-manual/diagnostics.qmd
- section: "Usage"
contents:
- reference-manual/reproducibility.Rmd
- reference-manual/licenses.Rmd
- reference-manual/reproducibility.qmd
- reference-manual/licenses.qmd

- id: functions-reference
title: "Stan Functions"
Expand All @@ -178,44 +178,44 @@ website:
- section: "Version {{< env STAN_DOCS_VERSION >}}"
- section: "Built-in Functions"
contents:
- functions-reference/void_functions.Rmd
- functions-reference/integer-valued_basic_functions.Rmd
- functions-reference/real-valued_basic_functions.Rmd
- functions-reference/complex-valued_basic_functions.Rmd
- functions-reference/array_operations.Rmd
- functions-reference/matrix_operations.Rmd
- functions-reference/complex_matrix_operations.Rmd
- functions-reference/sparse_matrix_operations.Rmd
- functions-reference/mixed_operations.Rmd
- functions-reference/compound_arithmetic_and_assignment.Rmd
- functions-reference/higher-order_functions.Rmd
- functions-reference/deprecated_functions.Rmd
- functions-reference/removed_functions.Rmd
- functions-reference/conventions_for_probability_functions.Rmd
- functions-reference/void_functions.qmd
- functions-reference/integer-valued_basic_functions.qmd
- functions-reference/real-valued_basic_functions.qmd
- functions-reference/complex-valued_basic_functions.qmd
- functions-reference/array_operations.qmd
- functions-reference/matrix_operations.qmd
- functions-reference/complex_matrix_operations.qmd
- functions-reference/sparse_matrix_operations.qmd
- functions-reference/mixed_operations.qmd
- functions-reference/compound_arithmetic_and_assignment.qmd
- functions-reference/higher-order_functions.qmd
- functions-reference/deprecated_functions.qmd
- functions-reference/removed_functions.qmd
- functions-reference/conventions_for_probability_functions.qmd
- section: "Discrete Distributions"
contents:
- functions-reference/binary_distributions.Rmd
- functions-reference/bounded_discrete_distributions.Rmd
- functions-reference/unbounded_discrete_distributions.Rmd
- functions-reference/multivariate_discrete_distributions.Rmd
- functions-reference/binary_distributions.qmd
- functions-reference/bounded_discrete_distributions.qmd
- functions-reference/unbounded_discrete_distributions.qmd
- functions-reference/multivariate_discrete_distributions.qmd
- section: "Continuous Distributions"
contents:
- functions-reference/unbounded_continuous_distributions.Rmd
- functions-reference/positive_continuous_distributions.Rmd
- functions-reference/positive_lower-bounded_distributions.Rmd
- functions-reference/continuous_distributions_on_0_1.Rmd
- functions-reference/circular_distributions.Rmd
- functions-reference/bounded_continuous_distributions.Rmd
- functions-reference/distributions_over_unbounded_vectors.Rmd
- functions-reference/simplex_distributions.Rmd
- functions-reference/correlation_matrix_distributions.Rmd
- functions-reference/covariance_matrix_distributions.Rmd
- functions-reference/unbounded_continuous_distributions.qmd
- functions-reference/positive_continuous_distributions.qmd
- functions-reference/positive_lower-bounded_distributions.qmd
- functions-reference/continuous_distributions_on_0_1.qmd
- functions-reference/circular_distributions.qmd
- functions-reference/bounded_continuous_distributions.qmd
- functions-reference/distributions_over_unbounded_vectors.qmd
- functions-reference/simplex_distributions.qmd
- functions-reference/correlation_matrix_distributions.qmd
- functions-reference/covariance_matrix_distributions.qmd
- section: "Additional Distributions"
contents:
- functions-reference/hidden_markov_models.Rmd
- functions-reference/hidden_markov_models.qmd
- section: "Appendix"
contents:
- functions-reference/mathematical_functions.Rmd
- functions-reference/mathematical_functions.qmd

- id: cmdstan-guide
title: "CmdStan Guide"
Expand All @@ -224,38 +224,38 @@ website:
- section: "Version {{< env STAN_DOCS_VERSION >}}"
- section: "Quickstart Guide"
contents:
- cmdstan-guide/installation.Rmd
- cmdstan-guide/example_model_data.Rmd
- cmdstan-guide/compiling_stan_programs.Rmd
- cmdstan-guide/mcmc_sampling_intro.Rmd
- cmdstan-guide/optimization_intro.Rmd
- cmdstan-guide/pathfinder_intro.Rmd
- cmdstan-guide/variational_intro.Rmd
- cmdstan-guide/generate_quantities_intro.Rmd
- cmdstan-guide/installation.qmd
- cmdstan-guide/example_model_data.qmd
- cmdstan-guide/compiling_stan_programs.qmd
- cmdstan-guide/mcmc_sampling_intro.qmd
- cmdstan-guide/optimization_intro.qmd
- cmdstan-guide/pathfinder_intro.qmd
- cmdstan-guide/variational_intro.qmd
- cmdstan-guide/generate_quantities_intro.qmd
- section: "Reference Manual"
contents:
- cmdstan-guide/command_line_options.Rmd
- cmdstan-guide/mcmc_config.Rmd
- cmdstan-guide/optimize_config.Rmd
- cmdstan-guide/pathfinder_config.Rmd
- cmdstan-guide/variational_config.Rmd
- cmdstan-guide/generate_quantities_config.Rmd
- cmdstan-guide/laplace_sample_config.Rmd
- cmdstan-guide/log_prob_config.Rmd
- cmdstan-guide/diagnose_config.Rmd
- cmdstan-guide/parallelization.Rmd
- cmdstan-guide/command_line_options.qmd
- cmdstan-guide/mcmc_config.qmd
- cmdstan-guide/optimize_config.qmd
- cmdstan-guide/pathfinder_config.qmd
- cmdstan-guide/variational_config.qmd
- cmdstan-guide/generate_quantities_config.qmd
- cmdstan-guide/laplace_sample_config.qmd
- cmdstan-guide/log_prob_config.qmd
- cmdstan-guide/diagnose_config.qmd
- cmdstan-guide/parallelization.qmd
- section: "Tools and Utilities"
contents:
- cmdstan-guide/stanc.Rmd
- cmdstan-guide/stansummary.Rmd
- cmdstan-guide/diagnose_utility.Rmd
- cmdstan-guide/print.Rmd
- cmdstan-guide/stanc.qmd
- cmdstan-guide/stansummary.qmd
- cmdstan-guide/diagnose_utility.qmd
- cmdstan-guide/print.qmd
- section: "Appendices"
contents:
- cmdstan-guide/stan_csv_apdx.Rmd
- cmdstan-guide/json_apdx.Rmd
- cmdstan-guide/rdump_apdx.Rmd
- cmdstan-guide/external_code.Rmd
- cmdstan-guide/stan_csv_apdx.qmd
- cmdstan-guide/json_apdx.qmd
- cmdstan-guide/rdump_apdx.qmd
- cmdstan-guide/external_code.qmd

format:
html:
Expand Down
5 changes: 0 additions & 5 deletions src/before-chapter.R

This file was deleted.

Loading

0 comments on commit 18027a4

Please sign in to comment.