Skip to content

Commit

Permalink
Update docusaurus website and examples
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Stein <steinlink@gmail.com>
  • Loading branch information
texodus committed Aug 15, 2024
1 parent c8a6e93 commit 016e68f
Show file tree
Hide file tree
Showing 36 changed files with 399 additions and 1,102 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,9 @@ jobs:
with:
name: perspective-python-dist-x86_64-ubuntu-22.04-3.9

# - uses: actions/download-artifact@v4
# with:
# name: perspective-python-sdist
- uses: actions/download-artifact@v4
with:
name: perspective-python-sdist

- uses: actions/download-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ py_modules/
ts-rs/
rust/perspective-python/perspective/labextension/
rust/perspective-python/perspective.data/
rust/perspective-python/*/data
6 changes: 2 additions & 4 deletions cpp/perspective/src/cpp/gnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,11 @@ t_gnode::calc_transition(

if (!row_pre_existed && !cur_valid && !t_env::backout_invalid_neq_ft()) {
trans = VALUE_TRANSITION_NEQ_FT;
} else if (row_pre_existed && !prev_valid && !cur_valid
&& !t_env::backout_eq_invalid_invalid()) {
} else if (row_pre_existed && !prev_valid && !cur_valid && !t_env::backout_eq_invalid_invalid()) {
trans = VALUE_TRANSITION_EQ_TT;
} else if (!prev_existed && !exists) {
trans = VALUE_TRANSITION_EQ_FF;
} else if (row_pre_existed && exists && !prev_valid && cur_valid
&& !t_env::backout_nveq_ft()) {
} else if (row_pre_existed && exists && !prev_valid && cur_valid && !t_env::backout_nveq_ft()) {
trans = VALUE_TRANSITION_NVEQ_FT;
} else if (prev_existed && exists && prev_cur_eq) {
trans = VALUE_TRANSITION_EQ_TT;
Expand Down
2 changes: 1 addition & 1 deletion cpp/perspective/src/cpp/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ parse_format_options(
viewport.has_end_row()
? viewport.end_row()
: (viewport_height != 0 ? out.start_row + viewport_height : max_rows
)
)
);
out.end_col = std::min(
max_cols,
Expand Down
3 changes: 1 addition & 2 deletions cpp/perspective/src/cpp/sparse_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2259,8 +2259,7 @@ t_stree::get_aggregates_for_sorting(
auto which_agg = agg_indices[idx];
if (which_agg < 0) {
aggregates[idx] = get_sortby_value(nidx);
} else if ((ctx2 != nullptr)
|| (size_t(which_agg) >= m_aggcols.size())) {
} else if ((ctx2 != nullptr) || (size_t(which_agg) >= m_aggcols.size())) {
aggregates[idx].set(t_none());
if (ctx2 != nullptr) {
if ((ctx2->get_config().get_totals() == TOTALS_BEFORE)
Expand Down
13 changes: 4 additions & 9 deletions cpp/perspective/src/cpp/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,7 @@ PROMOTE_IMPL(DTYPE_INT32, DTYPE_INT64, DTYPE_INT64)
template <typename A>
static A
json_into(const rapidjson::Value& value) {
if constexpr (std::is_same_v<A, std::int32_t>
|| std::is_same_v<A, std::int64_t>
|| std::is_same_v<A, double>) {
if constexpr (std::is_same_v<A, std::int32_t> || std::is_same_v<A, std::int64_t> || std::is_same_v<A, double>) {
if (value.IsInt()) {
return value.GetInt();
}
Expand All @@ -542,8 +540,7 @@ json_into(const rapidjson::Value& value) {
return std::atoi(value.GetString());
} else if constexpr (std::is_same_v<A, std::int64_t>) {
return std::atoll(value.GetString());
} else if constexpr (std::is_same_v<A, double>
|| std::is_same_v<A, float>) {
} else if constexpr (std::is_same_v<A, double> || std::is_same_v<A, float>) {
return std::atof(value.GetString());
} else {
static_assert(!std::is_same_v<A, A>, "No coercion for type");
Expand Down Expand Up @@ -765,11 +762,9 @@ fill_column_json(
case t_dtype::DTYPE_BOOL: {
if (value.IsBool()) [[likely]] {
col->set_nth<bool>(i, value.GetBool());
} else if (value.IsString()
&& istrequals(value.GetString(), "true")) {
} else if (value.IsString() && istrequals(value.GetString(), "true")) {
col->set_nth<bool>(i, true);
} else if (value.IsString()
&& istrequals(value.GetString(), "false")) {
} else if (value.IsString() && istrequals(value.GetString(), "false")) {
col->set_nth<bool>(i, false);
} else if (value.IsInt()) {
col->set_nth<bool>(i, value.GetInt() != 0);
Expand Down
3 changes: 1 addition & 2 deletions cpp/perspective/src/cpp/view_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ t_view_config::fill_aggspecs(const std::shared_ptr<t_schema>& schema) {
if (is_column_only) {
// Always sort by `ANY` in column only views
agg_type = t_aggtype::AGGTYPE_ANY;
} else if ((is_row_pivot && is_row_sort)
|| (is_column_pivot && !is_row_sort)) {
} else if ((is_row_pivot && is_row_sort) || (is_column_pivot && !is_row_sort)) {
// Otherwise if the hidden column is in pivot on the same axis,
// use `UNIQUE`
agg_type = t_aggtype::AGGTYPE_UNIQUE;
Expand Down
4 changes: 2 additions & 2 deletions cpp/perspective/src/include/perspective/exprtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace details {
// #endif

} // end namespace details
} // end namespace numeric
} // end namespace numeric

inline bool is_true(const t_tscalar& v);

Expand Down Expand Up @@ -1219,7 +1219,7 @@ namespace details {
}

} // end namespace details
} // end namespace numeric
} // end namespace numeric

/**
* Override the comparison operators to return a `t_tscalar` of DTYPE_BOOL
Expand Down
Loading

0 comments on commit 016e68f

Please sign in to comment.