-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
772 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ screenshot*.png | |
web_demo | ||
|
||
.nox/ | ||
out.rrd | ||
*.rrd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
# Setup builds for examples | ||
file(GLOB sources_list true ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) | ||
|
||
add_custom_target(doc_examples) | ||
|
||
foreach(SOURCE_PATH ${sources_list}) | ||
get_filename_component(SOURCE_NAME ${SOURCE_PATH} NAME_WLE) | ||
|
||
if(${SOURCE_NAME} STREQUAL "CMakeFiles") | ||
CONTINUE() | ||
endif() | ||
|
||
set(EXAMPLE_TARGET doc_example_${SOURCE_NAME}) | ||
|
||
add_executable(${EXAMPLE_TARGET} ${SOURCE_PATH}) | ||
|
||
set_default_warning_settings(rerun_example) | ||
target_link_libraries(${EXAMPLE_TARGET} PRIVATE rerun_sdk) | ||
|
||
add_dependencies(doc_examples ${EXAMPLE_TARGET}) | ||
endforeach() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# API Examples | ||
|
||
These examples showcase common usage of each individual Rerun `Archetype`s. | ||
|
||
Most of these example are automatically used as docstrings for the `Archetype` | ||
APIs in their respective SDKs. | ||
|
||
## Usage | ||
|
||
You can run each example individually using the following: | ||
|
||
- **Python**: `python <example_name>.py`, e.g. `python point3d_random.py`. | ||
- **Rust**: `cargo r -p code_examples --bin <example_name`, e.g. | ||
`cargo r -p code_examples --bin point3d_random`. | ||
- **C++**: | ||
- `./docs/code-examples/build_all_doc_examples.sh` to compile all examples | ||
- start a Rerun Viewer listening on the default port: `rerun` | ||
- `./build/docs/code-examples/doc_example_<example_name>` to run, e.g. | ||
`./build/docs/code-examples/doc_example_point3d_random` | ||
|
||
## Roundtrips | ||
|
||
All API examples support cross-language roundtrip tests. | ||
|
||
These tests check that A) all of our SDKs yield the exact same data when used | ||
the same way and B) act as regression tests, relying on the fact that it is | ||
extremely unlikely that all supported languages break in the exact same way at | ||
the exact same time. | ||
|
||
See `./docs/code-examples/roundtrips.py --help`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.