Skip to content

Commit

Permalink
Merge 5fb35e5 into 3539e80
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Jan 19, 2021
2 parents 3539e80 + 5fb35e5 commit a745ff6
Show file tree
Hide file tree
Showing 36 changed files with 2,349 additions and 646 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Added a builtin sandboxed header-only version of fmt. The namespace and directory paths were changed to `conduit_fmt` to avoid potential symbol collisions with other codes using fmt. Downstream software can use by including `conduit_fmt/conduit_fmt.h`.
- Added support for using C++11 initializer lists to set Node and DataArray values from numeric arrays. See C++ tutorial docs (https://llnl-conduit.readthedocs.io/en/latest/tutorial_cpp_numeric.html#c-11-initializer-lists) for more details.
- Added a Node::describe() method. This method creates a new node that mirrors the current Node, however each leaf is replaced by summary stats and a truncated display of the values. For use cases with large leaves, printing the describe() output Node is much more helpful for debugging and understanding vs wall of text from other to_string() methods.
- Added conduit::utils::format methods. These methods use fmt to format strings that include fmt style patterns. The formatting arguments are passed as a conduit::Node tree. The `args` case allows named arguments (args passed as object) or ordered args (args passed as list). The `maps` case also supports named or ordered args and works in conjunction with a `map_index`. The `map_index` is used to fetch a value from an array, or list of strings, which is then passed to fmt. The `maps` style of indexed indirection supports generating path strings for non-trivial domain partition mappings in Blueprint. This functionality is also available in Python, via the `conduit.utils.format` method.


#### Relay
Expand Down
2 changes: 2 additions & 0 deletions scripts/regen_docs_outputs.py
Expand Up @@ -9,6 +9,7 @@
"t_conduit_docs_tutorial_numeric",
"t_conduit_docs_tutorial_parse",
"t_conduit_docs_tutorial_ownership",
"t_conduit_docs_tutorial_utils",
"t_conduit_docs_tutorial_errors",
# bp
"t_conduit_docs_blueprint_demos",
Expand All @@ -21,6 +22,7 @@
"t_conduit_docs_tutorial_python_numeric",
"t_conduit_docs_tutorial_python_ownership",
"t_conduit_docs_tutorial_python_parse",
"t_conduit_docs_tutorial_python_utils",
"t_conduit_docs_tutorial_python_relay_io_handle_examples",
"t_conduit_docs_tutorial_python_relay_mpi_examples"]

Expand Down
14 changes: 7 additions & 7 deletions src/docs/sphinx/t_conduit_docs_blueprint_demos_out.txt
Expand Up @@ -31,7 +31,7 @@ fields:
END_EXAMPLE("blueprint_demo_basic_uniform")
[/g/g19/ciurej1/projects/conduit/src/tests/docs/t_conduit_docs_blueprint_demos.cpp : 67]
Testing Basic Example 'uniform'
[ OK ] conduit_docs.blueprint_demo_basic_uniform (8 ms)
[ OK ] conduit_docs.blueprint_demo_basic_uniform (11 ms)
[ RUN ] conduit_docs.blueprint_demo_basic_rectilinear
BEGIN_EXAMPLE("blueprint_demo_basic_rectilinear")

Expand All @@ -55,7 +55,7 @@ fields:
END_EXAMPLE("blueprint_demo_basic_rectilinear")
[/g/g19/ciurej1/projects/conduit/src/tests/docs/t_conduit_docs_blueprint_demos.cpp : 67]
Testing Basic Example 'rectilinear'
[ OK ] conduit_docs.blueprint_demo_basic_rectilinear (6 ms)
[ OK ] conduit_docs.blueprint_demo_basic_rectilinear (4 ms)
[ RUN ] conduit_docs.blueprint_demo_basic_structured
BEGIN_EXAMPLE("blueprint_demo_basic_structured")

Expand Down Expand Up @@ -83,7 +83,7 @@ fields:
END_EXAMPLE("blueprint_demo_basic_structured")
[/g/g19/ciurej1/projects/conduit/src/tests/docs/t_conduit_docs_blueprint_demos.cpp : 67]
Testing Basic Example 'structured'
[ OK ] conduit_docs.blueprint_demo_basic_structured (6 ms)
[ OK ] conduit_docs.blueprint_demo_basic_structured (7 ms)
[ RUN ] conduit_docs.blueprint_demo_basic_tris
BEGIN_EXAMPLE("blueprint_demo_basic_tris")

Expand Down Expand Up @@ -137,7 +137,7 @@ fields:
END_EXAMPLE("blueprint_demo_basic_quads")
[/g/g19/ciurej1/projects/conduit/src/tests/docs/t_conduit_docs_blueprint_demos.cpp : 67]
Testing Basic Example 'quads'
[ OK ] conduit_docs.blueprint_demo_basic_quads (6 ms)
[ OK ] conduit_docs.blueprint_demo_basic_quads (7 ms)
[ RUN ] conduit_docs.blueprint_demo_basic_tets
BEGIN_EXAMPLE("blueprint_demo_basic_tets")

Expand Down Expand Up @@ -288,9 +288,9 @@ fields:
values: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]

END_EXAMPLE("blueprint_demo_basic_uniform_complete")
[ OK ] conduit_docs.blueprint_demo_basic_uniform_complete (10 ms)
[----------] 10 tests from conduit_docs (71 ms total)
[ OK ] conduit_docs.blueprint_demo_basic_uniform_complete (7 ms)
[----------] 10 tests from conduit_docs (74 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 1 test suite ran. (71 ms total)
[==========] 10 tests from 1 test suite ran. (74 ms total)
[ PASSED ] 10 tests.
14 changes: 7 additions & 7 deletions src/docs/sphinx/t_conduit_docs_blueprint_examples_out.txt
Expand Up @@ -18,7 +18,7 @@ coords:
valid: "true"

END_EXAMPLE("blueprint_example_1")
[ OK ] conduit_docs.blueprint_example_1 (3 ms)
[ OK ] conduit_docs.blueprint_example_1 (2 ms)
[ RUN ] conduit_docs.blueprint_example_2
BEGIN_EXAMPLE("blueprint_example_2")
example 'separate' mcarray
Expand All @@ -29,15 +29,15 @@ z: [3.0, 3.0, 3.0, 3.0, 3.0]


mem_spaces:
0x7fb50a8001e0:
0x7f83a7404e10:
path: "x"
type: "allocated"
bytes: 40
0x7fb50a8002e0:
0x7f83a7404f10:
path: "y"
type: "allocated"
bytes: 40
0x7fb50a800440:
0x7f83a7405070:
path: "z"
type: "allocated"
bytes: 40
Expand Down Expand Up @@ -79,7 +79,7 @@ transformed to 'interleaved' mcarray
}

mem_spaces:
0x7fb509405db0:
0x7f83a7406b60:
path: ""
type: "allocated"
bytes: 120
Expand All @@ -90,8 +90,8 @@ total_strided_bytes: 312

END_EXAMPLE("blueprint_example_2")
[ OK ] conduit_docs.blueprint_example_2 (0 ms)
[----------] 2 tests from conduit_docs (4 ms total)
[----------] 2 tests from conduit_docs (2 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (4 ms total)
[==========] 2 tests from 1 test suite ran. (2 ms total)
[ PASSED ] 2 tests.
10 changes: 5 additions & 5 deletions src/docs/sphinx/t_conduit_docs_relay_io_generic_examples_out.txt
Expand Up @@ -21,7 +21,7 @@ a:
my_string: "value"

END_EXAMPLE("relay_io_example_1_json")
[ OK ] conduit_docs.relay_io_example_1_json (1 ms)
[ OK ] conduit_docs.relay_io_example_1_json (2 ms)
[ RUN ] conduit_docs.relay_io_example_1_hdf5
BEGIN_EXAMPLE("relay_io_example_1_hdf5")

Expand All @@ -41,7 +41,7 @@ a:
my_string: "value"

END_EXAMPLE("relay_io_example_1_hdf5")
[ OK ] conduit_docs.relay_io_example_1_hdf5 (33 ms)
[ OK ] conduit_docs.relay_io_example_1_hdf5 (31 ms)
[ RUN ] conduit_docs.relay_io_example_2_hdf5
BEGIN_EXAMPLE("relay_io_example_2_hdf5")

Expand Down Expand Up @@ -69,7 +69,7 @@ a:
new_data: 42.0

END_EXAMPLE("relay_io_example_2_hdf5")
[ OK ] conduit_docs.relay_io_example_2_hdf5 (3 ms)
[ OK ] conduit_docs.relay_io_example_2_hdf5 (4 ms)
[ RUN ] conduit_docs.relay_io_example_3_hdf5
BEGIN_EXAMPLE("relay_io_example_3_hdf5")

Expand Down Expand Up @@ -129,8 +129,8 @@ path:
my_data: 1.0

END_EXAMPLE("relay_io_example_5_hdf5")
[ OK ] conduit_docs.relay_io_example_5_hdf5 (1 ms)
[----------] 6 tests from conduit_docs (42 ms total)
[ OK ] conduit_docs.relay_io_example_5_hdf5 (2 ms)
[----------] 6 tests from conduit_docs (43 ms total)

[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (43 ms total)
Expand Down
10 changes: 5 additions & 5 deletions src/docs/sphinx/t_conduit_docs_relay_io_handle_examples_out.txt
Expand Up @@ -33,7 +33,7 @@ a:
c: 42.0

END_EXAMPLE("relay_io_handle_example_1")
[ OK ] conduit_docs.relay_io_handle_1 (9 ms)
[ OK ] conduit_docs.relay_io_handle_1 (5 ms)
[ RUN ] conduit_docs.relay_io_handle_sidre_1
BEGIN_EXAMPLE("relay_io_handle_example_sidre_1")

Expand All @@ -53,7 +53,7 @@ my_arrays:
b_v2: [2.0, 2.0, 2.0]

END_EXAMPLE("relay_io_handle_example_sidre_1")
[ OK ] conduit_docs.relay_io_handle_sidre_1 (9 ms)
[ OK ] conduit_docs.relay_io_handle_sidre_1 (7 ms)
[ RUN ] conduit_docs.relay_io_handle_sidre_2
BEGIN_EXAMPLE("relay_io_handle_example_sidre_2")

Expand Down Expand Up @@ -159,9 +159,9 @@ fields:
values: [1, 1, 1, 1]

END_EXAMPLE("relay_io_handle_example_sidre_2")
[ OK ] conduit_docs.relay_io_handle_sidre_2 (20 ms)
[----------] 3 tests from conduit_docs (38 ms total)
[ OK ] conduit_docs.relay_io_handle_sidre_2 (48 ms)
[----------] 3 tests from conduit_docs (60 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (38 ms total)
[==========] 3 tests from 1 test suite ran. (60 ms total)
[ PASSED ] 3 tests.
6 changes: 3 additions & 3 deletions src/docs/sphinx/t_conduit_docs_relay_io_hdf5_examples_out.txt
Expand Up @@ -81,9 +81,9 @@ chunking:

saving data to 'myoutput_chunked.hdf5'
END_EXAMPLE("relay_io_example_hdf5_interface_opts")
[ OK ] conduit_docs.relay_io_example_hdf5_interface_2 (6 ms)
[----------] 2 tests from conduit_docs (12 ms total)
[ OK ] conduit_docs.relay_io_example_hdf5_interface_2 (5 ms)
[----------] 2 tests from conduit_docs (11 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (12 ms total)
[==========] 2 tests from 1 test suite ran. (11 ms total)
[ PASSED ] 2 tests.
20 changes: 10 additions & 10 deletions src/docs/sphinx/t_conduit_docs_tutorial_basics_out.txt
Expand Up @@ -36,7 +36,7 @@ list_example:
- 4

END_EXAMPLE("basics_object_and_list")
[ OK ] conduit_tutorial.basics_object_and_list (1 ms)
[ OK ] conduit_tutorial.basics_object_and_list (0 ms)
[ RUN ] conduit_tutorial.basics_object_and_list_itr
BEGIN_EXAMPLE("basics_object_and_list_itr")

Expand All @@ -61,20 +61,20 @@ val3: 3.1415
3
4
END_EXAMPLE("basics_object_and_list_itr")
[ OK ] conduit_tutorial.basics_object_and_list_itr (1 ms)
[ OK ] conduit_tutorial.basics_object_and_list_itr (0 ms)
[ RUN ] conduit_tutorial.basics_mem_spaces
BEGIN_EXAMPLE("basics_mem_spaces")

mem_spaces:
0x7f7fee4006a0:
0x7fcad7c04c00:
path: "my"
type: "allocated"
bytes: 5
0x7f7fee401bc0:
0x7fcad7c04440:
path: "a/b/c"
type: "allocated"
bytes: 2
0x7f7fee401bb0:
0x7fcad7c04430:
path: "a/b/e"
type: "allocated"
bytes: 8
Expand All @@ -84,7 +84,7 @@ total_bytes_compact: 15
total_strided_bytes: 15

END_EXAMPLE("basics_mem_spaces")
[ OK ] conduit_tutorial.basics_mem_spaces (0 ms)
[ OK ] conduit_tutorial.basics_mem_spaces (1 ms)
[ RUN ] conduit_tutorial.basics_bw_style
BEGIN_EXAMPLE("basics_bw_style")

Expand All @@ -103,7 +103,7 @@ test: 100
, "value": 100}
}
END_EXAMPLE("basics_bw_style")
[ OK ] conduit_tutorial.basics_bw_style (1 ms)
[ OK ] conduit_tutorial.basics_bw_style (0 ms)
[ RUN ] conduit_tutorial.basics_bw_style_from_native
BEGIN_EXAMPLE("basics_bw_style_from_native")

Expand Down Expand Up @@ -185,7 +185,7 @@ my:


file: /Users/harrison37/Work/github/llnl/conduit/src/libs/conduit/conduit_node.cpp
line: 12913
line: 13050
message:
Cannot fetch non-existent child "data" from Node(my/important)

Expand All @@ -201,8 +201,8 @@ my:

END_EXAMPLE("basics_const_vs_non_const")
[ OK ] conduit_tutorial.basics_const_vs_non_const (1 ms)
[----------] 10 tests from conduit_tutorial (8 ms total)
[----------] 10 tests from conduit_tutorial (6 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 1 test suite ran. (8 ms total)
[==========] 10 tests from 1 test suite ran. (6 ms total)
[ PASSED ] 10 tests.
6 changes: 3 additions & 3 deletions src/docs/sphinx/t_conduit_docs_tutorial_numeric_out.txt
Expand Up @@ -53,7 +53,7 @@ vals[0] = 1000
vals[1] = 2000
vals[2] = 3000
vals[3] = 4000
[ OK ] conduit_tutorial.numeric_double_conversion (1 ms)
[ OK ] conduit_tutorial.numeric_double_conversion (0 ms)
[ RUN ] conduit_tutorial.numeric_double_conversion_end
END_EXAMPLE("numeric_double_conversion")
[ OK ] conduit_tutorial.numeric_double_conversion_end (0 ms)
Expand All @@ -65,8 +65,8 @@ BEGIN_EXAMPLE("numeric_cxx11_init")
[1.0, 2.0, 3.0]
END_EXAMPLE("numeric_cxx11_init")
[ OK ] conduit_tutorial.numeric_cxx11_init (0 ms)
[----------] 9 tests from conduit_tutorial (2 ms total)
[----------] 9 tests from conduit_tutorial (1 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test suite ran. (2 ms total)
[==========] 9 tests from 1 test suite ran. (1 ms total)
[ PASSED ] 9 tests.
6 changes: 3 additions & 3 deletions src/docs/sphinx/t_conduit_docs_tutorial_ownership_out.txt
Expand Up @@ -6,11 +6,11 @@ Running main() from /Users/harrison37/Work/github/llnl/conduit/src/blt/thirdpart
BEGIN_EXAMPLE("mem_ownership_external")

mem_spaces:
0x7fcce4c04b70:
0x7f9779501180:
path: "v_owned"
type: "allocated"
bytes: 40
0x7fcce4c047b0:
0x7f9779500dc0:
path: "v_external"
type: "external"
total_bytes_allocated: 40
Expand All @@ -31,5 +31,5 @@ END_EXAMPLE("mem_ownership_external")
[----------] 1 test from conduit_tutorial (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[==========] 1 test from 1 test suite ran. (1 ms total)
[ PASSED ] 1 test.

0 comments on commit a745ff6

Please sign in to comment.