From 2903b5f025188ec2d5aa97abc19eea831a0be3b1 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Apr 2026 09:46:10 -0500 Subject: [PATCH 01/20] refactor to match proposed dir structure --- {include => cpp/include}/wtf/buffer/buffer.hpp | 0 {include => cpp/include}/wtf/buffer/buffer_view.hpp | 0 {include => cpp/include}/wtf/buffer/detail_/buffer_holder.hpp | 0 .../include}/wtf/buffer/detail_/buffer_view_holder.hpp | 0 {include => cpp/include}/wtf/buffer/detail_/contiguous_model.hpp | 0 .../include}/wtf/buffer/detail_/contiguous_view_model.hpp | 0 {include => cpp/include}/wtf/buffer/float_buffer.hpp | 0 {include => cpp/include}/wtf/concepts/concepts.hpp | 0 {include => cpp/include}/wtf/concepts/float_buffer.hpp | 0 {include => cpp/include}/wtf/concepts/floating_point.hpp | 0 {include => cpp/include}/wtf/concepts/iterator.hpp | 0 {include => cpp/include}/wtf/concepts/modifiers.hpp | 0 {include => cpp/include}/wtf/concepts/stream_insertion.hpp | 0 {include => cpp/include}/wtf/concepts/wtf_float.hpp | 0 {include => cpp/include}/wtf/detail_/dispatcher.hpp | 0 {include => cpp/include}/wtf/detail_/downcaster.hpp | 0 {include => cpp/include}/wtf/detail_/variant_from_tuple.hpp | 0 {include => cpp/include}/wtf/forward.hpp | 0 {include => cpp/include}/wtf/fp/detail_/float_holder.hpp | 0 {include => cpp/include}/wtf/fp/detail_/float_model.hpp | 0 {include => cpp/include}/wtf/fp/detail_/float_view_holder.hpp | 0 {include => cpp/include}/wtf/fp/detail_/float_view_model.hpp | 0 {include => cpp/include}/wtf/fp/float.hpp | 0 {include => cpp/include}/wtf/fp/float_base.hpp | 0 {include => cpp/include}/wtf/fp/float_view.hpp | 0 {include => cpp/include}/wtf/fp/fp.hpp | 0 {include => cpp/include}/wtf/rtti/detail_/type_holder.hpp | 0 {include => cpp/include}/wtf/rtti/detail_/type_model.hpp | 0 {include => cpp/include}/wtf/rtti/rtti.hpp | 0 {include => cpp/include}/wtf/rtti/type_info.hpp | 0 {include => cpp/include}/wtf/type_traits/float_traits.hpp | 0 {include => cpp/include}/wtf/type_traits/is_convertible.hpp | 0 {include => cpp/include}/wtf/type_traits/is_floating_point.hpp | 0 {include => cpp/include}/wtf/type_traits/precision.hpp | 0 {include => cpp/include}/wtf/type_traits/tuple_append.hpp | 0 {include => cpp/include}/wtf/type_traits/type_name.hpp | 0 {include => cpp/include}/wtf/type_traits/type_traits.hpp | 0 {include => cpp/include}/wtf/types.hpp | 0 {include => cpp/include}/wtf/warnings.hpp | 0 {include => cpp/include}/wtf/wtf.hpp | 0 {src => cpp/src}/wtf/fp/detail_/float_holder.cpp | 0 {src => cpp/src}/wtf/fp/float.cpp | 0 {src => cpp/src}/wtf/rtti/detail_/type_holder.cpp | 0 {src => cpp/src}/wtf/rtti/type_info.cpp | 0 tests/{ => cpp}/test_wtf.hpp | 0 tests/{ => cpp}/unit_tests/wtf/buffer/buffer_view.cpp | 0 tests/{ => cpp}/unit_tests/wtf/buffer/detail_/buffer_holder.cpp | 0 .../unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp | 0 .../{ => cpp}/unit_tests/wtf/buffer/detail_/contiguous_model.cpp | 0 .../unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp | 0 tests/{ => cpp}/unit_tests/wtf/buffer/float_buffer.cpp | 0 tests/{ => cpp}/unit_tests/wtf/concepts/floating_point.cpp | 0 tests/{ => cpp}/unit_tests/wtf/concepts/iterator.cpp | 0 tests/{ => cpp}/unit_tests/wtf/concepts/modifiers.cpp | 0 tests/{ => cpp}/unit_tests/wtf/concepts/stream_insertion.cpp | 0 tests/{ => cpp}/unit_tests/wtf/concepts/wtf_float.cpp | 0 tests/{ => cpp}/unit_tests/wtf/detail_/dispatcher.cpp | 0 tests/{ => cpp}/unit_tests/wtf/detail_/downcaster.cpp | 0 tests/{ => cpp}/unit_tests/wtf/detail_/variant_from_tuple.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_holder.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_model.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_view_holder.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_view_model.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/float.cpp | 0 tests/{ => cpp}/unit_tests/wtf/fp/float_view.cpp | 0 tests/{ => cpp}/unit_tests/wtf/main.cpp | 0 tests/{ => cpp}/unit_tests/wtf/rtti/detail_/type_holder.cpp | 0 tests/{ => cpp}/unit_tests/wtf/rtti/detail_/type_model.cpp | 0 tests/{ => cpp}/unit_tests/wtf/rtti/type_info.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/float_traits.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/is_convertible.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/is_floating_point.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/precision.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/tupple_append.cpp | 0 tests/{ => cpp}/unit_tests/wtf/type_traits/type_name.cpp | 0 75 files changed, 0 insertions(+), 0 deletions(-) rename {include => cpp/include}/wtf/buffer/buffer.hpp (100%) rename {include => cpp/include}/wtf/buffer/buffer_view.hpp (100%) rename {include => cpp/include}/wtf/buffer/detail_/buffer_holder.hpp (100%) rename {include => cpp/include}/wtf/buffer/detail_/buffer_view_holder.hpp (100%) rename {include => cpp/include}/wtf/buffer/detail_/contiguous_model.hpp (100%) rename {include => cpp/include}/wtf/buffer/detail_/contiguous_view_model.hpp (100%) rename {include => cpp/include}/wtf/buffer/float_buffer.hpp (100%) rename {include => cpp/include}/wtf/concepts/concepts.hpp (100%) rename {include => cpp/include}/wtf/concepts/float_buffer.hpp (100%) rename {include => cpp/include}/wtf/concepts/floating_point.hpp (100%) rename {include => cpp/include}/wtf/concepts/iterator.hpp (100%) rename {include => cpp/include}/wtf/concepts/modifiers.hpp (100%) rename {include => cpp/include}/wtf/concepts/stream_insertion.hpp (100%) rename {include => cpp/include}/wtf/concepts/wtf_float.hpp (100%) rename {include => cpp/include}/wtf/detail_/dispatcher.hpp (100%) rename {include => cpp/include}/wtf/detail_/downcaster.hpp (100%) rename {include => cpp/include}/wtf/detail_/variant_from_tuple.hpp (100%) rename {include => cpp/include}/wtf/forward.hpp (100%) rename {include => cpp/include}/wtf/fp/detail_/float_holder.hpp (100%) rename {include => cpp/include}/wtf/fp/detail_/float_model.hpp (100%) rename {include => cpp/include}/wtf/fp/detail_/float_view_holder.hpp (100%) rename {include => cpp/include}/wtf/fp/detail_/float_view_model.hpp (100%) rename {include => cpp/include}/wtf/fp/float.hpp (100%) rename {include => cpp/include}/wtf/fp/float_base.hpp (100%) rename {include => cpp/include}/wtf/fp/float_view.hpp (100%) rename {include => cpp/include}/wtf/fp/fp.hpp (100%) rename {include => cpp/include}/wtf/rtti/detail_/type_holder.hpp (100%) rename {include => cpp/include}/wtf/rtti/detail_/type_model.hpp (100%) rename {include => cpp/include}/wtf/rtti/rtti.hpp (100%) rename {include => cpp/include}/wtf/rtti/type_info.hpp (100%) rename {include => cpp/include}/wtf/type_traits/float_traits.hpp (100%) rename {include => cpp/include}/wtf/type_traits/is_convertible.hpp (100%) rename {include => cpp/include}/wtf/type_traits/is_floating_point.hpp (100%) rename {include => cpp/include}/wtf/type_traits/precision.hpp (100%) rename {include => cpp/include}/wtf/type_traits/tuple_append.hpp (100%) rename {include => cpp/include}/wtf/type_traits/type_name.hpp (100%) rename {include => cpp/include}/wtf/type_traits/type_traits.hpp (100%) rename {include => cpp/include}/wtf/types.hpp (100%) rename {include => cpp/include}/wtf/warnings.hpp (100%) rename {include => cpp/include}/wtf/wtf.hpp (100%) rename {src => cpp/src}/wtf/fp/detail_/float_holder.cpp (100%) rename {src => cpp/src}/wtf/fp/float.cpp (100%) rename {src => cpp/src}/wtf/rtti/detail_/type_holder.cpp (100%) rename {src => cpp/src}/wtf/rtti/type_info.cpp (100%) rename tests/{ => cpp}/test_wtf.hpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/buffer_view.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/detail_/buffer_holder.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/detail_/contiguous_model.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/buffer/float_buffer.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/concepts/floating_point.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/concepts/iterator.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/concepts/modifiers.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/concepts/stream_insertion.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/concepts/wtf_float.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/detail_/dispatcher.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/detail_/downcaster.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/detail_/variant_from_tuple.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_holder.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_model.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_view_holder.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/detail_/float_view_model.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/float.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/fp/float_view.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/main.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/rtti/detail_/type_holder.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/rtti/detail_/type_model.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/rtti/type_info.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/float_traits.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/is_convertible.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/is_floating_point.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/precision.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/tupple_append.cpp (100%) rename tests/{ => cpp}/unit_tests/wtf/type_traits/type_name.cpp (100%) diff --git a/include/wtf/buffer/buffer.hpp b/cpp/include/wtf/buffer/buffer.hpp similarity index 100% rename from include/wtf/buffer/buffer.hpp rename to cpp/include/wtf/buffer/buffer.hpp diff --git a/include/wtf/buffer/buffer_view.hpp b/cpp/include/wtf/buffer/buffer_view.hpp similarity index 100% rename from include/wtf/buffer/buffer_view.hpp rename to cpp/include/wtf/buffer/buffer_view.hpp diff --git a/include/wtf/buffer/detail_/buffer_holder.hpp b/cpp/include/wtf/buffer/detail_/buffer_holder.hpp similarity index 100% rename from include/wtf/buffer/detail_/buffer_holder.hpp rename to cpp/include/wtf/buffer/detail_/buffer_holder.hpp diff --git a/include/wtf/buffer/detail_/buffer_view_holder.hpp b/cpp/include/wtf/buffer/detail_/buffer_view_holder.hpp similarity index 100% rename from include/wtf/buffer/detail_/buffer_view_holder.hpp rename to cpp/include/wtf/buffer/detail_/buffer_view_holder.hpp diff --git a/include/wtf/buffer/detail_/contiguous_model.hpp b/cpp/include/wtf/buffer/detail_/contiguous_model.hpp similarity index 100% rename from include/wtf/buffer/detail_/contiguous_model.hpp rename to cpp/include/wtf/buffer/detail_/contiguous_model.hpp diff --git a/include/wtf/buffer/detail_/contiguous_view_model.hpp b/cpp/include/wtf/buffer/detail_/contiguous_view_model.hpp similarity index 100% rename from include/wtf/buffer/detail_/contiguous_view_model.hpp rename to cpp/include/wtf/buffer/detail_/contiguous_view_model.hpp diff --git a/include/wtf/buffer/float_buffer.hpp b/cpp/include/wtf/buffer/float_buffer.hpp similarity index 100% rename from include/wtf/buffer/float_buffer.hpp rename to cpp/include/wtf/buffer/float_buffer.hpp diff --git a/include/wtf/concepts/concepts.hpp b/cpp/include/wtf/concepts/concepts.hpp similarity index 100% rename from include/wtf/concepts/concepts.hpp rename to cpp/include/wtf/concepts/concepts.hpp diff --git a/include/wtf/concepts/float_buffer.hpp b/cpp/include/wtf/concepts/float_buffer.hpp similarity index 100% rename from include/wtf/concepts/float_buffer.hpp rename to cpp/include/wtf/concepts/float_buffer.hpp diff --git a/include/wtf/concepts/floating_point.hpp b/cpp/include/wtf/concepts/floating_point.hpp similarity index 100% rename from include/wtf/concepts/floating_point.hpp rename to cpp/include/wtf/concepts/floating_point.hpp diff --git a/include/wtf/concepts/iterator.hpp b/cpp/include/wtf/concepts/iterator.hpp similarity index 100% rename from include/wtf/concepts/iterator.hpp rename to cpp/include/wtf/concepts/iterator.hpp diff --git a/include/wtf/concepts/modifiers.hpp b/cpp/include/wtf/concepts/modifiers.hpp similarity index 100% rename from include/wtf/concepts/modifiers.hpp rename to cpp/include/wtf/concepts/modifiers.hpp diff --git a/include/wtf/concepts/stream_insertion.hpp b/cpp/include/wtf/concepts/stream_insertion.hpp similarity index 100% rename from include/wtf/concepts/stream_insertion.hpp rename to cpp/include/wtf/concepts/stream_insertion.hpp diff --git a/include/wtf/concepts/wtf_float.hpp b/cpp/include/wtf/concepts/wtf_float.hpp similarity index 100% rename from include/wtf/concepts/wtf_float.hpp rename to cpp/include/wtf/concepts/wtf_float.hpp diff --git a/include/wtf/detail_/dispatcher.hpp b/cpp/include/wtf/detail_/dispatcher.hpp similarity index 100% rename from include/wtf/detail_/dispatcher.hpp rename to cpp/include/wtf/detail_/dispatcher.hpp diff --git a/include/wtf/detail_/downcaster.hpp b/cpp/include/wtf/detail_/downcaster.hpp similarity index 100% rename from include/wtf/detail_/downcaster.hpp rename to cpp/include/wtf/detail_/downcaster.hpp diff --git a/include/wtf/detail_/variant_from_tuple.hpp b/cpp/include/wtf/detail_/variant_from_tuple.hpp similarity index 100% rename from include/wtf/detail_/variant_from_tuple.hpp rename to cpp/include/wtf/detail_/variant_from_tuple.hpp diff --git a/include/wtf/forward.hpp b/cpp/include/wtf/forward.hpp similarity index 100% rename from include/wtf/forward.hpp rename to cpp/include/wtf/forward.hpp diff --git a/include/wtf/fp/detail_/float_holder.hpp b/cpp/include/wtf/fp/detail_/float_holder.hpp similarity index 100% rename from include/wtf/fp/detail_/float_holder.hpp rename to cpp/include/wtf/fp/detail_/float_holder.hpp diff --git a/include/wtf/fp/detail_/float_model.hpp b/cpp/include/wtf/fp/detail_/float_model.hpp similarity index 100% rename from include/wtf/fp/detail_/float_model.hpp rename to cpp/include/wtf/fp/detail_/float_model.hpp diff --git a/include/wtf/fp/detail_/float_view_holder.hpp b/cpp/include/wtf/fp/detail_/float_view_holder.hpp similarity index 100% rename from include/wtf/fp/detail_/float_view_holder.hpp rename to cpp/include/wtf/fp/detail_/float_view_holder.hpp diff --git a/include/wtf/fp/detail_/float_view_model.hpp b/cpp/include/wtf/fp/detail_/float_view_model.hpp similarity index 100% rename from include/wtf/fp/detail_/float_view_model.hpp rename to cpp/include/wtf/fp/detail_/float_view_model.hpp diff --git a/include/wtf/fp/float.hpp b/cpp/include/wtf/fp/float.hpp similarity index 100% rename from include/wtf/fp/float.hpp rename to cpp/include/wtf/fp/float.hpp diff --git a/include/wtf/fp/float_base.hpp b/cpp/include/wtf/fp/float_base.hpp similarity index 100% rename from include/wtf/fp/float_base.hpp rename to cpp/include/wtf/fp/float_base.hpp diff --git a/include/wtf/fp/float_view.hpp b/cpp/include/wtf/fp/float_view.hpp similarity index 100% rename from include/wtf/fp/float_view.hpp rename to cpp/include/wtf/fp/float_view.hpp diff --git a/include/wtf/fp/fp.hpp b/cpp/include/wtf/fp/fp.hpp similarity index 100% rename from include/wtf/fp/fp.hpp rename to cpp/include/wtf/fp/fp.hpp diff --git a/include/wtf/rtti/detail_/type_holder.hpp b/cpp/include/wtf/rtti/detail_/type_holder.hpp similarity index 100% rename from include/wtf/rtti/detail_/type_holder.hpp rename to cpp/include/wtf/rtti/detail_/type_holder.hpp diff --git a/include/wtf/rtti/detail_/type_model.hpp b/cpp/include/wtf/rtti/detail_/type_model.hpp similarity index 100% rename from include/wtf/rtti/detail_/type_model.hpp rename to cpp/include/wtf/rtti/detail_/type_model.hpp diff --git a/include/wtf/rtti/rtti.hpp b/cpp/include/wtf/rtti/rtti.hpp similarity index 100% rename from include/wtf/rtti/rtti.hpp rename to cpp/include/wtf/rtti/rtti.hpp diff --git a/include/wtf/rtti/type_info.hpp b/cpp/include/wtf/rtti/type_info.hpp similarity index 100% rename from include/wtf/rtti/type_info.hpp rename to cpp/include/wtf/rtti/type_info.hpp diff --git a/include/wtf/type_traits/float_traits.hpp b/cpp/include/wtf/type_traits/float_traits.hpp similarity index 100% rename from include/wtf/type_traits/float_traits.hpp rename to cpp/include/wtf/type_traits/float_traits.hpp diff --git a/include/wtf/type_traits/is_convertible.hpp b/cpp/include/wtf/type_traits/is_convertible.hpp similarity index 100% rename from include/wtf/type_traits/is_convertible.hpp rename to cpp/include/wtf/type_traits/is_convertible.hpp diff --git a/include/wtf/type_traits/is_floating_point.hpp b/cpp/include/wtf/type_traits/is_floating_point.hpp similarity index 100% rename from include/wtf/type_traits/is_floating_point.hpp rename to cpp/include/wtf/type_traits/is_floating_point.hpp diff --git a/include/wtf/type_traits/precision.hpp b/cpp/include/wtf/type_traits/precision.hpp similarity index 100% rename from include/wtf/type_traits/precision.hpp rename to cpp/include/wtf/type_traits/precision.hpp diff --git a/include/wtf/type_traits/tuple_append.hpp b/cpp/include/wtf/type_traits/tuple_append.hpp similarity index 100% rename from include/wtf/type_traits/tuple_append.hpp rename to cpp/include/wtf/type_traits/tuple_append.hpp diff --git a/include/wtf/type_traits/type_name.hpp b/cpp/include/wtf/type_traits/type_name.hpp similarity index 100% rename from include/wtf/type_traits/type_name.hpp rename to cpp/include/wtf/type_traits/type_name.hpp diff --git a/include/wtf/type_traits/type_traits.hpp b/cpp/include/wtf/type_traits/type_traits.hpp similarity index 100% rename from include/wtf/type_traits/type_traits.hpp rename to cpp/include/wtf/type_traits/type_traits.hpp diff --git a/include/wtf/types.hpp b/cpp/include/wtf/types.hpp similarity index 100% rename from include/wtf/types.hpp rename to cpp/include/wtf/types.hpp diff --git a/include/wtf/warnings.hpp b/cpp/include/wtf/warnings.hpp similarity index 100% rename from include/wtf/warnings.hpp rename to cpp/include/wtf/warnings.hpp diff --git a/include/wtf/wtf.hpp b/cpp/include/wtf/wtf.hpp similarity index 100% rename from include/wtf/wtf.hpp rename to cpp/include/wtf/wtf.hpp diff --git a/src/wtf/fp/detail_/float_holder.cpp b/cpp/src/wtf/fp/detail_/float_holder.cpp similarity index 100% rename from src/wtf/fp/detail_/float_holder.cpp rename to cpp/src/wtf/fp/detail_/float_holder.cpp diff --git a/src/wtf/fp/float.cpp b/cpp/src/wtf/fp/float.cpp similarity index 100% rename from src/wtf/fp/float.cpp rename to cpp/src/wtf/fp/float.cpp diff --git a/src/wtf/rtti/detail_/type_holder.cpp b/cpp/src/wtf/rtti/detail_/type_holder.cpp similarity index 100% rename from src/wtf/rtti/detail_/type_holder.cpp rename to cpp/src/wtf/rtti/detail_/type_holder.cpp diff --git a/src/wtf/rtti/type_info.cpp b/cpp/src/wtf/rtti/type_info.cpp similarity index 100% rename from src/wtf/rtti/type_info.cpp rename to cpp/src/wtf/rtti/type_info.cpp diff --git a/tests/test_wtf.hpp b/tests/cpp/test_wtf.hpp similarity index 100% rename from tests/test_wtf.hpp rename to tests/cpp/test_wtf.hpp diff --git a/tests/unit_tests/wtf/buffer/buffer_view.cpp b/tests/cpp/unit_tests/wtf/buffer/buffer_view.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/buffer_view.cpp rename to tests/cpp/unit_tests/wtf/buffer/buffer_view.cpp diff --git a/tests/unit_tests/wtf/buffer/detail_/buffer_holder.cpp b/tests/cpp/unit_tests/wtf/buffer/detail_/buffer_holder.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/detail_/buffer_holder.cpp rename to tests/cpp/unit_tests/wtf/buffer/detail_/buffer_holder.cpp diff --git a/tests/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp b/tests/cpp/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp rename to tests/cpp/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp diff --git a/tests/unit_tests/wtf/buffer/detail_/contiguous_model.cpp b/tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_model.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/detail_/contiguous_model.cpp rename to tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_model.cpp diff --git a/tests/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp b/tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp rename to tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp diff --git a/tests/unit_tests/wtf/buffer/float_buffer.cpp b/tests/cpp/unit_tests/wtf/buffer/float_buffer.cpp similarity index 100% rename from tests/unit_tests/wtf/buffer/float_buffer.cpp rename to tests/cpp/unit_tests/wtf/buffer/float_buffer.cpp diff --git a/tests/unit_tests/wtf/concepts/floating_point.cpp b/tests/cpp/unit_tests/wtf/concepts/floating_point.cpp similarity index 100% rename from tests/unit_tests/wtf/concepts/floating_point.cpp rename to tests/cpp/unit_tests/wtf/concepts/floating_point.cpp diff --git a/tests/unit_tests/wtf/concepts/iterator.cpp b/tests/cpp/unit_tests/wtf/concepts/iterator.cpp similarity index 100% rename from tests/unit_tests/wtf/concepts/iterator.cpp rename to tests/cpp/unit_tests/wtf/concepts/iterator.cpp diff --git a/tests/unit_tests/wtf/concepts/modifiers.cpp b/tests/cpp/unit_tests/wtf/concepts/modifiers.cpp similarity index 100% rename from tests/unit_tests/wtf/concepts/modifiers.cpp rename to tests/cpp/unit_tests/wtf/concepts/modifiers.cpp diff --git a/tests/unit_tests/wtf/concepts/stream_insertion.cpp b/tests/cpp/unit_tests/wtf/concepts/stream_insertion.cpp similarity index 100% rename from tests/unit_tests/wtf/concepts/stream_insertion.cpp rename to tests/cpp/unit_tests/wtf/concepts/stream_insertion.cpp diff --git a/tests/unit_tests/wtf/concepts/wtf_float.cpp b/tests/cpp/unit_tests/wtf/concepts/wtf_float.cpp similarity index 100% rename from tests/unit_tests/wtf/concepts/wtf_float.cpp rename to tests/cpp/unit_tests/wtf/concepts/wtf_float.cpp diff --git a/tests/unit_tests/wtf/detail_/dispatcher.cpp b/tests/cpp/unit_tests/wtf/detail_/dispatcher.cpp similarity index 100% rename from tests/unit_tests/wtf/detail_/dispatcher.cpp rename to tests/cpp/unit_tests/wtf/detail_/dispatcher.cpp diff --git a/tests/unit_tests/wtf/detail_/downcaster.cpp b/tests/cpp/unit_tests/wtf/detail_/downcaster.cpp similarity index 100% rename from tests/unit_tests/wtf/detail_/downcaster.cpp rename to tests/cpp/unit_tests/wtf/detail_/downcaster.cpp diff --git a/tests/unit_tests/wtf/detail_/variant_from_tuple.cpp b/tests/cpp/unit_tests/wtf/detail_/variant_from_tuple.cpp similarity index 100% rename from tests/unit_tests/wtf/detail_/variant_from_tuple.cpp rename to tests/cpp/unit_tests/wtf/detail_/variant_from_tuple.cpp diff --git a/tests/unit_tests/wtf/fp/detail_/float_holder.cpp b/tests/cpp/unit_tests/wtf/fp/detail_/float_holder.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/detail_/float_holder.cpp rename to tests/cpp/unit_tests/wtf/fp/detail_/float_holder.cpp diff --git a/tests/unit_tests/wtf/fp/detail_/float_model.cpp b/tests/cpp/unit_tests/wtf/fp/detail_/float_model.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/detail_/float_model.cpp rename to tests/cpp/unit_tests/wtf/fp/detail_/float_model.cpp diff --git a/tests/unit_tests/wtf/fp/detail_/float_view_holder.cpp b/tests/cpp/unit_tests/wtf/fp/detail_/float_view_holder.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/detail_/float_view_holder.cpp rename to tests/cpp/unit_tests/wtf/fp/detail_/float_view_holder.cpp diff --git a/tests/unit_tests/wtf/fp/detail_/float_view_model.cpp b/tests/cpp/unit_tests/wtf/fp/detail_/float_view_model.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/detail_/float_view_model.cpp rename to tests/cpp/unit_tests/wtf/fp/detail_/float_view_model.cpp diff --git a/tests/unit_tests/wtf/fp/float.cpp b/tests/cpp/unit_tests/wtf/fp/float.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/float.cpp rename to tests/cpp/unit_tests/wtf/fp/float.cpp diff --git a/tests/unit_tests/wtf/fp/float_view.cpp b/tests/cpp/unit_tests/wtf/fp/float_view.cpp similarity index 100% rename from tests/unit_tests/wtf/fp/float_view.cpp rename to tests/cpp/unit_tests/wtf/fp/float_view.cpp diff --git a/tests/unit_tests/wtf/main.cpp b/tests/cpp/unit_tests/wtf/main.cpp similarity index 100% rename from tests/unit_tests/wtf/main.cpp rename to tests/cpp/unit_tests/wtf/main.cpp diff --git a/tests/unit_tests/wtf/rtti/detail_/type_holder.cpp b/tests/cpp/unit_tests/wtf/rtti/detail_/type_holder.cpp similarity index 100% rename from tests/unit_tests/wtf/rtti/detail_/type_holder.cpp rename to tests/cpp/unit_tests/wtf/rtti/detail_/type_holder.cpp diff --git a/tests/unit_tests/wtf/rtti/detail_/type_model.cpp b/tests/cpp/unit_tests/wtf/rtti/detail_/type_model.cpp similarity index 100% rename from tests/unit_tests/wtf/rtti/detail_/type_model.cpp rename to tests/cpp/unit_tests/wtf/rtti/detail_/type_model.cpp diff --git a/tests/unit_tests/wtf/rtti/type_info.cpp b/tests/cpp/unit_tests/wtf/rtti/type_info.cpp similarity index 100% rename from tests/unit_tests/wtf/rtti/type_info.cpp rename to tests/cpp/unit_tests/wtf/rtti/type_info.cpp diff --git a/tests/unit_tests/wtf/type_traits/float_traits.cpp b/tests/cpp/unit_tests/wtf/type_traits/float_traits.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/float_traits.cpp rename to tests/cpp/unit_tests/wtf/type_traits/float_traits.cpp diff --git a/tests/unit_tests/wtf/type_traits/is_convertible.cpp b/tests/cpp/unit_tests/wtf/type_traits/is_convertible.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/is_convertible.cpp rename to tests/cpp/unit_tests/wtf/type_traits/is_convertible.cpp diff --git a/tests/unit_tests/wtf/type_traits/is_floating_point.cpp b/tests/cpp/unit_tests/wtf/type_traits/is_floating_point.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/is_floating_point.cpp rename to tests/cpp/unit_tests/wtf/type_traits/is_floating_point.cpp diff --git a/tests/unit_tests/wtf/type_traits/precision.cpp b/tests/cpp/unit_tests/wtf/type_traits/precision.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/precision.cpp rename to tests/cpp/unit_tests/wtf/type_traits/precision.cpp diff --git a/tests/unit_tests/wtf/type_traits/tupple_append.cpp b/tests/cpp/unit_tests/wtf/type_traits/tupple_append.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/tupple_append.cpp rename to tests/cpp/unit_tests/wtf/type_traits/tupple_append.cpp diff --git a/tests/unit_tests/wtf/type_traits/type_name.cpp b/tests/cpp/unit_tests/wtf/type_traits/type_name.cpp similarity index 100% rename from tests/unit_tests/wtf/type_traits/type_name.cpp rename to tests/cpp/unit_tests/wtf/type_traits/type_name.cpp From a788cdfb5864f481890c8d70479b2ae974d65626 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Apr 2026 09:46:22 -0500 Subject: [PATCH 02/20] missed file --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80737ee..0fd3848 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,16 +28,16 @@ include(cmake/get_dependencies.cmake) # Define the documentation target include(nwx_cxx_api_docs) -nwx_cxx_api_docs("include" "src") +nwx_cxx_api_docs("cpp/include" "cpp/src") # Build the Library -file(GLOB_RECURSE WTF_HEADER_FILES CONFIGURE_DEPENDS include/wtf/*.hpp) -file(GLOB_RECURSE WTF_SOURCE_FILES CONFIGURE_DEPENDS src/wtf/*.cpp) +file(GLOB_RECURSE WTF_HEADER_FILES CONFIGURE_DEPENDS cpp/include/wtf/*.hpp) +file(GLOB_RECURSE WTF_SOURCE_FILES CONFIGURE_DEPENDS cpp/src/wtf/*.cpp) add_library(${PROJECT_NAME} ${WTF_SOURCE_FILES}) target_link_libraries(${PROJECT_NAME}) target_include_directories(${PROJECT_NAME} PUBLIC - $ + $ $ ) @@ -47,7 +47,7 @@ if(${BUILD_TESTING}) include(cmake/catch2_tests_from_dir.cmake) catch2_tests_from_dir( "unit_test_${PROJECT_NAME}" - tests/unit_tests/wtf + tests/cpp/unit_tests/wtf ${PROJECT_NAME} ) endif() @@ -55,5 +55,5 @@ endif() include(cmake/install_target.cmake) install_library( ${PROJECT_NAME} - "${CMAKE_CURRENT_SOURCE_DIR}/include/${PROJECT_NAME}" + "${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/${PROJECT_NAME}" ) From 39033b05b9656e71bfd7abf0ffcb83a1c3bccb38 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Apr 2026 13:53:22 -0500 Subject: [PATCH 03/20] adds python bindings and pip build --- .gitignore | 5 ++++ CMakeLists.txt | 17 +++++++++++ README.md | 36 +++++++++++++++++++++++ cmake/dependencies/pybind11.cmake | 22 ++++++++++++++ cpp/src/wtf/export_wtf.cpp | 23 +++++++++++++++ cpp/src/wtf/export_wtf.hpp | 25 ++++++++++++++++ cpp/src/wtf/fp/export_float.cpp | 28 ++++++++++++++++++ pyproject.toml | 37 ++++++++++++++++++++++++ tests/python/unit_tests/fp/test_float.py | 32 ++++++++++++++++++++ 9 files changed, 225 insertions(+) create mode 100644 cmake/dependencies/pybind11.cmake create mode 100644 cpp/src/wtf/export_wtf.cpp create mode 100644 cpp/src/wtf/export_wtf.hpp create mode 100644 cpp/src/wtf/fp/export_float.cpp create mode 100644 pyproject.toml create mode 100644 tests/python/unit_tests/fp/test_float.py diff --git a/.gitignore b/.gitignore index ada45bd..a4d3afe 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,8 @@ # limitations under the License. venv/ +.cache/ +.venv/ +build/ +__pycache__/ +.pytest_cache/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fd3848..11c068d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ nwx_cxx_api_docs("cpp/include" "cpp/src") # Build the Library file(GLOB_RECURSE WTF_HEADER_FILES CONFIGURE_DEPENDS cpp/include/wtf/*.hpp) file(GLOB_RECURSE WTF_SOURCE_FILES CONFIGURE_DEPENDS cpp/src/wtf/*.cpp) +list(FILTER WTF_SOURCE_FILES EXCLUDE REGEX ".*/export_.*\\.cpp$") add_library(${PROJECT_NAME} ${WTF_SOURCE_FILES}) target_link_libraries(${PROJECT_NAME}) target_include_directories(${PROJECT_NAME} @@ -52,6 +53,22 @@ if(${BUILD_TESTING}) ) endif() + +option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) +if(BUILD_PYBIND11_BINDINGS) + get_dependencies(pybind11) + pybind11_add_module(wtf_python + cpp/src/wtf/export_wtf.cpp + cpp/src/wtf/fp/export_float.cpp + ) + target_link_libraries(wtf_python PRIVATE ${PROJECT_NAME}) + target_include_directories(wtf_python PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include + ) + set_target_properties(wtf_python PROPERTIES OUTPUT_NAME wtf) + install(TARGETS wtf_python DESTINATION ${SKBUILD_PLATLIB_DIR}) +endif() + include(cmake/install_target.cmake) install_library( ${PROJECT_NAME} diff --git a/README.md b/README.md index 87bad22..64dca16 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,42 @@ writes their interfaces in terms of "weakly typed" objects like `Float` and `FloatBuffer`, and determination of the actual floating-point type is deferred to runtime. +## Development Setup + +### Prerequisites + +- CMake >= 3.14 +- A C++20-capable compiler +- Python >= 3.8 + +### Editable install + +Create and activate a virtual environment, then install the package in editable +(dev) mode. This builds the Python bindings and the C++ test suite: + +```bash +python3 -m venv .venv +source .venv/bin/activate +pip install -e ".[dev]" +``` + +### Running the C++ tests + +The editable install keeps its build tree in `build/` (configured via +`build-dir` in `pyproject.toml`). Run CTest directly from there: + +```bash +cd build && ctest --output-on-failure +``` + +### Running the Python tests + +With the virtual environment active: + +```bash +pytest tests/python/ +``` + ## Problem Description Full description (TODO: Add link to the documentation) diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake new file mode 100644 index 0000000..2ebc4a1 --- /dev/null +++ b/cmake/dependencies/pybind11.cmake @@ -0,0 +1,22 @@ +# Copyright 2025 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_guard() +include(FetchContent) + +FetchContent_Declare( + pybind11 + GIT_REPOSITORY https://github.com/pybind/pybind11 + GIT_TAG "v2.13.6" +) diff --git a/cpp/src/wtf/export_wtf.cpp b/cpp/src/wtf/export_wtf.cpp new file mode 100644 index 0000000..d37b67d --- /dev/null +++ b/cpp/src/wtf/export_wtf.cpp @@ -0,0 +1,23 @@ +/* + * Copyright 2025 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "export_wtf.hpp" + +namespace wtf { + +PYBIND11_MODULE(wtf, m) { fp::export_float(m); } + +} // namespace wtf diff --git a/cpp/src/wtf/export_wtf.hpp b/cpp/src/wtf/export_wtf.hpp new file mode 100644 index 0000000..08dd4ee --- /dev/null +++ b/cpp/src/wtf/export_wtf.hpp @@ -0,0 +1,25 @@ +/* + * Copyright 2025 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include + +namespace wtf { +namespace fp { +/** @brief Exports the wtf::fp::Float class to the Python module @p m. */ +void export_float(pybind11::module_& m); +} // namespace fp +} // namespace wtf diff --git a/cpp/src/wtf/fp/export_float.cpp b/cpp/src/wtf/fp/export_float.cpp new file mode 100644 index 0000000..34ca821 --- /dev/null +++ b/cpp/src/wtf/fp/export_float.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2025 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../export_wtf.hpp" +#include + +namespace wtf::fp { + +void export_float(pybind11::module_& m) { + pybind11::class_(m, "Float") + .def(pybind11::init()) + .def("to_string", &wtf::fp::Float::to_string); +} + +} // namespace wtf::fp diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..924d4f8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[build-system] +requires = ["scikit-build-core>=0.10", "pybind11"] +build-backend = "scikit_build_core.build" + +[project] +name = "wtf" +version = "1.0.0" +description = "Weakly Typed Float — a DSL for type-erased floating-point types" +license = { text = "Apache-2.0" } +requires-python = ">=3.8" + +[project.optional-dependencies] +dev = ["pytest"] + +[tool.scikit-build] +cmake.build-type = "Release" +cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=OFF"] +wheel.packages = [] +build-dir = "build" + +[[tool.scikit-build.overrides]] +if.state = "editable" +cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=ON"] diff --git a/tests/python/unit_tests/fp/test_float.py b/tests/python/unit_tests/fp/test_float.py new file mode 100644 index 0000000..fa482a3 --- /dev/null +++ b/tests/python/unit_tests/fp/test_float.py @@ -0,0 +1,32 @@ +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Unit tests for the wtf.Float Python binding.""" + +import wtf + + +def test_import(): + assert hasattr(wtf, "Float") + + +def test_set_value(): + f = wtf.Float(3.14) + assert f is not None + + +def test_to_string(): + f = wtf.Float(3.14) + s = f.to_string() + assert "3.14" in s From 82027058be4e8e0bf45a6e5cf2376763ae40e5a1 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Apr 2026 15:48:34 -0500 Subject: [PATCH 04/20] adds pypi test --- .github/workflows/pull_request.yaml | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index e81d732..d0c7c0d 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -33,3 +33,64 @@ jobs: uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master with: compilers: '["gcc-14", "clang-18"]' + + test_python: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: [gcc-14, clang-18] + steps: + - uses: actions/checkout@v4 + + - name: Install compiler (${{ matrix.compiler }}) + run: | + sudo apt-get update -y + if [[ "${{ matrix.compiler }}" == gcc-* ]]; then + version="${{ matrix.compiler }#gcc-}" + sudo apt-get install -y gcc-${version} g++-${version} + echo "CC=gcc-${version}" >> $GITHUB_ENV + echo "CXX=g++-${version}" >> $GITHUB_ENV + else + version="${{ matrix.compiler }#clang-}" + sudo apt-get install -y clang-${version} + echo "CC=clang-${version}" >> $GITHUB_ENV + echo "CXX=clang++-${version}" >> $GITHUB_ENV + fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Editable install (dev) + run: pip install -e ".[dev]" + + - name: Run C++ tests + run: cd build && ctest --output-on-failure + + - name: Run Python tests + run: pytest tests/python/ + + deploy_to_testpypi: + needs: test_python + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build + run: pip install build + + - name: Build wheel + run: python -m build --wheel + + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ From 13aa926509958f8e0b75471d3dad294cd197d286 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 11:03:15 -0500 Subject: [PATCH 05/20] add pr.yaml changes --- .github/workflows/pull_request.yaml | 61 ----------------------------- 1 file changed, 61 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index d0c7c0d..e81d732 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -33,64 +33,3 @@ jobs: uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master with: compilers: '["gcc-14", "clang-18"]' - - test_python: - runs-on: ubuntu-latest - strategy: - matrix: - compiler: [gcc-14, clang-18] - steps: - - uses: actions/checkout@v4 - - - name: Install compiler (${{ matrix.compiler }}) - run: | - sudo apt-get update -y - if [[ "${{ matrix.compiler }}" == gcc-* ]]; then - version="${{ matrix.compiler }#gcc-}" - sudo apt-get install -y gcc-${version} g++-${version} - echo "CC=gcc-${version}" >> $GITHUB_ENV - echo "CXX=g++-${version}" >> $GITHUB_ENV - else - version="${{ matrix.compiler }#clang-}" - sudo apt-get install -y clang-${version} - echo "CC=clang-${version}" >> $GITHUB_ENV - echo "CXX=clang++-${version}" >> $GITHUB_ENV - fi - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Editable install (dev) - run: pip install -e ".[dev]" - - - name: Run C++ tests - run: cd build && ctest --output-on-failure - - - name: Run Python tests - run: pytest tests/python/ - - deploy_to_testpypi: - needs: test_python - runs-on: ubuntu-latest - permissions: - id-token: write - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install build - run: pip install build - - - name: Build wheel - run: python -m build --wheel - - - name: Publish to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ From c3bfbd002373147f05b8b51b8ae3522e5dbbecc6 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 11:06:25 -0500 Subject: [PATCH 06/20] add pip build back in --- .github/workflows/pull_request.yaml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index e81d732..233f3b6 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -33,3 +33,40 @@ jobs: uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master with: compilers: '["gcc-14", "clang-18"]' + + test_python: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: [gcc-14, clang-18] + steps: + - uses: actions/checkout@v4 + + - name: Install compiler (${{ matrix.compiler }}) + run: | + sudo apt-get update -y + if [[ "${{ matrix.compiler }}" == gcc-* ]]; then + version="${{ matrix.compiler }#gcc-}" + sudo apt-get install -y gcc-${version} g++-${version} + echo "CC=gcc-${version}" >> $GITHUB_ENV + echo "CXX=g++-${version}" >> $GITHUB_ENV + else + version="${{ matrix.compiler }#clang-}" + sudo apt-get install -y clang-${version} + echo "CC=clang-${version}" >> $GITHUB_ENV + echo "CXX=clang++-${version}" >> $GITHUB_ENV + fi + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Editable install (dev) + run: pip install -e ".[dev]" + + - name: Run C++ tests + run: cd build && ctest --output-on-failure + + - name: Run Python tests + run: pytest tests/python/ From 5b507c9bbc36d6e0c0daed5fd7e9ed97bb41f339 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 12:27:47 -0500 Subject: [PATCH 07/20] try again --- .github/workflows/pull_request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 233f3b6..4c07f81 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -46,12 +46,12 @@ jobs: run: | sudo apt-get update -y if [[ "${{ matrix.compiler }}" == gcc-* ]]; then - version="${{ matrix.compiler }#gcc-}" + version=$(echo "${{ matrix.compiler }}" | sed 's/gcc-//') sudo apt-get install -y gcc-${version} g++-${version} echo "CC=gcc-${version}" >> $GITHUB_ENV echo "CXX=g++-${version}" >> $GITHUB_ENV else - version="${{ matrix.compiler }#clang-}" + version=$(echo "${{ matrix.compiler }}" | sed 's/clang-//') sudo apt-get install -y clang-${version} echo "CC=clang-${version}" >> $GITHUB_ENV echo "CXX=clang++-${version}" >> $GITHUB_ENV From 752ccb84f8deaa3887a2db781ef7744a91b501c9 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 12:46:35 -0500 Subject: [PATCH 08/20] fix CI? --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11c068d..e4c2527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,10 @@ target_include_directories(${PROJECT_NAME} $ ) +if(BUILD_PYBIND11_BINDINGS) + set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) +endif() + if(${BUILD_TESTING}) include(CTest) get_dependencies(catch2) @@ -66,7 +70,9 @@ if(BUILD_PYBIND11_BINDINGS) ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include ) set_target_properties(wtf_python PROPERTIES OUTPUT_NAME wtf) - install(TARGETS wtf_python DESTINATION ${SKBUILD_PLATLIB_DIR}) + install(TARGETS wtf_python + DESTINATION $,${SKBUILD_PLATLIB_DIR},lib> + ) endif() include(cmake/install_target.cmake) From b786761633ab399cc47d999f85224f2f22dd3bbb Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 13:00:57 -0500 Subject: [PATCH 09/20] disable scanning for modules --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4c2527..807081c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ include(cmake/get_nwx_cmake.cmake) project(wtf VERSION "1.0.0" LANGUAGES CXX) include(cmake/disable_in_source_builds.cmake) set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # TODO: Make these into proper options set(BUILD_TESTING TRUE) From ae5009693797fd249506aea40885cd65a656b66e Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 13:03:22 -0500 Subject: [PATCH 10/20] test pypi deployment --- .github/workflows/pull_request.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 4c07f81..345d819 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -70,3 +70,27 @@ jobs: - name: Run Python tests run: pytest tests/python/ + + deploy_to_testpypi: + needs: test_python + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build + run: pip install build + + - name: Build wheel + run: python -m build --wheel + + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ From 40d886425765ab9d9ccb6e214d1ce53169b31f32 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 13:52:33 -0500 Subject: [PATCH 11/20] try deploy again --- .github/workflows/pull_request.yaml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 345d819..675d833 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -36,26 +36,15 @@ jobs: test_python: runs-on: ubuntu-latest - strategy: - matrix: - compiler: [gcc-14, clang-18] steps: - uses: actions/checkout@v4 - - name: Install compiler (${{ matrix.compiler }}) + - name: Install clang-18 run: | sudo apt-get update -y - if [[ "${{ matrix.compiler }}" == gcc-* ]]; then - version=$(echo "${{ matrix.compiler }}" | sed 's/gcc-//') - sudo apt-get install -y gcc-${version} g++-${version} - echo "CC=gcc-${version}" >> $GITHUB_ENV - echo "CXX=g++-${version}" >> $GITHUB_ENV - else - version=$(echo "${{ matrix.compiler }}" | sed 's/clang-//') - sudo apt-get install -y clang-${version} - echo "CC=clang-${version}" >> $GITHUB_ENV - echo "CXX=clang++-${version}" >> $GITHUB_ENV - fi + sudo apt-get install -y clang-18 + echo "CC=clang-18" >> $GITHUB_ENV + echo "CXX=clang++-18" >> $GITHUB_ENV - name: Set up Python uses: actions/setup-python@v5 @@ -84,6 +73,13 @@ jobs: with: python-version: "3.12" + - name: Install clang-18 + run: | + sudo apt-get update -y + sudo apt-get install -y clang-18 + echo "CC=clang-18" >> $GITHUB_ENV + echo "CXX=clang++-18" >> $GITHUB_ENV + - name: Install build run: pip install build From 30853c07ecdda788755c7ab7e4c781a46943b915 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 14:34:21 -0500 Subject: [PATCH 12/20] updated project name --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 924d4f8..545676c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ requires = ["scikit-build-core>=0.10", "pybind11"] build-backend = "scikit_build_core.build" [project] -name = "wtf" +name = "weaklytypedfloat" version = "1.0.0" description = "Weakly Typed Float — a DSL for type-erased floating-point types" license = { text = "Apache-2.0" } From 46d292598a15f86c79779d8b9c545aaa7921c200 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 15:05:38 -0500 Subject: [PATCH 13/20] try cibuild --- .github/workflows/pull_request.yaml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 675d833..0220d0a 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -68,25 +68,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install clang-18 - run: | - sudo apt-get update -y - sudo apt-get install -y clang-18 - echo "CC=clang-18" >> $GITHUB_ENV - echo "CXX=clang++-18" >> $GITHUB_ENV - - - name: Install build - run: pip install build - - - name: Build wheel - run: python -m build --wheel + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_BUILD: cp312-manylinux_x86_64 - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: + packages-dir: wheelhouse/ repository-url: https://test.pypi.org/legacy/ From 710f47f62bd7e3304f41048ddc2fc95852e16876 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 8 Apr 2026 15:56:29 -0500 Subject: [PATCH 14/20] cmake factorization --- CMakeLists.txt | 56 ++++++------------------------- cmake/catch2_tests_from_dir.cmake | 6 ++++ cmake/nwx_library.cmake | 37 ++++++++++++++++++++ cmake/nwx_python_module.cmake | 43 ++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 46 deletions(-) create mode 100644 cmake/nwx_library.cmake create mode 100644 cmake/nwx_python_module.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 807081c..c48a909 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,60 +24,24 @@ set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # TODO: Make these into proper options set(BUILD_TESTING TRUE) set(CMAKE_BUILD_SHARED_LIBS ON) - -include(cmake/get_dependencies.cmake) +option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) # Define the documentation target include(nwx_cxx_api_docs) nwx_cxx_api_docs("cpp/include" "cpp/src") # Build the Library -file(GLOB_RECURSE WTF_HEADER_FILES CONFIGURE_DEPENDS cpp/include/wtf/*.hpp) -file(GLOB_RECURSE WTF_SOURCE_FILES CONFIGURE_DEPENDS cpp/src/wtf/*.cpp) -list(FILTER WTF_SOURCE_FILES EXCLUDE REGEX ".*/export_.*\\.cpp$") -add_library(${PROJECT_NAME} ${WTF_SOURCE_FILES}) -target_link_libraries(${PROJECT_NAME}) -target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ -) +include(cmake/nwx_library.cmake) +nwx_library(${PROJECT_NAME} "cpp/include" "cpp/src") -if(BUILD_PYBIND11_BINDINGS) - set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) -endif() - -if(${BUILD_TESTING}) - include(CTest) - get_dependencies(catch2) - include(cmake/catch2_tests_from_dir.cmake) - catch2_tests_from_dir( +# Register the C++ tests +include(cmake/catch2_tests_from_dir.cmake) +catch2_tests_from_dir( "unit_test_${PROJECT_NAME}" tests/cpp/unit_tests/wtf ${PROJECT_NAME} - ) -endif() - - -option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) -if(BUILD_PYBIND11_BINDINGS) - get_dependencies(pybind11) - pybind11_add_module(wtf_python - cpp/src/wtf/export_wtf.cpp - cpp/src/wtf/fp/export_float.cpp - ) - target_link_libraries(wtf_python PRIVATE ${PROJECT_NAME}) - target_include_directories(wtf_python PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include - ) - set_target_properties(wtf_python PROPERTIES OUTPUT_NAME wtf) - install(TARGETS wtf_python - DESTINATION $,${SKBUILD_PLATLIB_DIR},lib> - ) -endif() - -include(cmake/install_target.cmake) -install_library( - ${PROJECT_NAME} - "${CMAKE_CURRENT_SOURCE_DIR}/cpp/include/${PROJECT_NAME}" ) + +# Register the Python module +include(cmake/nwx_python_module.cmake) +nwx_python_module(${PROJECT_NAME}_python "cpp/src") diff --git a/cmake/catch2_tests_from_dir.cmake b/cmake/catch2_tests_from_dir.cmake index 782cfa2..8e28732 100644 --- a/cmake/catch2_tests_from_dir.cmake +++ b/cmake/catch2_tests_from_dir.cmake @@ -15,6 +15,11 @@ include_guard() function(catch2_tests_from_dir ctfd_target_name ctfd_dir) +if(${BUILD_TESTING}) + include(CTest) + include(cmake/get_dependencies.cmake) + get_dependencies(catch2) + file(GLOB_RECURSE ctfd_test_files CONFIGURE_DEPENDS ${ctfd_dir}/*.cpp) add_executable(${ctfd_target_name} ${ctfd_test_files}) @@ -26,4 +31,5 @@ function(catch2_tests_from_dir ctfd_target_name ctfd_dir) COMMAND ${ctfd_target_name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) +endif() endfunction() diff --git a/cmake/nwx_library.cmake b/cmake/nwx_library.cmake new file mode 100644 index 0000000..5ead032 --- /dev/null +++ b/cmake/nwx_library.cmake @@ -0,0 +1,37 @@ +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_guard() + +function(nwx_library nl_project_name nl_inc_dir nl_src_dir) + file(GLOB_RECURSE __nl_header_files CONFIGURE_DEPENDS ${nl_inc_dir}/*.hpp) + file(GLOB_RECURSE __nl_source_files CONFIGURE_DEPENDS ${nl_src_dir}/*.cpp) + list(FILTER __nl_source_files EXCLUDE REGEX ".*/export_.*\\.cpp$") + add_library(${nl_project_name} ${__nl_source_files}) + target_link_libraries(${nl_project_name}) + target_include_directories(${nl_project_name} + PUBLIC + $ + $ + ) + set_target_properties( + ${nl_project_name} PROPERTIES POSITION_INDEPENDENT_CODE ON + ) + + include(cmake/install_target.cmake) + install_library( + ${nl_project_name} + "${CMAKE_CURRENT_SOURCE_DIR}/${nl_inc_dir}" + ) +endfunction() diff --git a/cmake/nwx_python_module.cmake b/cmake/nwx_python_module.cmake new file mode 100644 index 0000000..57abc79 --- /dev/null +++ b/cmake/nwx_python_module.cmake @@ -0,0 +1,43 @@ +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_guard() + +function(nwx_python_module nwx_python_module_name nwx_python_src_dir) + if(NOT BUILD_PYBIND11_BINDINGS) + return() + endif() + + include(cmake/get_dependencies.cmake) + get_dependencies(pybind11) + file( + GLOB_RECURSE __nwx_python_module_source_files + CONFIGURE_DEPENDS ${nwx_python_src_dir}/*.cpp + ) + list(FILTER __nwx_python_module_source_files INCLUDE REGEX ".*/export_.*\\.cpp$") + pybind11_add_module( + ${nwx_python_module_name} ${__nwx_python_module_source_files} + ) + target_link_libraries(${nwx_python_module_name} PRIVATE ${PROJECT_NAME}) + target_include_directories(${nwx_python_module_name} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include + ) + set_target_properties( + ${nwx_python_module_name} + PROPERTIES OUTPUT_NAME ${nwx_python_module_name} + ) + install(TARGETS ${nwx_python_module_name} + DESTINATION $,${SKBUILD_PLATLIB_DIR},lib> + ) +endfunction() From cfdf33fb5d94e7587c955201023a1abfdae75080 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 9 Apr 2026 15:50:33 -0500 Subject: [PATCH 15/20] update to use NWXCMake --- cmake/catch2_tests_from_dir.cmake | 35 -------------- cmake/dependencies/catch2.cmake | 22 --------- cmake/dependencies/pybind11.cmake | 22 --------- cmake/disable_in_source_builds.cmake | 23 ---------- cmake/get_dependencies.cmake | 25 ---------- cmake/install_target.cmake | 68 ---------------------------- cmake/nwx_library.cmake | 37 --------------- cmake/nwx_python_module.cmake | 43 ------------------ 8 files changed, 275 deletions(-) delete mode 100644 cmake/catch2_tests_from_dir.cmake delete mode 100644 cmake/dependencies/catch2.cmake delete mode 100644 cmake/dependencies/pybind11.cmake delete mode 100644 cmake/disable_in_source_builds.cmake delete mode 100644 cmake/get_dependencies.cmake delete mode 100644 cmake/install_target.cmake delete mode 100644 cmake/nwx_library.cmake delete mode 100644 cmake/nwx_python_module.cmake diff --git a/cmake/catch2_tests_from_dir.cmake b/cmake/catch2_tests_from_dir.cmake deleted file mode 100644 index 8e28732..0000000 --- a/cmake/catch2_tests_from_dir.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() - -function(catch2_tests_from_dir ctfd_target_name ctfd_dir) -if(${BUILD_TESTING}) - include(CTest) - include(cmake/get_dependencies.cmake) - get_dependencies(catch2) - - file(GLOB_RECURSE ctfd_test_files CONFIGURE_DEPENDS ${ctfd_dir}/*.cpp) - - add_executable(${ctfd_target_name} ${ctfd_test_files}) - - target_link_libraries( - ${ctfd_target_name} PRIVATE Catch2::Catch2WithMain ${ARGN}) - - add_test(NAME ${ctfd_target_name} - COMMAND ${ctfd_target_name} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - ) -endif() -endfunction() diff --git a/cmake/dependencies/catch2.cmake b/cmake/dependencies/catch2.cmake deleted file mode 100644 index e78a197..0000000 --- a/cmake/dependencies/catch2.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() -include(FetchContent) - -FetchContent_Declare( - catch2 - GIT_REPOSITORY https://github.com/catchorg/Catch2 - GIT_TAG "v3.11.0" -) diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake deleted file mode 100644 index 2ebc4a1..0000000 --- a/cmake/dependencies/pybind11.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() -include(FetchContent) - -FetchContent_Declare( - pybind11 - GIT_REPOSITORY https://github.com/pybind/pybind11 - GIT_TAG "v2.13.6" -) diff --git a/cmake/disable_in_source_builds.cmake b/cmake/disable_in_source_builds.cmake deleted file mode 100644 index a98cc9f..0000000 --- a/cmake/disable_in_source_builds.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() - -function(disable_in_source_builds) - if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") - message(FATAL_ERROR "In-source builds are not allowed.") - endif() -endfunction() - -disable_in_source_builds() diff --git a/cmake/get_dependencies.cmake b/cmake/get_dependencies.cmake deleted file mode 100644 index f89bbec..0000000 --- a/cmake/get_dependencies.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() -include(FetchContent) - -function(get_dependencies) - foreach(depend_i ${ARGN}) - message(STATUS "Fetching dependency: ${depend_i}") - include("cmake/dependencies/${depend_i}.cmake") - endforeach() - - FetchContent_MakeAvailable(${ARGN}) -endfunction() diff --git a/cmake/install_target.cmake b/cmake/install_target.cmake deleted file mode 100644 index 784fed3..0000000 --- a/cmake/install_target.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2025 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() - -function(write_config_file wcf_file) - file(WRITE "${wcf_file}" "") # Erases it if it already exists - file(APPEND - "${wcf_file}" - "get_filename_component(_IL_CONFIG_DIR " - "\"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" - ) - file(APPEND - "${wcf_file}" - "include(\"\${_IL_CONFIG_DIR}/${il_name}Targets.cmake\")\n" - ) -endfunction() - -function(install_library il_name il_header_dir) - #TODO: Get these values programmatically - set(_il_archive_dir lib) - set(_il_library_dir lib) - set(_il_runtime_dir bin) - set(_il_includes_dir include) - - # -- Install target that is a library -- - install(TARGETS ${il_name} - EXPORT ${il_name}Targets - ARCHIVE DESTINATION "${_il_archive_dir}" - LIBRARY DESTINATION "${_il_library_dir}" - RUNTIME DESTINATION "${_il_runtime_dir}" - INCLUDES DESTINATION "${_il_includes_dir}" - ) - - # -- Install CMake Config Files -- - install(EXPORT ${il_name}Targets - FILE ${il_name}Targets.cmake - NAMESPACE nwx:: - DESTINATION "${_il_library_dir}/cmake/${il_name}" - ) - - set(_il_config_file "${CMAKE_CURRENT_BINARY_DIR}/${il_name}Config.cmake") - write_config_file("${_il_config_file}") - - install(FILES "${_il_config_file}" - DESTINATION "${_il_library_dir}/cmake/${il_name}" - ) - - # -- Install Headers -- - #TODO: Assert il_header_dir isn't empty - install(DIRECTORY "${il_header_dir}" - DESTINATION "${_il_includes_dir}" - FILES_MATCHING - PATTERN "*.hpp" - PATTERN "*.h" - ) -endfunction() diff --git a/cmake/nwx_library.cmake b/cmake/nwx_library.cmake deleted file mode 100644 index 5ead032..0000000 --- a/cmake/nwx_library.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2026 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() - -function(nwx_library nl_project_name nl_inc_dir nl_src_dir) - file(GLOB_RECURSE __nl_header_files CONFIGURE_DEPENDS ${nl_inc_dir}/*.hpp) - file(GLOB_RECURSE __nl_source_files CONFIGURE_DEPENDS ${nl_src_dir}/*.cpp) - list(FILTER __nl_source_files EXCLUDE REGEX ".*/export_.*\\.cpp$") - add_library(${nl_project_name} ${__nl_source_files}) - target_link_libraries(${nl_project_name}) - target_include_directories(${nl_project_name} - PUBLIC - $ - $ - ) - set_target_properties( - ${nl_project_name} PROPERTIES POSITION_INDEPENDENT_CODE ON - ) - - include(cmake/install_target.cmake) - install_library( - ${nl_project_name} - "${CMAKE_CURRENT_SOURCE_DIR}/${nl_inc_dir}" - ) -endfunction() diff --git a/cmake/nwx_python_module.cmake b/cmake/nwx_python_module.cmake deleted file mode 100644 index 57abc79..0000000 --- a/cmake/nwx_python_module.cmake +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2026 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include_guard() - -function(nwx_python_module nwx_python_module_name nwx_python_src_dir) - if(NOT BUILD_PYBIND11_BINDINGS) - return() - endif() - - include(cmake/get_dependencies.cmake) - get_dependencies(pybind11) - file( - GLOB_RECURSE __nwx_python_module_source_files - CONFIGURE_DEPENDS ${nwx_python_src_dir}/*.cpp - ) - list(FILTER __nwx_python_module_source_files INCLUDE REGEX ".*/export_.*\\.cpp$") - pybind11_add_module( - ${nwx_python_module_name} ${__nwx_python_module_source_files} - ) - target_link_libraries(${nwx_python_module_name} PRIVATE ${PROJECT_NAME}) - target_include_directories(${nwx_python_module_name} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/cpp/include - ) - set_target_properties( - ${nwx_python_module_name} - PROPERTIES OUTPUT_NAME ${nwx_python_module_name} - ) - install(TARGETS ${nwx_python_module_name} - DESTINATION $,${SKBUILD_PLATLIB_DIR},lib> - ) -endfunction() From 8d612ea33d494775238f1d8944f30b8f81c84b93 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Apr 2026 12:16:26 -0500 Subject: [PATCH 16/20] add MacOS wheel --- .github/workflows/pull_request.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 0220d0a..d201fac 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -62,7 +62,15 @@ jobs: deploy_to_testpypi: needs: test_python - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + cibw_build: cp312-manylinux_x86_64 + - os: macos-14 + cibw_build: cp312-macosx_arm64 + runs-on: ${{ matrix.os }} permissions: id-token: write steps: @@ -71,7 +79,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: - CIBW_BUILD: cp312-manylinux_x86_64 + CIBW_BUILD: ${{ matrix.cibw_build }} - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From db02ce707ce4194e0ddbc65078e25a368f34f880 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 13 Apr 2026 12:26:39 -0500 Subject: [PATCH 17/20] switch private NWXCMake --- CMakeLists.txt | 13 +++++++------ cmake/get_nwx_cmake.cmake | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c48a909..355ba71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,10 +14,11 @@ cmake_minimum_required(VERSION 3.14) # Downloads common CMake modules used throughout NWChemEx +project(wtf VERSION "1.0.0" LANGUAGES CXX) + include(cmake/get_nwx_cmake.cmake) -project(wtf VERSION "1.0.0" LANGUAGES CXX) -include(cmake/disable_in_source_builds.cmake) +include(disable_in_source_builds) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_SCAN_FOR_MODULES OFF) @@ -31,17 +32,17 @@ include(nwx_cxx_api_docs) nwx_cxx_api_docs("cpp/include" "cpp/src") # Build the Library -include(cmake/nwx_library.cmake) +include(nwx_library) nwx_library(${PROJECT_NAME} "cpp/include" "cpp/src") # Register the C++ tests -include(cmake/catch2_tests_from_dir.cmake) +include(catch2_tests_from_dir) catch2_tests_from_dir( "unit_test_${PROJECT_NAME}" - tests/cpp/unit_tests/wtf + "tests/cpp/unit_tests/${PROJECT_NAME}" ${PROJECT_NAME} ) # Register the Python module -include(cmake/nwx_python_module.cmake) +include(nwx_python_module) nwx_python_module(${PROJECT_NAME}_python "cpp/src") diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index de8c4bc..1b29ea6 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -18,7 +18,7 @@ macro(get_nwx_cmake) include(FetchContent) FetchContent_Declare( nwx_cmake - GIT_REPOSITORY https://github.com/NWChemEx/NWXCMake + GIT_REPOSITORY https://github.com/ryanmrichard/NWXCMake ) FetchContent_MakeAvailable(nwx_cmake) set( From 9d2ea89e4c5d32ab7f2c5a816e19652e1de5744a Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 17 Apr 2026 12:13:21 -0500 Subject: [PATCH 18/20] rename cpp to cxx for consistency --- CMakeLists.txt | 12 ++++++------ {cpp => cxx}/include/wtf/buffer/buffer.hpp | 0 {cpp => cxx}/include/wtf/buffer/buffer_view.hpp | 0 .../include/wtf/buffer/detail_/buffer_holder.hpp | 0 .../wtf/buffer/detail_/buffer_view_holder.hpp | 0 .../include/wtf/buffer/detail_/contiguous_model.hpp | 0 .../wtf/buffer/detail_/contiguous_view_model.hpp | 0 {cpp => cxx}/include/wtf/buffer/float_buffer.hpp | 0 {cpp => cxx}/include/wtf/concepts/concepts.hpp | 0 {cpp => cxx}/include/wtf/concepts/float_buffer.hpp | 0 {cpp => cxx}/include/wtf/concepts/floating_point.hpp | 0 {cpp => cxx}/include/wtf/concepts/iterator.hpp | 0 {cpp => cxx}/include/wtf/concepts/modifiers.hpp | 0 .../include/wtf/concepts/stream_insertion.hpp | 0 {cpp => cxx}/include/wtf/concepts/wtf_float.hpp | 0 {cpp => cxx}/include/wtf/detail_/dispatcher.hpp | 0 {cpp => cxx}/include/wtf/detail_/downcaster.hpp | 0 .../include/wtf/detail_/variant_from_tuple.hpp | 0 {cpp => cxx}/include/wtf/forward.hpp | 0 {cpp => cxx}/include/wtf/fp/detail_/float_holder.hpp | 0 {cpp => cxx}/include/wtf/fp/detail_/float_model.hpp | 0 .../include/wtf/fp/detail_/float_view_holder.hpp | 0 .../include/wtf/fp/detail_/float_view_model.hpp | 0 {cpp => cxx}/include/wtf/fp/float.hpp | 0 {cpp => cxx}/include/wtf/fp/float_base.hpp | 0 {cpp => cxx}/include/wtf/fp/float_view.hpp | 0 {cpp => cxx}/include/wtf/fp/fp.hpp | 0 .../include/wtf/rtti/detail_/type_holder.hpp | 0 {cpp => cxx}/include/wtf/rtti/detail_/type_model.hpp | 0 {cpp => cxx}/include/wtf/rtti/rtti.hpp | 0 {cpp => cxx}/include/wtf/rtti/type_info.hpp | 0 .../include/wtf/type_traits/float_traits.hpp | 0 .../include/wtf/type_traits/is_convertible.hpp | 0 .../include/wtf/type_traits/is_floating_point.hpp | 0 {cpp => cxx}/include/wtf/type_traits/precision.hpp | 0 .../include/wtf/type_traits/tuple_append.hpp | 0 {cpp => cxx}/include/wtf/type_traits/type_name.hpp | 0 {cpp => cxx}/include/wtf/type_traits/type_traits.hpp | 0 {cpp => cxx}/include/wtf/types.hpp | 0 {cpp => cxx}/include/wtf/warnings.hpp | 0 {cpp => cxx}/include/wtf/wtf.hpp | 0 {cpp => cxx}/src/wtf/export_wtf.cpp | 0 {cpp => cxx}/src/wtf/export_wtf.hpp | 0 {cpp => cxx}/src/wtf/fp/detail_/float_holder.cpp | 0 {cpp => cxx}/src/wtf/fp/export_float.cpp | 0 {cpp => cxx}/src/wtf/fp/float.cpp | 0 {cpp => cxx}/src/wtf/rtti/detail_/type_holder.cpp | 0 {cpp => cxx}/src/wtf/rtti/type_info.cpp | 0 tests/{cpp => cxx}/test_wtf.hpp | 0 .../unit_tests/wtf/buffer/buffer_view.cpp | 0 .../unit_tests/wtf/buffer/detail_/buffer_holder.cpp | 0 .../wtf/buffer/detail_/buffer_view_holder.cpp | 0 .../wtf/buffer/detail_/contiguous_model.cpp | 0 .../wtf/buffer/detail_/contiguous_view_model.cpp | 0 .../unit_tests/wtf/buffer/float_buffer.cpp | 0 .../unit_tests/wtf/concepts/floating_point.cpp | 0 .../unit_tests/wtf/concepts/iterator.cpp | 0 .../unit_tests/wtf/concepts/modifiers.cpp | 0 .../unit_tests/wtf/concepts/stream_insertion.cpp | 0 .../unit_tests/wtf/concepts/wtf_float.cpp | 0 .../unit_tests/wtf/detail_/dispatcher.cpp | 0 .../unit_tests/wtf/detail_/downcaster.cpp | 0 .../unit_tests/wtf/detail_/variant_from_tuple.cpp | 0 .../unit_tests/wtf/fp/detail_/float_holder.cpp | 0 .../unit_tests/wtf/fp/detail_/float_model.cpp | 0 .../unit_tests/wtf/fp/detail_/float_view_holder.cpp | 0 .../unit_tests/wtf/fp/detail_/float_view_model.cpp | 0 tests/{cpp => cxx}/unit_tests/wtf/fp/float.cpp | 0 tests/{cpp => cxx}/unit_tests/wtf/fp/float_view.cpp | 0 tests/{cpp => cxx}/unit_tests/wtf/main.cpp | 0 .../unit_tests/wtf/rtti/detail_/type_holder.cpp | 0 .../unit_tests/wtf/rtti/detail_/type_model.cpp | 0 tests/{cpp => cxx}/unit_tests/wtf/rtti/type_info.cpp | 0 .../unit_tests/wtf/type_traits/float_traits.cpp | 0 .../unit_tests/wtf/type_traits/is_convertible.cpp | 0 .../unit_tests/wtf/type_traits/is_floating_point.cpp | 0 .../unit_tests/wtf/type_traits/precision.cpp | 0 .../unit_tests/wtf/type_traits/tupple_append.cpp | 0 .../unit_tests/wtf/type_traits/type_name.cpp | 0 79 files changed, 6 insertions(+), 6 deletions(-) rename {cpp => cxx}/include/wtf/buffer/buffer.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/buffer_view.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/detail_/buffer_holder.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/detail_/buffer_view_holder.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/detail_/contiguous_model.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/detail_/contiguous_view_model.hpp (100%) rename {cpp => cxx}/include/wtf/buffer/float_buffer.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/concepts.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/float_buffer.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/floating_point.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/iterator.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/modifiers.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/stream_insertion.hpp (100%) rename {cpp => cxx}/include/wtf/concepts/wtf_float.hpp (100%) rename {cpp => cxx}/include/wtf/detail_/dispatcher.hpp (100%) rename {cpp => cxx}/include/wtf/detail_/downcaster.hpp (100%) rename {cpp => cxx}/include/wtf/detail_/variant_from_tuple.hpp (100%) rename {cpp => cxx}/include/wtf/forward.hpp (100%) rename {cpp => cxx}/include/wtf/fp/detail_/float_holder.hpp (100%) rename {cpp => cxx}/include/wtf/fp/detail_/float_model.hpp (100%) rename {cpp => cxx}/include/wtf/fp/detail_/float_view_holder.hpp (100%) rename {cpp => cxx}/include/wtf/fp/detail_/float_view_model.hpp (100%) rename {cpp => cxx}/include/wtf/fp/float.hpp (100%) rename {cpp => cxx}/include/wtf/fp/float_base.hpp (100%) rename {cpp => cxx}/include/wtf/fp/float_view.hpp (100%) rename {cpp => cxx}/include/wtf/fp/fp.hpp (100%) rename {cpp => cxx}/include/wtf/rtti/detail_/type_holder.hpp (100%) rename {cpp => cxx}/include/wtf/rtti/detail_/type_model.hpp (100%) rename {cpp => cxx}/include/wtf/rtti/rtti.hpp (100%) rename {cpp => cxx}/include/wtf/rtti/type_info.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/float_traits.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/is_convertible.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/is_floating_point.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/precision.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/tuple_append.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/type_name.hpp (100%) rename {cpp => cxx}/include/wtf/type_traits/type_traits.hpp (100%) rename {cpp => cxx}/include/wtf/types.hpp (100%) rename {cpp => cxx}/include/wtf/warnings.hpp (100%) rename {cpp => cxx}/include/wtf/wtf.hpp (100%) rename {cpp => cxx}/src/wtf/export_wtf.cpp (100%) rename {cpp => cxx}/src/wtf/export_wtf.hpp (100%) rename {cpp => cxx}/src/wtf/fp/detail_/float_holder.cpp (100%) rename {cpp => cxx}/src/wtf/fp/export_float.cpp (100%) rename {cpp => cxx}/src/wtf/fp/float.cpp (100%) rename {cpp => cxx}/src/wtf/rtti/detail_/type_holder.cpp (100%) rename {cpp => cxx}/src/wtf/rtti/type_info.cpp (100%) rename tests/{cpp => cxx}/test_wtf.hpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/buffer_view.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/detail_/buffer_holder.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/detail_/contiguous_model.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/buffer/float_buffer.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/concepts/floating_point.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/concepts/iterator.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/concepts/modifiers.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/concepts/stream_insertion.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/concepts/wtf_float.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/detail_/dispatcher.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/detail_/downcaster.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/detail_/variant_from_tuple.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/detail_/float_holder.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/detail_/float_model.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/detail_/float_view_holder.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/detail_/float_view_model.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/float.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/fp/float_view.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/main.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/rtti/detail_/type_holder.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/rtti/detail_/type_model.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/rtti/type_info.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/float_traits.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/is_convertible.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/is_floating_point.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/precision.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/tupple_append.cpp (100%) rename tests/{cpp => cxx}/unit_tests/wtf/type_traits/type_name.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 355ba71..65b8a9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,20 +29,20 @@ option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) # Define the documentation target include(nwx_cxx_api_docs) -nwx_cxx_api_docs("cpp/include" "cpp/src") +nwx_cxx_api_docs("cxx/include" "cxx/src") # Build the Library include(nwx_library) -nwx_library(${PROJECT_NAME} "cpp/include" "cpp/src") +nwx_library(${PROJECT_NAME} "cxx/include" "cxx/src") # Register the C++ tests include(catch2_tests_from_dir) catch2_tests_from_dir( - "unit_test_${PROJECT_NAME}" - "tests/cpp/unit_tests/${PROJECT_NAME}" - ${PROJECT_NAME} + "unit_test_${PROJECT_NAME}" + "tests/cxx/unit_tests/${PROJECT_NAME}" + ${PROJECT_NAME} ) # Register the Python module include(nwx_python_module) -nwx_python_module(${PROJECT_NAME}_python "cpp/src") +nwx_python_module(${PROJECT_NAME} "cxx/src") diff --git a/cpp/include/wtf/buffer/buffer.hpp b/cxx/include/wtf/buffer/buffer.hpp similarity index 100% rename from cpp/include/wtf/buffer/buffer.hpp rename to cxx/include/wtf/buffer/buffer.hpp diff --git a/cpp/include/wtf/buffer/buffer_view.hpp b/cxx/include/wtf/buffer/buffer_view.hpp similarity index 100% rename from cpp/include/wtf/buffer/buffer_view.hpp rename to cxx/include/wtf/buffer/buffer_view.hpp diff --git a/cpp/include/wtf/buffer/detail_/buffer_holder.hpp b/cxx/include/wtf/buffer/detail_/buffer_holder.hpp similarity index 100% rename from cpp/include/wtf/buffer/detail_/buffer_holder.hpp rename to cxx/include/wtf/buffer/detail_/buffer_holder.hpp diff --git a/cpp/include/wtf/buffer/detail_/buffer_view_holder.hpp b/cxx/include/wtf/buffer/detail_/buffer_view_holder.hpp similarity index 100% rename from cpp/include/wtf/buffer/detail_/buffer_view_holder.hpp rename to cxx/include/wtf/buffer/detail_/buffer_view_holder.hpp diff --git a/cpp/include/wtf/buffer/detail_/contiguous_model.hpp b/cxx/include/wtf/buffer/detail_/contiguous_model.hpp similarity index 100% rename from cpp/include/wtf/buffer/detail_/contiguous_model.hpp rename to cxx/include/wtf/buffer/detail_/contiguous_model.hpp diff --git a/cpp/include/wtf/buffer/detail_/contiguous_view_model.hpp b/cxx/include/wtf/buffer/detail_/contiguous_view_model.hpp similarity index 100% rename from cpp/include/wtf/buffer/detail_/contiguous_view_model.hpp rename to cxx/include/wtf/buffer/detail_/contiguous_view_model.hpp diff --git a/cpp/include/wtf/buffer/float_buffer.hpp b/cxx/include/wtf/buffer/float_buffer.hpp similarity index 100% rename from cpp/include/wtf/buffer/float_buffer.hpp rename to cxx/include/wtf/buffer/float_buffer.hpp diff --git a/cpp/include/wtf/concepts/concepts.hpp b/cxx/include/wtf/concepts/concepts.hpp similarity index 100% rename from cpp/include/wtf/concepts/concepts.hpp rename to cxx/include/wtf/concepts/concepts.hpp diff --git a/cpp/include/wtf/concepts/float_buffer.hpp b/cxx/include/wtf/concepts/float_buffer.hpp similarity index 100% rename from cpp/include/wtf/concepts/float_buffer.hpp rename to cxx/include/wtf/concepts/float_buffer.hpp diff --git a/cpp/include/wtf/concepts/floating_point.hpp b/cxx/include/wtf/concepts/floating_point.hpp similarity index 100% rename from cpp/include/wtf/concepts/floating_point.hpp rename to cxx/include/wtf/concepts/floating_point.hpp diff --git a/cpp/include/wtf/concepts/iterator.hpp b/cxx/include/wtf/concepts/iterator.hpp similarity index 100% rename from cpp/include/wtf/concepts/iterator.hpp rename to cxx/include/wtf/concepts/iterator.hpp diff --git a/cpp/include/wtf/concepts/modifiers.hpp b/cxx/include/wtf/concepts/modifiers.hpp similarity index 100% rename from cpp/include/wtf/concepts/modifiers.hpp rename to cxx/include/wtf/concepts/modifiers.hpp diff --git a/cpp/include/wtf/concepts/stream_insertion.hpp b/cxx/include/wtf/concepts/stream_insertion.hpp similarity index 100% rename from cpp/include/wtf/concepts/stream_insertion.hpp rename to cxx/include/wtf/concepts/stream_insertion.hpp diff --git a/cpp/include/wtf/concepts/wtf_float.hpp b/cxx/include/wtf/concepts/wtf_float.hpp similarity index 100% rename from cpp/include/wtf/concepts/wtf_float.hpp rename to cxx/include/wtf/concepts/wtf_float.hpp diff --git a/cpp/include/wtf/detail_/dispatcher.hpp b/cxx/include/wtf/detail_/dispatcher.hpp similarity index 100% rename from cpp/include/wtf/detail_/dispatcher.hpp rename to cxx/include/wtf/detail_/dispatcher.hpp diff --git a/cpp/include/wtf/detail_/downcaster.hpp b/cxx/include/wtf/detail_/downcaster.hpp similarity index 100% rename from cpp/include/wtf/detail_/downcaster.hpp rename to cxx/include/wtf/detail_/downcaster.hpp diff --git a/cpp/include/wtf/detail_/variant_from_tuple.hpp b/cxx/include/wtf/detail_/variant_from_tuple.hpp similarity index 100% rename from cpp/include/wtf/detail_/variant_from_tuple.hpp rename to cxx/include/wtf/detail_/variant_from_tuple.hpp diff --git a/cpp/include/wtf/forward.hpp b/cxx/include/wtf/forward.hpp similarity index 100% rename from cpp/include/wtf/forward.hpp rename to cxx/include/wtf/forward.hpp diff --git a/cpp/include/wtf/fp/detail_/float_holder.hpp b/cxx/include/wtf/fp/detail_/float_holder.hpp similarity index 100% rename from cpp/include/wtf/fp/detail_/float_holder.hpp rename to cxx/include/wtf/fp/detail_/float_holder.hpp diff --git a/cpp/include/wtf/fp/detail_/float_model.hpp b/cxx/include/wtf/fp/detail_/float_model.hpp similarity index 100% rename from cpp/include/wtf/fp/detail_/float_model.hpp rename to cxx/include/wtf/fp/detail_/float_model.hpp diff --git a/cpp/include/wtf/fp/detail_/float_view_holder.hpp b/cxx/include/wtf/fp/detail_/float_view_holder.hpp similarity index 100% rename from cpp/include/wtf/fp/detail_/float_view_holder.hpp rename to cxx/include/wtf/fp/detail_/float_view_holder.hpp diff --git a/cpp/include/wtf/fp/detail_/float_view_model.hpp b/cxx/include/wtf/fp/detail_/float_view_model.hpp similarity index 100% rename from cpp/include/wtf/fp/detail_/float_view_model.hpp rename to cxx/include/wtf/fp/detail_/float_view_model.hpp diff --git a/cpp/include/wtf/fp/float.hpp b/cxx/include/wtf/fp/float.hpp similarity index 100% rename from cpp/include/wtf/fp/float.hpp rename to cxx/include/wtf/fp/float.hpp diff --git a/cpp/include/wtf/fp/float_base.hpp b/cxx/include/wtf/fp/float_base.hpp similarity index 100% rename from cpp/include/wtf/fp/float_base.hpp rename to cxx/include/wtf/fp/float_base.hpp diff --git a/cpp/include/wtf/fp/float_view.hpp b/cxx/include/wtf/fp/float_view.hpp similarity index 100% rename from cpp/include/wtf/fp/float_view.hpp rename to cxx/include/wtf/fp/float_view.hpp diff --git a/cpp/include/wtf/fp/fp.hpp b/cxx/include/wtf/fp/fp.hpp similarity index 100% rename from cpp/include/wtf/fp/fp.hpp rename to cxx/include/wtf/fp/fp.hpp diff --git a/cpp/include/wtf/rtti/detail_/type_holder.hpp b/cxx/include/wtf/rtti/detail_/type_holder.hpp similarity index 100% rename from cpp/include/wtf/rtti/detail_/type_holder.hpp rename to cxx/include/wtf/rtti/detail_/type_holder.hpp diff --git a/cpp/include/wtf/rtti/detail_/type_model.hpp b/cxx/include/wtf/rtti/detail_/type_model.hpp similarity index 100% rename from cpp/include/wtf/rtti/detail_/type_model.hpp rename to cxx/include/wtf/rtti/detail_/type_model.hpp diff --git a/cpp/include/wtf/rtti/rtti.hpp b/cxx/include/wtf/rtti/rtti.hpp similarity index 100% rename from cpp/include/wtf/rtti/rtti.hpp rename to cxx/include/wtf/rtti/rtti.hpp diff --git a/cpp/include/wtf/rtti/type_info.hpp b/cxx/include/wtf/rtti/type_info.hpp similarity index 100% rename from cpp/include/wtf/rtti/type_info.hpp rename to cxx/include/wtf/rtti/type_info.hpp diff --git a/cpp/include/wtf/type_traits/float_traits.hpp b/cxx/include/wtf/type_traits/float_traits.hpp similarity index 100% rename from cpp/include/wtf/type_traits/float_traits.hpp rename to cxx/include/wtf/type_traits/float_traits.hpp diff --git a/cpp/include/wtf/type_traits/is_convertible.hpp b/cxx/include/wtf/type_traits/is_convertible.hpp similarity index 100% rename from cpp/include/wtf/type_traits/is_convertible.hpp rename to cxx/include/wtf/type_traits/is_convertible.hpp diff --git a/cpp/include/wtf/type_traits/is_floating_point.hpp b/cxx/include/wtf/type_traits/is_floating_point.hpp similarity index 100% rename from cpp/include/wtf/type_traits/is_floating_point.hpp rename to cxx/include/wtf/type_traits/is_floating_point.hpp diff --git a/cpp/include/wtf/type_traits/precision.hpp b/cxx/include/wtf/type_traits/precision.hpp similarity index 100% rename from cpp/include/wtf/type_traits/precision.hpp rename to cxx/include/wtf/type_traits/precision.hpp diff --git a/cpp/include/wtf/type_traits/tuple_append.hpp b/cxx/include/wtf/type_traits/tuple_append.hpp similarity index 100% rename from cpp/include/wtf/type_traits/tuple_append.hpp rename to cxx/include/wtf/type_traits/tuple_append.hpp diff --git a/cpp/include/wtf/type_traits/type_name.hpp b/cxx/include/wtf/type_traits/type_name.hpp similarity index 100% rename from cpp/include/wtf/type_traits/type_name.hpp rename to cxx/include/wtf/type_traits/type_name.hpp diff --git a/cpp/include/wtf/type_traits/type_traits.hpp b/cxx/include/wtf/type_traits/type_traits.hpp similarity index 100% rename from cpp/include/wtf/type_traits/type_traits.hpp rename to cxx/include/wtf/type_traits/type_traits.hpp diff --git a/cpp/include/wtf/types.hpp b/cxx/include/wtf/types.hpp similarity index 100% rename from cpp/include/wtf/types.hpp rename to cxx/include/wtf/types.hpp diff --git a/cpp/include/wtf/warnings.hpp b/cxx/include/wtf/warnings.hpp similarity index 100% rename from cpp/include/wtf/warnings.hpp rename to cxx/include/wtf/warnings.hpp diff --git a/cpp/include/wtf/wtf.hpp b/cxx/include/wtf/wtf.hpp similarity index 100% rename from cpp/include/wtf/wtf.hpp rename to cxx/include/wtf/wtf.hpp diff --git a/cpp/src/wtf/export_wtf.cpp b/cxx/src/wtf/export_wtf.cpp similarity index 100% rename from cpp/src/wtf/export_wtf.cpp rename to cxx/src/wtf/export_wtf.cpp diff --git a/cpp/src/wtf/export_wtf.hpp b/cxx/src/wtf/export_wtf.hpp similarity index 100% rename from cpp/src/wtf/export_wtf.hpp rename to cxx/src/wtf/export_wtf.hpp diff --git a/cpp/src/wtf/fp/detail_/float_holder.cpp b/cxx/src/wtf/fp/detail_/float_holder.cpp similarity index 100% rename from cpp/src/wtf/fp/detail_/float_holder.cpp rename to cxx/src/wtf/fp/detail_/float_holder.cpp diff --git a/cpp/src/wtf/fp/export_float.cpp b/cxx/src/wtf/fp/export_float.cpp similarity index 100% rename from cpp/src/wtf/fp/export_float.cpp rename to cxx/src/wtf/fp/export_float.cpp diff --git a/cpp/src/wtf/fp/float.cpp b/cxx/src/wtf/fp/float.cpp similarity index 100% rename from cpp/src/wtf/fp/float.cpp rename to cxx/src/wtf/fp/float.cpp diff --git a/cpp/src/wtf/rtti/detail_/type_holder.cpp b/cxx/src/wtf/rtti/detail_/type_holder.cpp similarity index 100% rename from cpp/src/wtf/rtti/detail_/type_holder.cpp rename to cxx/src/wtf/rtti/detail_/type_holder.cpp diff --git a/cpp/src/wtf/rtti/type_info.cpp b/cxx/src/wtf/rtti/type_info.cpp similarity index 100% rename from cpp/src/wtf/rtti/type_info.cpp rename to cxx/src/wtf/rtti/type_info.cpp diff --git a/tests/cpp/test_wtf.hpp b/tests/cxx/test_wtf.hpp similarity index 100% rename from tests/cpp/test_wtf.hpp rename to tests/cxx/test_wtf.hpp diff --git a/tests/cpp/unit_tests/wtf/buffer/buffer_view.cpp b/tests/cxx/unit_tests/wtf/buffer/buffer_view.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/buffer_view.cpp rename to tests/cxx/unit_tests/wtf/buffer/buffer_view.cpp diff --git a/tests/cpp/unit_tests/wtf/buffer/detail_/buffer_holder.cpp b/tests/cxx/unit_tests/wtf/buffer/detail_/buffer_holder.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/detail_/buffer_holder.cpp rename to tests/cxx/unit_tests/wtf/buffer/detail_/buffer_holder.cpp diff --git a/tests/cpp/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp b/tests/cxx/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp rename to tests/cxx/unit_tests/wtf/buffer/detail_/buffer_view_holder.cpp diff --git a/tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_model.cpp b/tests/cxx/unit_tests/wtf/buffer/detail_/contiguous_model.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_model.cpp rename to tests/cxx/unit_tests/wtf/buffer/detail_/contiguous_model.cpp diff --git a/tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp b/tests/cxx/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp rename to tests/cxx/unit_tests/wtf/buffer/detail_/contiguous_view_model.cpp diff --git a/tests/cpp/unit_tests/wtf/buffer/float_buffer.cpp b/tests/cxx/unit_tests/wtf/buffer/float_buffer.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/buffer/float_buffer.cpp rename to tests/cxx/unit_tests/wtf/buffer/float_buffer.cpp diff --git a/tests/cpp/unit_tests/wtf/concepts/floating_point.cpp b/tests/cxx/unit_tests/wtf/concepts/floating_point.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/concepts/floating_point.cpp rename to tests/cxx/unit_tests/wtf/concepts/floating_point.cpp diff --git a/tests/cpp/unit_tests/wtf/concepts/iterator.cpp b/tests/cxx/unit_tests/wtf/concepts/iterator.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/concepts/iterator.cpp rename to tests/cxx/unit_tests/wtf/concepts/iterator.cpp diff --git a/tests/cpp/unit_tests/wtf/concepts/modifiers.cpp b/tests/cxx/unit_tests/wtf/concepts/modifiers.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/concepts/modifiers.cpp rename to tests/cxx/unit_tests/wtf/concepts/modifiers.cpp diff --git a/tests/cpp/unit_tests/wtf/concepts/stream_insertion.cpp b/tests/cxx/unit_tests/wtf/concepts/stream_insertion.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/concepts/stream_insertion.cpp rename to tests/cxx/unit_tests/wtf/concepts/stream_insertion.cpp diff --git a/tests/cpp/unit_tests/wtf/concepts/wtf_float.cpp b/tests/cxx/unit_tests/wtf/concepts/wtf_float.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/concepts/wtf_float.cpp rename to tests/cxx/unit_tests/wtf/concepts/wtf_float.cpp diff --git a/tests/cpp/unit_tests/wtf/detail_/dispatcher.cpp b/tests/cxx/unit_tests/wtf/detail_/dispatcher.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/detail_/dispatcher.cpp rename to tests/cxx/unit_tests/wtf/detail_/dispatcher.cpp diff --git a/tests/cpp/unit_tests/wtf/detail_/downcaster.cpp b/tests/cxx/unit_tests/wtf/detail_/downcaster.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/detail_/downcaster.cpp rename to tests/cxx/unit_tests/wtf/detail_/downcaster.cpp diff --git a/tests/cpp/unit_tests/wtf/detail_/variant_from_tuple.cpp b/tests/cxx/unit_tests/wtf/detail_/variant_from_tuple.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/detail_/variant_from_tuple.cpp rename to tests/cxx/unit_tests/wtf/detail_/variant_from_tuple.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/detail_/float_holder.cpp b/tests/cxx/unit_tests/wtf/fp/detail_/float_holder.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/detail_/float_holder.cpp rename to tests/cxx/unit_tests/wtf/fp/detail_/float_holder.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/detail_/float_model.cpp b/tests/cxx/unit_tests/wtf/fp/detail_/float_model.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/detail_/float_model.cpp rename to tests/cxx/unit_tests/wtf/fp/detail_/float_model.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/detail_/float_view_holder.cpp b/tests/cxx/unit_tests/wtf/fp/detail_/float_view_holder.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/detail_/float_view_holder.cpp rename to tests/cxx/unit_tests/wtf/fp/detail_/float_view_holder.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/detail_/float_view_model.cpp b/tests/cxx/unit_tests/wtf/fp/detail_/float_view_model.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/detail_/float_view_model.cpp rename to tests/cxx/unit_tests/wtf/fp/detail_/float_view_model.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/float.cpp b/tests/cxx/unit_tests/wtf/fp/float.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/float.cpp rename to tests/cxx/unit_tests/wtf/fp/float.cpp diff --git a/tests/cpp/unit_tests/wtf/fp/float_view.cpp b/tests/cxx/unit_tests/wtf/fp/float_view.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/fp/float_view.cpp rename to tests/cxx/unit_tests/wtf/fp/float_view.cpp diff --git a/tests/cpp/unit_tests/wtf/main.cpp b/tests/cxx/unit_tests/wtf/main.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/main.cpp rename to tests/cxx/unit_tests/wtf/main.cpp diff --git a/tests/cpp/unit_tests/wtf/rtti/detail_/type_holder.cpp b/tests/cxx/unit_tests/wtf/rtti/detail_/type_holder.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/rtti/detail_/type_holder.cpp rename to tests/cxx/unit_tests/wtf/rtti/detail_/type_holder.cpp diff --git a/tests/cpp/unit_tests/wtf/rtti/detail_/type_model.cpp b/tests/cxx/unit_tests/wtf/rtti/detail_/type_model.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/rtti/detail_/type_model.cpp rename to tests/cxx/unit_tests/wtf/rtti/detail_/type_model.cpp diff --git a/tests/cpp/unit_tests/wtf/rtti/type_info.cpp b/tests/cxx/unit_tests/wtf/rtti/type_info.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/rtti/type_info.cpp rename to tests/cxx/unit_tests/wtf/rtti/type_info.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/float_traits.cpp b/tests/cxx/unit_tests/wtf/type_traits/float_traits.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/float_traits.cpp rename to tests/cxx/unit_tests/wtf/type_traits/float_traits.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/is_convertible.cpp b/tests/cxx/unit_tests/wtf/type_traits/is_convertible.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/is_convertible.cpp rename to tests/cxx/unit_tests/wtf/type_traits/is_convertible.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/is_floating_point.cpp b/tests/cxx/unit_tests/wtf/type_traits/is_floating_point.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/is_floating_point.cpp rename to tests/cxx/unit_tests/wtf/type_traits/is_floating_point.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/precision.cpp b/tests/cxx/unit_tests/wtf/type_traits/precision.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/precision.cpp rename to tests/cxx/unit_tests/wtf/type_traits/precision.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/tupple_append.cpp b/tests/cxx/unit_tests/wtf/type_traits/tupple_append.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/tupple_append.cpp rename to tests/cxx/unit_tests/wtf/type_traits/tupple_append.cpp diff --git a/tests/cpp/unit_tests/wtf/type_traits/type_name.cpp b/tests/cxx/unit_tests/wtf/type_traits/type_name.cpp similarity index 100% rename from tests/cpp/unit_tests/wtf/type_traits/type_name.cpp rename to tests/cxx/unit_tests/wtf/type_traits/type_name.cpp From 4ed875b1735773a8fbbdf8a7f3a6075f970c7d15 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 17 Apr 2026 13:37:35 -0500 Subject: [PATCH 19/20] adds bump version step --- .github/workflows/pull_request.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index d201fac..8d975d9 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -76,6 +76,34 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Bump version for TestPyPI (unique per workflow invocation) + run: | + python3 <<'PY' + import os + import re + from pathlib import Path + + path = Path("pyproject.toml") + text = path.read_text(encoding="utf-8") + m = re.search(r'(?m)^version = "([^"]+)"', text) + if not m: + raise SystemExit("Could not find project version in pyproject.toml") + base = m.group(1) + # GITHUB_RUN_ID is unique for every run including "re-run failed jobs" + rid = os.environ["GITHUB_RUN_ID"] + new_ver = f"{base}.dev{rid}" + text, n = re.subn( + r'(?m)^version = "[^"]+"', + f'version = "{new_ver}"', + text, + count=1, + ) + if n != 1: + raise SystemExit(f"expected 1 version line updated, got {n}") + path.write_text(text, encoding="utf-8") + print(f"Version set to {new_ver} for wheel upload") + PY + - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: From f54b63bdb8d111a9f2142ae647ed096b8637fb72 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 17 Apr 2026 17:28:32 -0500 Subject: [PATCH 20/20] get version from git --- .github/workflows/pull_request.yaml | 41 +++++++++++++---------------- CMakeLists.txt | 16 ++++++++++- pyproject.toml | 8 ++++-- 3 files changed, 40 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 8d975d9..795b641 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -38,6 +38,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Install clang-18 run: | @@ -75,33 +77,28 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Bump version for TestPyPI (unique per workflow invocation) + - name: Set pretend version for TestPyPI (unique per workflow run) run: | + python3 -m pip install --upgrade pip + python3 -m pip install "setuptools-scm>=8" python3 <<'PY' import os - import re - from pathlib import Path - - path = Path("pyproject.toml") - text = path.read_text(encoding="utf-8") - m = re.search(r'(?m)^version = "([^"]+)"', text) - if not m: - raise SystemExit("Could not find project version in pyproject.toml") - base = m.group(1) - # GITHUB_RUN_ID is unique for every run including "re-run failed jobs" + + from setuptools_scm import get_version + + gh_env = os.environ.get("GITHUB_ENV") + if not gh_env: + raise SystemExit("GITHUB_ENV is not set") + + base = get_version(local_scheme="no-local-version") rid = os.environ["GITHUB_RUN_ID"] - new_ver = f"{base}.dev{rid}" - text, n = re.subn( - r'(?m)^version = "[^"]+"', - f'version = "{new_ver}"', - text, - count=1, - ) - if n != 1: - raise SystemExit(f"expected 1 version line updated, got {n}") - path.write_text(text, encoding="utf-8") - print(f"Version set to {new_ver} for wheel upload") + pretend = f"{base}.post{rid}" + with open(gh_env, "a", encoding="utf-8") as f: + f.write(f"SETUPTOOLS_SCM_PRETEND_VERSION={pretend}\n") + print(f"SETUPTOOLS_SCM_PRETEND_VERSION={pretend}") PY - name: Build wheels diff --git a/CMakeLists.txt b/CMakeLists.txt index 65b8a9b..1ad90f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,22 @@ # limitations under the License. cmake_minimum_required(VERSION 3.14) + +# Version from scikit-build-core when building wheels/sdists; plain CMake keeps 1.0.0. +# project(VERSION) accepts only numeric major.minor.patch[.tweak]; strip any PEP440 suffix. +if(DEFINED SKBUILD_PROJECT_VERSION AND NOT SKBUILD_PROJECT_VERSION STREQUAL "") + set(_wtf_version_source "${SKBUILD_PROJECT_VERSION}") +else() + set(_wtf_version_source "1.0.0") +endif() +if(_wtf_version_source MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)") + set(_wtf_cmake_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") +else() + set(_wtf_cmake_version "1.0.0") +endif() + # Downloads common CMake modules used throughout NWChemEx -project(wtf VERSION "1.0.0" LANGUAGES CXX) +project(wtf VERSION "${_wtf_cmake_version}" LANGUAGES CXX) include(cmake/get_nwx_cmake.cmake) diff --git a/pyproject.toml b/pyproject.toml index 545676c..45a0bbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,12 +13,12 @@ # limitations under the License. [build-system] -requires = ["scikit-build-core>=0.10", "pybind11"] +requires = ["scikit-build-core>=0.10", "pybind11", "setuptools-scm>=8"] build-backend = "scikit_build_core.build" [project] name = "weaklytypedfloat" -version = "1.0.0" +dynamic = ["version"] description = "Weakly Typed Float — a DSL for type-erased floating-point types" license = { text = "Apache-2.0" } requires-python = ">=3.8" @@ -27,11 +27,15 @@ requires-python = ">=3.8" dev = ["pytest"] [tool.scikit-build] +metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" cmake.build-type = "Release" cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=OFF"] wheel.packages = [] build-dir = "build" +[tool.setuptools_scm] +fallback_version = "0.0.0" + [[tool.scikit-build.overrides]] if.state = "editable" cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=ON"]