Skip to content

Commit

Permalink
0.9.2 final release prep (#1164)
Browse files Browse the repository at this point in the history
* update docker jupyter setup recipe

* widget api update and workaround for missing/broken tab style

* changelog and full imp of new info

* c and fortran api adjustments

* docs updates
  • Loading branch information
cyrush authored Jun 30, 2023
1 parent c16d0c0 commit b842516
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 21 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Notable changes to Ascent are documented in this file. This changelog started on
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project aspires to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.2] - Released 2023-06-23
## [0.9.2] - Released 2023-06-30
### Preferred dependency versions for [email protected]
- [email protected]
- [email protected]
Expand All @@ -13,6 +13,7 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
- Automatic camera placement render that uses different types of entropy (data, depth, shading).
- Scene/Render option to manually position color bars
- Added in-memory conduit extract, which allows mesh data to be accessed via ascent.info()
- Added examples that demonstrate how to use Ascent via the Catalyst Conduit Interface.

### Changed
- Updated Ascent to use VTK-m 2.0
Expand Down
2 changes: 2 additions & 0 deletions src/docs/sphinx/Releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ Added
* Automatic camera placement render that uses different types of entropy (data, depth, shading).
* Scene/Render option to manually position color bars
* Added in-memory conduit extract, which allows mesh data to be accessed via ascent.info()
* Added examples that demonstrate how to use Ascent via the Catalyst Conduit Interface.

Changed
~~~~~~~

* Updated Ascent to use VTK-m 2.0
* Added C++ ``Ascent::info()`` method that returns a reference to execution info in addition the existing info() method that provides copy out semantics.


v0.9.1
---------------------------------

Expand Down
5 changes: 1 addition & 4 deletions src/examples/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,14 @@ RUN /uberenv_libs/spack/opt/spack/*/*/python*/bin/pip \
bash_kernel \
jupyter \
jupyterlab \
ipywidgets \
matplotlib \
pyyaml \
cinemasci \
scipy \
scikit-learn \
ipympl

# finish jupyter lab setup
RUN /uberenv_libs/spack/opt/spack/*/*/python*/bin/jupyter \
labextension install @jupyter-widgets/jupyterlab-manager

# configure a debug build with cmake
RUN cd /ascent && mkdir build
RUN cd /ascent/build && \
Expand Down
2 changes: 2 additions & 0 deletions src/libs/ascent/c/ascent.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ void ASCENT_API ascent_execute(Ascent *c_ascent, conduit_node *actions);

void ASCENT_API ascent_info(Ascent *c_ascent, conduit_node *result);

conduit_node ASCENT_API *ascent_info_ref(Ascent *c_ascent);

void ASCENT_API ascent_close(Ascent *c_ascent);

void ASCENT_API ascent_timer_start(char *name);
Expand Down
8 changes: 8 additions & 0 deletions src/libs/ascent/c/ascent_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ ascent_info(Ascent *c_ascent,
v->info(n);
}

//---------------------------------------------------------------------------//
conduit_node *
ascent_info_ref(Ascent *c_ascent)
{
ascent::Ascent *v = cpp_ascent(c_ascent);
return conduit::c_node(&v->info());
}

//---------------------------------------------------------------------------//
void
ascent_close(Ascent *c_ascent)
Expand Down
9 changes: 9 additions & 0 deletions src/libs/ascent/fortran/ascent_fortran.f90
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ subroutine ascent_info(cascent, cnode) &
type(C_PTR), value, intent(IN) ::cnode
end subroutine ascent_info

!--------------------------------------------------------------------------
function ascent_info_ref(cascent) result(cnode) &
bind(C, name="ascent_info_ref")
use iso_c_binding
implicit none
type(C_PTR), value, intent(IN) ::cascent
type(C_PTR) :: cnode
end function ascent_info_ref

!--------------------------------------------------------------------------
subroutine ascent_close(cascent) &
bind(C, name="ascent_close")
Expand Down
30 changes: 17 additions & 13 deletions src/libs/ascent/python/ascent_module/ascent_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,27 +410,32 @@ PyAscent_Ascent_info(PyAscent_Ascent *self,

if (!PyArg_ParseTupleAndKeywords(args,
kwargs,
"O",
"|O",
const_cast<char**>(kwlist),
&py_node))
{
return NULL;
}


if(!PyConduit_Node_Check(py_node))
{
PyErr_SetString(PyExc_TypeError,
"Ascent::Info 'out' argument must be a "
"conduit::Node");
return NULL;
}

Node *node = PyConduit_Node_Get_Node_Ptr(py_node);

try
{
if(py_node != NULL) // copy out case
{
if(!PyConduit_Node_Check(py_node))
{
PyErr_SetString(PyExc_TypeError,
"Ascent::Info 'out' argument must be a "
"conduit::Node");
return NULL;
}

Node *node = PyConduit_Node_Get_Node_Ptr(py_node);
self->ascent->info(*node);
}
else // return wrapped internal info ref case
{
return PyConduit_Node_Python_Wrap(&self->ascent->info(),0);
}
}
catch(conduit::Error e)
{
Expand All @@ -450,7 +455,6 @@ PyAscent_Ascent_info(PyAscent_Ascent *self,
return NULL;
}


Py_RETURN_NONE;
}

Expand Down
6 changes: 3 additions & 3 deletions src/libs/ascent/python/ascent_module/py_src/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ def __init__(self, info):
tab = ipywidgets.Tab()
tab.children = widgets
for i,v in enumerate(widget_titles):
tab.set_title(i,v)
tab.set_title(i,"[ " + v + " ] ")
self.main = ipywidgets.VBox([tab,
status.show()],
layout=ipywidgets.Layout(overflow_x="hidden"))
layout=ipywidgets.Layout(overflow="hidden"))
else:
# only the status button
self.main = ipywidgets.VBox([status.show()],
layout=ipywidgets.Layout(overflow_x="hidden"))
layout=ipywidgets.Layout(overflow="hidden"))

def show(self):
return self.main
Expand Down

0 comments on commit b842516

Please sign in to comment.