-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve developer documentation and experience #184
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
Developer Information | ||
===================== | ||
|
||
The following information is intended for developers who wish to modify the | ||
code. | ||
|
||
The pages on :doc:`testing` and :doc:`documentation` are also relevant. | ||
|
||
Building BridgeStan | ||
------------------- | ||
|
||
Developers should follow the instructions in :doc:`../getting-started` to ensure | ||
they have the minimal C++ build tools required for working with BridgeStan. | ||
|
||
C++ | ||
--- | ||
|
||
* We use the C++1y standard for compilation (``-std=c++1y`` in both clang and gcc). This is partway between C++11 and C++14, and is what Stan requires. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of R 4.3, they support C++17. It rolled out earlier this year with a late 4.2.x. See https://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2023/01/27#n2023-01-27 I don't know if Python is a blocker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because we don't rely on any specific C++ ABI, we could use any C++ standard we like for this project. This comment is just there because it's what our makefiles pass and what the rest of Stan uses |
||
|
||
* We try to write standards-compliant code that does not depend on features of specific platforms (except where needed for compatibility). | ||
Specifically, we do not use OS-dependent or compiler-dependent C++. | ||
Our C++ code does not depend on the ``R.h`` or ``Python.h`` headers, for example. | ||
On the other hand, adding new signatures to work with a specific language's style of foreign function interface is permitted | ||
(an example can be found in the :ref:`R compatibility functions <R-compat>`, which requires a particular pointer-based style). | ||
|
||
* We try to follow the `Google C++ Style Guide <https://google.github.io/styleguide/cppguide.html>`_, but (a) we allow C++ exceptions, and (b) we allow reference arguments. | ||
bob-carpenter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* We recommend using `Clang format <https://clang.llvm.org/docs/ClangFormat.html>`_ with our config file `.clang-format <https://github.com/roualdes/bridgestan/blob/main/.clang-format>`_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line's too long. I think it's OK to wrap even with bullets. |
||
|
||
Python | ||
------ | ||
|
||
* Python dependencies: | ||
* `NumPy <https://numpy.org/>`_ | ||
|
||
* We autoformat code with `black <https://black.readthedocs.io/en/stable/>`_. | ||
|
||
Julia | ||
----- | ||
|
||
* Julia dependencies: | ||
* `LazyArtifacts <https://docs.julialang.org/en/v1/stdlib/LazyArtifacts/>`_ | ||
|
||
* Julia code is formatted using `JuliaFormatter <https://github.com/domluna/JuliaFormatter.jl>`_. | ||
|
||
R | ||
- | ||
|
||
* R dependencies: | ||
* `R6 <https://cran.r-project.org/web/packages/R6/index.html>`_ | ||
|
||
Rust | ||
---- | ||
|
||
* Rust development is based on :command:`cargo`, which should handle dependencies and formatting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
houses -> contains OR supplies OR provides, because there's no housing, so it's distracting.