From 3f06628b7596162a82216c6e81d7761103d1fc1b Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 22 Apr 2022 14:15:36 -0600 Subject: [PATCH 01/32] Started work on re-enabling support for bifrost.ndarray.astype(). --- python/bifrost/ndarray.py | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/python/bifrost/ndarray.py b/python/bifrost/ndarray.py index aaff6d457..53f5682b2 100644 --- a/python/bifrost/ndarray.py +++ b/python/bifrost/ndarray.py @@ -45,7 +45,7 @@ import ctypes import numpy as np from bifrost.memory import raw_malloc, raw_free, raw_get_space, space_accessible -from bifrost.libbifrost import _bf, _check +from bifrost.libbifrost import _bf, _check, _array from bifrost import device from bifrost.DataType import DataType from bifrost.Space import Space @@ -358,13 +358,34 @@ def view(self, dtype=None, type_=None): v.bf.dtype = dtype_bf v._update_BFarray() return v - #def astype(self, dtype): - # dtype_bf = DataType(dtype) - # dtype_np = dtype_bf.as_numpy_dtype() - # # TODO: This segfaults for cuda space; need type conversion support in backend - # a = super(ndarray, self).astype(dtype_np) - # a.bf.dtype = dtype_bf - # return a + def astype(self, dtype): + dtype_bf = DataType(dtype) + dtype_np = dtype_bf.as_numpy_dtype() + if space_accessible(self.bf.space, ['system']): + ## For arrays that can be accessed from the system space, use + ## numpy.ndarray.copy() to do the heavy lifting + if self.bf.space == 'cuda_managed': + ## TODO: Decide where/when these need to be called + device.stream_synchronize() + a = super(ndarray, self).astype(dtype_np) + a.bf.dtype = dtype_bf + else: + a = ndarray(shape=self.shape, dtype=dtype_bf, space=self.bf.space) + if dtype_bf.is_complex: + if self.bf.dtype.is_complex: + func_string = b'a.real = b.real; a.imag = b.imag' + else: + func_string = b'a.real = b; a.imag = 0' + else: + if self.bf.dtype.is_complex: + np.ComplexWarning() + func_string = b'a = b.real' + else: + func_string = b'a = b' + _check(_bf.bfMap(0, _array(None, dtype=ctypes.c_long), _array(None), + 2, _array([a.as_BFarray(), self.as_BFarray()]), _array(['a', 'b']), + None, func_string, None, _array(None), _array(None))) + return a def _system_accessible_copy(self): if space_accessible(self.bf.space, ['system']): return self From 81e43f902a7e59f9b9f33bbeda3458767b539d11 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 22 Apr 2022 14:16:05 -0600 Subject: [PATCH 02/32] Start trying out astype(). --- test/test_ndarray.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/test_ndarray.py b/test/test_ndarray.py index fe9b3c8bb..d32e708a8 100644 --- a/test/test_ndarray.py +++ b/test/test_ndarray.py @@ -31,6 +31,7 @@ import ctypes from bifrost.libbifrost_generated import BF_CUDA_ENABLED +from bifrost.dtype import split_name_nbit, name_nbit2numpy as dtype_bf2np class NDArrayTest(unittest.TestCase): def setUp(self): @@ -152,3 +153,37 @@ def test_setitem(self): np.testing.assert_equal(g.copy('system'), np.array([[99,88],[2,3],[4,5]])) g[:,1] = [77,66,55] np.testing.assert_equal(g.copy('system'), np.array([[99,77],[2,66],[4,55]])) + def run_type_conversion(self, space='system'): + # Real + a = np.array(self.known_vals, dtype=np.float32) + c = bf.ndarray(a, dtype='f32', space=space) + for dtype in ('i8', 'i16', 'i32', 'i64', 'f64', 'cf64'): + np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + if space == 'cuda': + print(dtype, '->', np_dtype) + b = a.astype(np_dtype) + d = c.astype(dtype) + d = d.copy(space='system') + np.testing.assert_equal(b, d) + + # Complex + a = np.array(self.known_vals, dtype=np.float32) + a = np.stack([a,a[::-1]], axis=0) + a = a.view(np.complex64) + c = bf.ndarray(a, dtype='cf32', space=space) + for dtype in ('ci8', 'ci16', 'ci32', 'cf64', 'i8', 'i16', 'i32', 'i64', 'f64'): + np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + b = a.astype(np_dtype) + d = c.astype(dtype) + d = d.copy(space='system') + if space == 'cuda': + print(dtype, '->', np_dtype) + print(b) + print(d) + np.testing.assert_equal(b, d) + + def test_type_conversion(self): + self.run_type_conversion() + @unittest.skipUnless(BF_CUDA_ENABLED, "requires GPU support") + def test_space_type_conversion(self): + self.run_type_conversion(space='cuda') From 298b96c3694d54ec53a5d22255ef9c7df4e76d09 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 26 Apr 2022 09:35:21 -0600 Subject: [PATCH 03/32] Fixed a few problems and better test coverage. --- python/bifrost/ndarray.py | 8 +++++- test/test_ndarray.py | 59 ++++++++++++++++++++++----------------- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/python/bifrost/ndarray.py b/python/bifrost/ndarray.py index 53f5682b2..ca52ad333 100644 --- a/python/bifrost/ndarray.py +++ b/python/bifrost/ndarray.py @@ -367,7 +367,13 @@ def astype(self, dtype): if self.bf.space == 'cuda_managed': ## TODO: Decide where/when these need to be called device.stream_synchronize() - a = super(ndarray, self).astype(dtype_np) + if dtype_bf.is_complex and dtype_bf.is_integer: + ## Catch for the complex integer types + a = ndarray(shape=self.shape, dtype=dtype_bf) + a['re'] = self.real.astype(dtype_bf.as_real()) + a['im'] = self.imag.astype(dtype_bf.as_real()) + else: + a = super(ndarray, self).astype(dtype_np) a.bf.dtype = dtype_bf else: a = ndarray(shape=self.shape, dtype=dtype_bf, space=self.bf.space) diff --git a/test/test_ndarray.py b/test/test_ndarray.py index d32e708a8..866de215b 100644 --- a/test/test_ndarray.py +++ b/test/test_ndarray.py @@ -155,33 +155,40 @@ def test_setitem(self): np.testing.assert_equal(g.copy('system'), np.array([[99,77],[2,66],[4,55]])) def run_type_conversion(self, space='system'): # Real - a = np.array(self.known_vals, dtype=np.float32) - c = bf.ndarray(a, dtype='f32', space=space) - for dtype in ('i8', 'i16', 'i32', 'i64', 'f64', 'cf64'): - np_dtype = dtype_bf2np(*split_name_nbit(dtype)) - if space == 'cuda': - print(dtype, '->', np_dtype) - b = a.astype(np_dtype) - d = c.astype(dtype) - d = d.copy(space='system') - np.testing.assert_equal(b, d) - + for dtype_in in (np.int8, np.int16, np.int32, np.float32, np.float64): + a = np.array(self.known_vals, dtype=dtype_in) + c = bf.ndarray(a, dtype=dtype_in, space=space) + for dtype in ('i8', 'i16', 'i32', 'i64', 'f64', 'ci8', 'ci16', 'ci32', 'cf32', 'cf64'): + np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + try: + ## Catch for the complex integer types + len(np_dtype) + b = np.zeros(a.shape, dtype=np_dtype) + b['re'] = a + except TypeError: + b = a.astype(np_dtype) + d = c.astype(dtype) + d = d.copy(space='system') + np.testing.assert_equal(b, d) # Complex - a = np.array(self.known_vals, dtype=np.float32) - a = np.stack([a,a[::-1]], axis=0) - a = a.view(np.complex64) - c = bf.ndarray(a, dtype='cf32', space=space) - for dtype in ('ci8', 'ci16', 'ci32', 'cf64', 'i8', 'i16', 'i32', 'i64', 'f64'): - np_dtype = dtype_bf2np(*split_name_nbit(dtype)) - b = a.astype(np_dtype) - d = c.astype(dtype) - d = d.copy(space='system') - if space == 'cuda': - print(dtype, '->', np_dtype) - print(b) - print(d) - np.testing.assert_equal(b, d) - + for dtype_in,dtype_in_cmplx in zip((np.float32,np.float64), ('cf32', 'cf64')): + a = np.array(self.known_vals, dtype=dtype_in) + a = np.stack([a,a[::-1]], axis=0) + a = a.view(np.complex64) + c = bf.ndarray(a, dtype=dtype_in_cmplx, space=space) + for dtype in ('ci8', 'ci16', 'ci32', 'cf32', 'cf64', 'i8', 'i16', 'i32', 'i64', 'f64'): + np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + try: + ## Catch for the complex integer types + len(np_dtype) + b = np.zeros(a.shape, dtype=np_dtype) + b['re'] = a.real + b['im'] = a.imag + except TypeError: + b = a.astype(np_dtype) + d = c.astype(dtype) + d = d.copy(space='system') + np.testing.assert_equal(b, d) def test_type_conversion(self): self.run_type_conversion() @unittest.skipUnless(BF_CUDA_ENABLED, "requires GPU support") From a57e699a2c286aa5933b7793975b67c300e6bb4d Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 26 Apr 2022 12:32:23 -0600 Subject: [PATCH 04/32] Updated for astype(). --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index c9546019f..1bc19cd5c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ * Added horizontal scrolling for long command names to like_bmon.py * Use std::filesystem for where possible for file and directory management * Fixed a problem in bifrost.ndarray.copy with arrays that are not C contiguous + * Added the astype() method to `bifrost.ndarray` 0.10.0 * Switched over to an autotools-based build system From 39526ac478322097c8ab2328ed496104473eadd3 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 29 Apr 2022 13:25:47 -0600 Subject: [PATCH 05/32] Use bifrost.DataType instead of bifrost.dtype. --- test/test_ndarray.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_ndarray.py b/test/test_ndarray.py index 866de215b..21881f62c 100644 --- a/test/test_ndarray.py +++ b/test/test_ndarray.py @@ -31,7 +31,7 @@ import ctypes from bifrost.libbifrost_generated import BF_CUDA_ENABLED -from bifrost.dtype import split_name_nbit, name_nbit2numpy as dtype_bf2np +from bifrost.DataType import DataType class NDArrayTest(unittest.TestCase): def setUp(self): @@ -159,7 +159,7 @@ def run_type_conversion(self, space='system'): a = np.array(self.known_vals, dtype=dtype_in) c = bf.ndarray(a, dtype=dtype_in, space=space) for dtype in ('i8', 'i16', 'i32', 'i64', 'f64', 'ci8', 'ci16', 'ci32', 'cf32', 'cf64'): - np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + np_dtype = DataType(dtype).as_numpy_dtype() try: ## Catch for the complex integer types len(np_dtype) @@ -177,7 +177,7 @@ def run_type_conversion(self, space='system'): a = a.view(np.complex64) c = bf.ndarray(a, dtype=dtype_in_cmplx, space=space) for dtype in ('ci8', 'ci16', 'ci32', 'cf32', 'cf64', 'i8', 'i16', 'i32', 'i64', 'f64'): - np_dtype = dtype_bf2np(*split_name_nbit(dtype)) + np_dtype = DataType(dtype).as_numpy_dtype() try: ## Catch for the complex integer types len(np_dtype) From 0bb8c61c5ac81e4c252a97ffd64a4f55123614ef Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 29 Apr 2022 13:31:25 -0600 Subject: [PATCH 06/32] Add a catch for IndexError. --- test/test_ndarray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_ndarray.py b/test/test_ndarray.py index 21881f62c..4cfa1cd07 100644 --- a/test/test_ndarray.py +++ b/test/test_ndarray.py @@ -165,7 +165,7 @@ def run_type_conversion(self, space='system'): len(np_dtype) b = np.zeros(a.shape, dtype=np_dtype) b['re'] = a - except TypeError: + except (IndexError, TypeError): b = a.astype(np_dtype) d = c.astype(dtype) d = d.copy(space='system') @@ -184,7 +184,7 @@ def run_type_conversion(self, space='system'): b = np.zeros(a.shape, dtype=np_dtype) b['re'] = a.real b['im'] = a.imag - except TypeError: + except (IndexError, TypeError): b = a.astype(np_dtype) d = c.astype(dtype) d = d.copy(space='system') From 7dc1c5cd6919501b39757cc6db5d05d9049285b0 Mon Sep 17 00:00:00 2001 From: Christopher League Date: Mon, 19 Feb 2024 11:41:07 -0500 Subject: [PATCH 07/32] Explicitly include cstdint for gcc13 (#227) https://gcc.gnu.org/gcc-13/porting_to.html --- src/trace.hpp | 1 + src/utils.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/trace.hpp b/src/trace.hpp index 13a127d0a..35aad52be 100644 --- a/src/trace.hpp +++ b/src/trace.hpp @@ -39,6 +39,7 @@ #include #include #include +#include #if BF_TRACE_ENABLED // Note: __PRETTY_FUNCTION__ is GCC-specific diff --git a/src/utils.hpp b/src/utils.hpp index db9b0d03b..32219dcd0 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -39,6 +39,7 @@ #include #include #include // For ::memcpy +#include #include #define BF_DTYPE_IS_COMPLEX(dtype) bool((dtype) & BF_DTYPE_COMPLEX_BIT) From 898e4a821512c53947cc63a462a06948c77b12a6 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 20 Feb 2024 07:59:31 -0700 Subject: [PATCH 08/32] Small update to test #228. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2fa6c2f71..975241238 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: gawk \ gnu-sed \ pkg-config - - uses: actions/setup-python@v4.3.0 + - uses: actions/setup-python@v5.0.0 with: python-version: ${{ matrix.python-version }} - name: "Software Install - Python" From de72fabd811df12c68ab338335db645f5870312b Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 20 Feb 2024 09:10:28 -0700 Subject: [PATCH 09/32] Another small update to test #228. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 975241238..9386f2708 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -119,7 +119,7 @@ jobs: UNITTEST_OS: ${{ matrix.os }} UNITTEST_PY: ${{ matrix.python-version }} if: ${{ matrix.os == 'self-hosted' && matrix.python-version == '3.8' }} - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: files: ./test/coverage.xml, ./testbench/coverage.xml env_vars: UNITTEST_OS,UNITTEST_PY From 56b84d2ab61150caa1e5ff3f490182519134f7be Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 15 Mar 2024 16:03:31 -0600 Subject: [PATCH 10/32] Update which version of ctypesgen to use. --- tutorial/00_getting_started.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/00_getting_started.ipynb b/tutorial/00_getting_started.ipynb index 67642df8f..32f0e7cab 100644 --- a/tutorial/00_getting_started.ipynb +++ b/tutorial/00_getting_started.ipynb @@ -38,7 +38,7 @@ " try:\n", " import google.colab\n", " !sudo apt-get -qq install exuberant-ctags libopenblas-dev software-properties-common build-essential\n", - " !pip install -q contextlib2 pint simplejson scipy git+https://github.com/ctypesgen/ctypesgen.git\n", + " !pip install -q contextlib2 pint simplejson scipy ctypesgen==1.0.2\n", " ![ -d ~/bifrost/.git ] || git clone https://github.com/ledatelescope/bifrost ~/bifrost\n", " !(cd ~/bifrost && ./configure && make -j all && sudo make install)\n", " import bifrost\n", @@ -553,4 +553,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} From b706d5eb849744d7bec94e0855d5a8631871dcf5 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 15 Mar 2024 17:12:08 -0600 Subject: [PATCH 11/32] Bad merge. --- test/test_ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_ndarray.py b/test/test_ndarray.py index ed8ba351f..267ac7a68 100644 --- a/test/test_ndarray.py +++ b/test/test_ndarray.py @@ -204,4 +204,4 @@ def test_BFarray(self): a = bf.ndarray(np.arange(100), dtype='cf32') aa = a.as_BFarray() b = bf.ndarray(aa) - np.testing.assert_equal(a, b) + np.testing.assert_equal(a, b) From 02434e29d35272aa4170818b0137448f3d4c0f10 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 19 Mar 2024 11:24:13 -0600 Subject: [PATCH 12/32] Better comments plus formatting fixes. --- python/bifrost/ndarray.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/python/bifrost/ndarray.py b/python/bifrost/ndarray.py index b376affd3..47f31acd7 100644 --- a/python/bifrost/ndarray.py +++ b/python/bifrost/ndarray.py @@ -1,5 +1,5 @@ -# Copyright (c) 2016-2023, The Bifrost Authors. All rights reserved. +# Copyright (c) 2016-2024, The Bifrost Authors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -353,11 +353,11 @@ def view(self, dtype=None, type_=None): v._update_BFarray() return v def astype(self, dtype): - dtype_bf = DataType(dtype) - dtype_np = dtype_bf.as_numpy_dtype() - if space_accessible(self.bf.space, ['system']): + dtype_bf = DataType(dtype) + if space_accessible(self.bf.space, ['system']): ## For arrays that can be accessed from the system space, use ## numpy.ndarray.copy() to do the heavy lifting + dtype_np = dtype_bf.as_numpy_dtype() if self.bf.space == 'cuda_managed': ## TODO: Decide where/when these need to be called device.stream_synchronize() @@ -369,18 +369,25 @@ def astype(self, dtype): else: a = super(ndarray, self).astype(dtype_np) a.bf.dtype = dtype_bf - else: + else: + ## For arrays that can be access from CUDA, use bifrost.map + ## to do the heavy lifting + ## TODO: Would it be better to use quantize/unpack instead of map? a = ndarray(shape=self.shape, dtype=dtype_bf, space=self.bf.space) if dtype_bf.is_complex: if self.bf.dtype.is_complex: + ## complex in -> complex out func_string = b'a.real = b.real; a.imag = b.imag' else: + ## real in -> complex out func_string = b'a.real = b; a.imag = 0' else: if self.bf.dtype.is_complex: + ## complex in -> real out (plus the standard "drop imag part" warning) np.ComplexWarning() func_string = b'a = b.real' else: + ## real in -> real out func_string = b'a = b' _check(_bf.bfMap(0, _array(None, dtype=ctypes.c_long), _array(None), 2, _array([a.as_BFarray(), self.as_BFarray()]), _array(['a', 'b']), From 04777547ff23f2eeb7b83ceaad40385018c985b2 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 19 Mar 2024 11:32:04 -0600 Subject: [PATCH 13/32] Indentation. --- python/bifrost/ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/bifrost/ndarray.py b/python/bifrost/ndarray.py index 47f31acd7..1b43d5ac3 100644 --- a/python/bifrost/ndarray.py +++ b/python/bifrost/ndarray.py @@ -392,7 +392,7 @@ def astype(self, dtype): _check(_bf.bfMap(0, _array(None, dtype=ctypes.c_long), _array(None), 2, _array([a.as_BFarray(), self.as_BFarray()]), _array(['a', 'b']), None, func_string, None, _array(None), _array(None))) - return a + return a def _system_accessible_copy(self): if space_accessible(self.bf.space, ['system']): return self From 3c6c91258af6c3fa0259fcc7c997eca9e11ad658 Mon Sep 17 00:00:00 2001 From: Sarah Chastain Date: Thu, 25 Apr 2024 13:54:47 -0400 Subject: [PATCH 14/32] clarify the README for the docs --- docs/Makefile | 2 +- docs/README.rst | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index f7d093d3f..c51d3a6a5 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -29,6 +29,6 @@ generate_python_reference: .PHONY: generate_python_reference generate_cpp_reference: - breathe-apidoc -o source -p bifrost --force ./doxygen/xml/ + breathe-apidoc -o source -p bifrost --force ./doxygen/xml/ rm -rf source/file .PHONY: generate_cpp_reference diff --git a/docs/README.rst b/docs/README.rst index f757e304f..4eec12cb8 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -10,3 +10,10 @@ Inside the `docs` folder, execute `./docker_build_docs.sh`, which will create a container called `bifrost_docs`, then run it, and have it complete the docs-building process for you, outputting the entire html documentation inside `docs/html`. + +If you are not using Docker, ensure that you have "sphinx" and +"doxygen" installed. In the parent directory run "doxygen Doxyfile." +Return to the docs directory, where you can run, for example, +"make singlehtml" where "singlehtml" can be replaced +by the format you wish the docs to be in. + From 774cb481f10d690782dd4b93517b3168c2025fd1 Mon Sep 17 00:00:00 2001 From: Sarah Chastain Date: Thu, 25 Apr 2024 14:16:23 -0400 Subject: [PATCH 15/32] include docs on writing packet formats --- docs/source/Cpp-Development.rst | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docs/source/Cpp-Development.rst b/docs/source/Cpp-Development.rst index 21f6a59bd..a0f8147f9 100644 --- a/docs/source/Cpp-Development.rst +++ b/docs/source/Cpp-Development.rst @@ -81,3 +81,55 @@ Create a Ring Buffer and Load Data bfRingSpanRelease(my_read_span); bfRingSequenceClose(my_read_sequence); bfRingDestroy(my_ring); //delete the ring from memory + +Adding New Packet Formats +------------------------ + +A wide variety of packet formats are already included in bifrost. +For simplicity, it is likely preferable to make use of these pre-existing +formats. In the case that this becomes infeasible, here are some of what +is necessary in order to add a new format to bifrost. + +Files to edit: + +1. python/bifrost/packet_capture.py + + * Add set_mypacket to the PacketCaptureCallback class. It will likely look very similar to the set_chips method. + +2. src/bifrost/packet_capture.h + + * This is for ctypesgen. Add a typedef for the sequence callback. This typedef corresponds to the sequence callback used in the packet reader, see the sections on test_udp_io.py and test_disk_io.py for examples of writing the packet reader. + * Also declare the capture callback. + +3. src/formats/format.hpp + + * Add a one-line #include "mypacket.hpp" + +4. src/formats/mypacket.hpp + + * This is the only file that will need to be fully written from scratch. The easiest way to proceed is to copy the most similar existing packet format and modify it accordingly. One will need to make sure that the header is defined properly and that the correct information is going into it, and one will need to make sure that the memcpy operation is properly filling the packet with data. + +5. src/packet_capture.cpp + + * Need to add a call to the packet capture callback. + +6. src/packet_capture.hpp + + * This is where you will spend most of your time. Add your packet capture sequence callback to the BFpacketcapture_callback_impl initialization list. Immediately after the initialization list, add the set_mypacket and get_mypacket methods. + * Add a new class: "BFpacketcapture_mypacket_impl." In the case of simpler packet formats, this may be very close to the already written "BFpacketcapture_chips_impl." It's probably best to start by copying the format that is closest to the format you are writing and modify it. + * In "BFpacketcapture_create," add the format to the first long if-else if statement. This section tells the disk writer the size of the packet to expect. Then add your packet to the second if-else if statement. + +7. src/packet_writer.hpp + + * After the BFpacketwriter_generic_impl, add a class "BFpacketwriter_mypacket_impl. Take care to choose the correct BF\_DTYPE\_???. + * In BFpacketwriter_create, add your packet to the first if-else if statement. Note that nsamples needs to correspond to the number elements in the data portion of the packet. Then add your packet to the third if-else if statement along all the other formats. + +8. test/test_disk_io.py + + * Add a reader for your packet format. This reader will be what is used in the actual code as well. It contains the sequence callback that we declared in the src/bifrost/packet_capture.h file. Note that the header in this sequence callback is the ring header not the packet header. + * You will also need to add a _get_mypacket_data, test_write_mypacket, and test_read_mypacket. + +9. test/test_udp_io.py + + * The udp version of test_disk_io. Once you have written the disk io test, this test is fairly simple to implement, provided you wrote it correctly. + From 7e97eba7569d65a99eec65d6b471c3f339fc34b3 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 3 May 2024 09:00:18 -0600 Subject: [PATCH 16/32] Cleanup whitespace --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index c51d3a6a5..f7d093d3f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -29,6 +29,6 @@ generate_python_reference: .PHONY: generate_python_reference generate_cpp_reference: - breathe-apidoc -o source -p bifrost --force ./doxygen/xml/ + breathe-apidoc -o source -p bifrost --force ./doxygen/xml/ rm -rf source/file .PHONY: generate_cpp_reference From 6445e696eaa885be9a7874de615e6535bd633e6f Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 3 May 2024 09:22:42 -0600 Subject: [PATCH 17/32] Formatting. --- docs/source/Cpp-Development.rst | 85 +++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 31 deletions(-) diff --git a/docs/source/Cpp-Development.rst b/docs/source/Cpp-Development.rst index a0f8147f9..061c87ed5 100644 --- a/docs/source/Cpp-Development.rst +++ b/docs/source/Cpp-Development.rst @@ -85,51 +85,74 @@ Create a Ring Buffer and Load Data Adding New Packet Formats ------------------------ -A wide variety of packet formats are already included in bifrost. +A wide variety of packet formats are already included in Bifrost. For simplicity, it is likely preferable to make use of these pre-existing formats. In the case that this becomes infeasible, here are some of what -is necessary in order to add a new format to bifrost. +is necessary in order to add a new format to Bifrost. Files to edit: -1. python/bifrost/packet_capture.py +1. ``python/bifrost/packet_capture.py`` - * Add set_mypacket to the PacketCaptureCallback class. It will likely look very similar to the set_chips method. + * Add ``set_mypacket`` to the ``PacketCaptureCallback`` class. It will likely look + very similar to the ``set_chips`` method. -2. src/bifrost/packet_capture.h +2. ``src/bifrost/packet_capture.h`` - * This is for ctypesgen. Add a typedef for the sequence callback. This typedef corresponds to the sequence callback used in the packet reader, see the sections on test_udp_io.py and test_disk_io.py for examples of writing the packet reader. + * This is for ctypesgen. Add a typedef for the sequence callback. This typedef + corresponds to the sequence callback used in the packet reader, see the sections + on ``test_udp_io.py`` and ``test_disk_io.py`` for examples of writing the packet reader. * Also declare the capture callback. -3. src/formats/format.hpp +3. ``src/formats/format.hpp`` - * Add a one-line #include "mypacket.hpp" + * Add a one-line ``#include "mypacket.hpp"`` -4. src/formats/mypacket.hpp +4. `src/formats/mypacket.hpp` - * This is the only file that will need to be fully written from scratch. The easiest way to proceed is to copy the most similar existing packet format and modify it accordingly. One will need to make sure that the header is defined properly and that the correct information is going into it, and one will need to make sure that the memcpy operation is properly filling the packet with data. + * This is the only file that will need to be fully written from scratch. The + easiest way to proceed is to copy the most similar existing packet format and + modify it accordingly. One will need to make sure that the header is defined + properly and that the correct information is going into it, and one will need + to make sure that the `memcpy` operation is properly filling the packet with + data. -5. src/packet_capture.cpp +5. ``src/packet_capture.cpp`` * Need to add a call to the packet capture callback. -6. src/packet_capture.hpp - - * This is where you will spend most of your time. Add your packet capture sequence callback to the BFpacketcapture_callback_impl initialization list. Immediately after the initialization list, add the set_mypacket and get_mypacket methods. - * Add a new class: "BFpacketcapture_mypacket_impl." In the case of simpler packet formats, this may be very close to the already written "BFpacketcapture_chips_impl." It's probably best to start by copying the format that is closest to the format you are writing and modify it. - * In "BFpacketcapture_create," add the format to the first long if-else if statement. This section tells the disk writer the size of the packet to expect. Then add your packet to the second if-else if statement. - -7. src/packet_writer.hpp - - * After the BFpacketwriter_generic_impl, add a class "BFpacketwriter_mypacket_impl. Take care to choose the correct BF\_DTYPE\_???. - * In BFpacketwriter_create, add your packet to the first if-else if statement. Note that nsamples needs to correspond to the number elements in the data portion of the packet. Then add your packet to the third if-else if statement along all the other formats. - -8. test/test_disk_io.py - - * Add a reader for your packet format. This reader will be what is used in the actual code as well. It contains the sequence callback that we declared in the src/bifrost/packet_capture.h file. Note that the header in this sequence callback is the ring header not the packet header. - * You will also need to add a _get_mypacket_data, test_write_mypacket, and test_read_mypacket. - -9. test/test_udp_io.py - - * The udp version of test_disk_io. Once you have written the disk io test, this test is fairly simple to implement, provided you wrote it correctly. - +6. ``src/packet_capture.hpp`` + + * This is where you will spend most of your time. Add your packet capture sequence + callback to the ``BFpacketcapture_callback_impl`` initialization list. Immediately + after the initialization list, add the ``set_mypacket`` and ``get_mypacket`` methods. + * Add a new class: ``BFpacketcapture_mypacket_impl``. In the case of simpler packet + formats, this may be very close to the already written ``BFpacketcapture_chips_impl``. + It's probably best to start by copying the format that is closest to the format + you are writing and modify it. + * In ``BFpacketcapture_create``, add the format to the first long if-else if statement. + This section tells the disk writer the size of the packet to expect. Then add your + packet to the second if-else if statement. + +7. ``src/packet_writer.hpp`` + + * After the ``BFpacketwriter_generic_impl``, add a class ``BFpacketwriter_mypacket_impl``. + Take care to choose the correct BF\_DTYPE\_???. + * In ``BFpacketwriter_create``, add your packet to the first if-else if statement. + Note that nsamples needs to correspond to the number elements in the data portion + of the packet. Then add your packet to the third if-else if statement along all + the other formats. + +8. ``test/test_disk_io.py`` + + * Add a reader for your packet format. This reader will be what is used in the actual + code as well. It contains the sequence callback that we declared in the ``src/bifrost/packet_capture.h`` + file. Note that the header in this sequence callback is the ring header not the + packet header. + * You will also need to add a ``_get_mypacket_data``, ``test_write_mypacket``, + and ``test_read_mypacket``. + +9. ``test/test_udp_io.py`` + + * The UDP version of ``test_disk_io``. Once you have written the disk I/O test, this + test is fairly simple to implement, provided you wrote it correctly. From 3a2c4aa5e148e011fce65eef776fd13c7ddfe45e Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Fri, 3 May 2024 09:25:14 -0600 Subject: [PATCH 18/32] Also need breathe. --- docs/README.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/README.rst b/docs/README.rst index 4eec12cb8..f56d4f41c 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -11,9 +11,8 @@ which will create a container called `bifrost_docs`, then run it, and have it complete the docs-building process for you, outputting the entire html documentation inside `docs/html`. -If you are not using Docker, ensure that you have "sphinx" and -"doxygen" installed. In the parent directory run "doxygen Doxyfile." +If you are not using Docker, ensure that you have "sphinx", "breathe", +and "doxygen" installed. In the parent directory run "doxygen Doxyfile." Return to the docs directory, where you can run, for example, "make singlehtml" where "singlehtml" can be replaced by the format you wish the docs to be in. - From 0ae61e7e5d01f820ed4b4ff9b3473e0bb88a979f Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:16:34 -0600 Subject: [PATCH 19/32] Added better documentation build environment detection. --- configure.ac | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 062f52bca..e0304bffb 100644 --- a/configure.ac +++ b/configure.ac @@ -244,7 +244,18 @@ AS_IF([test x$enable_python != xno], [AC_MSG_RESULT([no]) AC_MSG_WARN([python module will not be built])], [AC_MSG_RESULT([yes]) - AC_SUBST(HAVE_PYTHON, 1)])])]) + AC_SUBST(HAVE_PYTHON, 1)]) + AC_MSG_CHECKING([whether $PYTHON as sphinx]) + AS_IF([! ${PYTHON} -c "import sphinx" 2>/dev/null], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes]) + AC_SUBST(HAVE_PYTHON_SPHINX, 1)]) + AC_MSG_CHECKING([whether $PYTHON as breathe]) + AS_IF([! ${PYTHON} -c "import breathe" 2>/dev/null], + [AC_MSG_RESULT([no]) + AC_MSG_WARN([python documentation cannot not be built])], + [AC_MSG_RESULT([yes]) + AC_SUBST(HAVE_PYTHON_BREATHE, 1)])])]) AC_ARG_WITH([pybuild_flags], [AS_HELP_STRING([--with-pybuild-flags], [build flags for python (default='')])], @@ -271,6 +282,7 @@ AS_IF([test x${DOCKER} != xno], # Documentation # +DX_INIT_DOXYGEN([bifrost]) DX_DOT_FEATURE(OFF) DX_HTML_FEATURE(ON) DX_CHM_FEATURE(OFF) @@ -280,9 +292,16 @@ DX_RTF_FEATURE(OFF) DX_XML_FEATURE(OFF) DX_PDF_FEATURE(ON) DX_PS_FEATURE(ON) -DX_INIT_DOXYGEN([bifrost]) -# +AS_IF([test x${DX_DOXYGEN} == x], + [AC_MSG_WARN([missing doxygen, documentation cannot be built])], + [AS_IF([test x${PYTHON} != xno], + [AS_IF([test x${HAVE_PYTHON_SPHINX} != x1], + [AC_MSG_WARN([missing the sphinx module, python documentation cannot not be built])], + [AS_IF([test x${HAVE_PYTHON_BREATHE} != x1], + [AC_MSG_WARN([missing the breathe module, python documentation cannot not be built])])])])]) + + # Version splitting # From b2d56a67ce7fb018f2d6529245de9a616b69b4ca Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:21:29 -0600 Subject: [PATCH 20/32] Consolidate docs toggling flags into two. --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e0304bffb..80f214f4a 100644 --- a/configure.ac +++ b/configure.ac @@ -293,13 +293,17 @@ DX_XML_FEATURE(OFF) DX_PDF_FEATURE(ON) DX_PS_FEATURE(ON) +AC_SUBST(HAVE_CXX_DOCS, 0) +AC_SUBST(HAVE_PYTHON_DOCS, 0) AS_IF([test x${DX_DOXYGEN} == x], [AC_MSG_WARN([missing doxygen, documentation cannot be built])], - [AS_IF([test x${PYTHON} != xno], + [AC_SUBST(HAVE_CXX_DOCS, 1) + AS_IF([test x${PYTHON} != xno], [AS_IF([test x${HAVE_PYTHON_SPHINX} != x1], [AC_MSG_WARN([missing the sphinx module, python documentation cannot not be built])], [AS_IF([test x${HAVE_PYTHON_BREATHE} != x1], - [AC_MSG_WARN([missing the breathe module, python documentation cannot not be built])])])])]) + [AC_MSG_WARN([missing the breathe module, python documentation cannot not be built])], + [AC_SUBST(HAVE_PYTHON_DOCS, 1)])])])]) # Version splitting From 6efaa739604f9b22c69eb626b7c814addb1b0699 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:28:48 -0600 Subject: [PATCH 21/32] Tie in the doc build flags with the top level Makefile. --- Makefile.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 852b2f951..3ba8ac79b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,8 +7,12 @@ DAT_DIR = share SRC_DIR = src HAVE_PYTHON = @HAVE_PYTHON@ + HAVE_DOCKER = @HAVE_DOCKER@ +CAN_BUILD_CXX_DOCS = @HAVE_CXX_DOCS@ +CAN_BUILD_PYTHON_DOCS = @HAVE_PYTHON_DOCS@ + BIFROST_PYTHON_DIR = python all: libbifrost python @@ -63,8 +67,13 @@ ifeq ($(HAVE_PYTHON),1) endif .PHONY: uninstall -doc: $(INC_DIR)/bifrost/*.h Doxyfile +doc: $(INC_DIR)/bifrost/*.h Doxyfile docs/source/*.rst docs/source/*.py +ifeq ($(CAN_BUILD_CXX_DOCS),1) @DX_DOXYGEN@ Doxyfile +endif +ifeq ($(CAN_BUILD_PYTHON_DOCS),1) + $(MAKE) -C docs singlehtml +endif .PHONY: doc python: libbifrost From 2a1f8fe35008c5ad9ef615637f5a7ab112551edf Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:30:34 -0600 Subject: [PATCH 22/32] Rebuild configure. --- configure | 84 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/configure b/configure index b94108dcb..8fe7920a1 100755 --- a/configure +++ b/configure @@ -663,6 +663,8 @@ MAP_KERNEL_STDCXX PACKAGE_VERSION_MICRO PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR +HAVE_PYTHON_DOCS +HAVE_CXX_DOCS DX_RULES PAPER_SIZE DOXYGEN_PAPER_SIZE @@ -706,6 +708,8 @@ HAVE_DOCKER DOCKER PYINSTALLFLAGS PYBUILDFLAGS +HAVE_PYTHON_BREATHE +HAVE_PYTHON_SPHINX PYTHON3 PYTHON HAVE_PYTHON @@ -1535,7 +1539,7 @@ Optional Features: --disable-python disable building the Python bindings (default=no) --disable-doxygen-doc don't generate any doxygen documentation --enable-doxygen-dot generate graphics for doxygen documentation - --disable-doxygen-man don't generate doxygen manual pages + --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation @@ -22340,6 +22344,32 @@ else $as_nop printf "%s\n" "yes" >&6; } HAVE_PYTHON=1 +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as sphinx" >&5 +printf %s "checking whether $PYTHON as sphinx... " >&6; } + if ! ${PYTHON} -c "import sphinx" 2>/dev/null +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + HAVE_PYTHON_SPHINX=1 + +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as breathe" >&5 +printf %s "checking whether $PYTHON as breathe... " >&6; } + if ! ${PYTHON} -c "import breathe" 2>/dev/null +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: python documentation cannot not be built" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + HAVE_PYTHON_BREATHE=1 + fi fi fi @@ -22526,15 +22556,6 @@ fi - - - - - - - - - # Files: DX_PROJECT=bifrost @@ -23033,7 +23054,7 @@ esac else $as_nop -DX_FLAG_man=1 +DX_FLAG_man=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 @@ -24623,7 +24644,46 @@ DX_RULES="${DX_SNIPPET_doc}" #echo DX_ENV=$DX_ENV -# + + + + + + + + + +HAVE_CXX_DOCS=0 + +HAVE_PYTHON_DOCS=0 + +if test x${DX_DOXYGEN} == x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing doxygen, documentation cannot be built" >&5 +printf "%s\n" "$as_me: WARNING: missing doxygen, documentation cannot be built" >&2;} +else $as_nop + HAVE_CXX_DOCS=1 + + if test x${PYTHON} != xno +then : + if test x${HAVE_PYTHON_SPHINX} != x1 +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the sphinx module, python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: missing the sphinx module, python documentation cannot not be built" >&2;} +else $as_nop + if test x${HAVE_PYTHON_BREATHE} != x1 +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the breathe module, python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: missing the breathe module, python documentation cannot not be built" >&2;} +else $as_nop + HAVE_PYTHON_DOCS=1 + +fi +fi +fi +fi + + # Version splitting # From 7b52298b54e7e854de35e9a3673291674f9ca4b5 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:45:27 -0600 Subject: [PATCH 23/32] Switch to detecting the scripts that are used to build the python docs. --- configure.ac | 24 +++++++++--------------- docs/{Makefile => Makefile.in} | 0 2 files changed, 9 insertions(+), 15 deletions(-) rename docs/{Makefile => Makefile.in} (100%) diff --git a/configure.ac b/configure.ac index 80f214f4a..59c52ef71 100644 --- a/configure.ac +++ b/configure.ac @@ -244,18 +244,7 @@ AS_IF([test x$enable_python != xno], [AC_MSG_RESULT([no]) AC_MSG_WARN([python module will not be built])], [AC_MSG_RESULT([yes]) - AC_SUBST(HAVE_PYTHON, 1)]) - AC_MSG_CHECKING([whether $PYTHON as sphinx]) - AS_IF([! ${PYTHON} -c "import sphinx" 2>/dev/null], - [AC_MSG_RESULT([no])], - [AC_MSG_RESULT([yes]) - AC_SUBST(HAVE_PYTHON_SPHINX, 1)]) - AC_MSG_CHECKING([whether $PYTHON as breathe]) - AS_IF([! ${PYTHON} -c "import breathe" 2>/dev/null], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([python documentation cannot not be built])], - [AC_MSG_RESULT([yes]) - AC_SUBST(HAVE_PYTHON_BREATHE, 1)])])]) + AC_SUBST(HAVE_PYTHON, 1)])])]) AC_ARG_WITH([pybuild_flags], [AS_HELP_STRING([--with-pybuild-flags], [build flags for python (default='')])], @@ -293,15 +282,20 @@ DX_XML_FEATURE(OFF) DX_PDF_FEATURE(ON) DX_PS_FEATURE(ON) +AS_IF([test x${HAVE_PYTHON} == x1], + [AX_WITH_PROG(PYTHON_SPHINXB, sphinx-build) + AX_WITH_PROG(PYTHON_SPHINXA, sphinx-apidoc) + AX_WITH_PROG(PYTHON_BREATHE, breathe-apidoc)]) + AC_SUBST(HAVE_CXX_DOCS, 0) AC_SUBST(HAVE_PYTHON_DOCS, 0) AS_IF([test x${DX_DOXYGEN} == x], [AC_MSG_WARN([missing doxygen, documentation cannot be built])], [AC_SUBST(HAVE_CXX_DOCS, 1) AS_IF([test x${PYTHON} != xno], - [AS_IF([test x${HAVE_PYTHON_SPHINX} != x1], + [AS_IF([test x${PYTHON_SPHINXB} = x], [AC_MSG_WARN([missing the sphinx module, python documentation cannot not be built])], - [AS_IF([test x${HAVE_PYTHON_BREATHE} != x1], + [AS_IF([test x${PYTHON_BREATHE} = x], [AC_MSG_WARN([missing the breathe module, python documentation cannot not be built])], [AC_SUBST(HAVE_PYTHON_DOCS, 1)])])])]) @@ -370,7 +364,7 @@ AS_IF([test x$STDCXX_IS_SET != x1], CXXFLAGS="$CXXFLAGS $lt_prog_compiler_pic_CXX" NVCCFLAGS="$NVCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" -AC_CONFIG_FILES([config.mk Makefile src/Makefile python/Makefile share/bifrost.pc src/bifrost/config.h]) +AC_CONFIG_FILES([config.mk Makefile src/Makefile python/Makefile docs/Makefile share/bifrost.pc src/bifrost/config.h]) AC_OUTPUT diff --git a/docs/Makefile b/docs/Makefile.in similarity index 100% rename from docs/Makefile rename to docs/Makefile.in From 712d3afa0e005bcfeea61d9201986fa8f952f57d Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:45:50 -0600 Subject: [PATCH 24/32] We should make sure this is consistent with the rest of the build. --- docs/Makefile.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Makefile.in b/docs/Makefile.in index f7d093d3f..8d4d63995 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -3,7 +3,7 @@ # You can set these variables from the command line. SPHINXOPTS = -SPHINXBUILD = sphinx-build +SPHINXBUILD = @PYTHON_SPHINXB@ SPHINXPROJ = bifrost SOURCEDIR = source BUILDDIR = build @@ -20,15 +20,15 @@ help: @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) generate_python_reference: - sphinx-apidoc -o source -d 5 --force ../python/bifrost/ + @PYTHON_SPHINXA@ -o source -d 5 --force ../python/bifrost/ rm source/modules.rst - sed -i '1s/.*/Python Reference/' source/bifrost.rst - sed -i '2s/.*/================/' source/bifrost.rst - sed -i '1s/.*/Block Library Reference/' source/bifrost.blocks.rst - sed -i '2s/.*/=======================/' source/bifrost.blocks.rst + @SED@ -i '1s/.*/Python Reference/' source/bifrost.rst + @SED@ -i '2s/.*/================/' source/bifrost.rst + @SED@ -i '1s/.*/Block Library Reference/' source/bifrost.blocks.rst + @SED@ -i '2s/.*/=======================/' source/bifrost.blocks.rst .PHONY: generate_python_reference generate_cpp_reference: - breathe-apidoc -o source -p bifrost --force ./doxygen/xml/ + @PYTHON_BREATHE@ -o source -p bifrost --force ./doxygen/xml/ rm -rf source/file .PHONY: generate_cpp_reference From c064bf20a33b4898ccda636f01aa6c5a09985bcf Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:47:30 -0600 Subject: [PATCH 25/32] Rebuild configure. --- configure | 497 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 465 insertions(+), 32 deletions(-) diff --git a/configure b/configure index 8fe7920a1..56939a021 100755 --- a/configure +++ b/configure @@ -665,6 +665,9 @@ PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR HAVE_PYTHON_DOCS HAVE_CXX_DOCS +PYTHON_BREATHE +PYTHON_SPHINXA +PYTHON_SPHINXB DX_RULES PAPER_SIZE DOXYGEN_PAPER_SIZE @@ -708,8 +711,6 @@ HAVE_DOCKER DOCKER PYINSTALLFLAGS PYBUILDFLAGS -HAVE_PYTHON_BREATHE -HAVE_PYTHON_SPHINX PYTHON3 PYTHON HAVE_PYTHON @@ -882,6 +883,9 @@ enable_doxygen_chi enable_doxygen_html enable_doxygen_ps enable_doxygen_pdf +with_sphinx_build +with_sphinx_apidoc +with_breathe_apidoc ' ac_precious_vars='build_alias host_alias @@ -899,7 +903,10 @@ CXXCPP CTAGS PYTHON DOCKER -DOXYGEN_PAPER_SIZE' +DOXYGEN_PAPER_SIZE +PYTHON_SPHINXB +PYTHON_SPHINXA +PYTHON_BREATHE' # Initialize some variables set by options. @@ -1576,6 +1583,12 @@ Optional Packages: --with-pybuild-flags build flags for python (default='') --with-pyinstall-flags install flags for python (default='') --with-docker=[PATH] absolute path to docker executable + --with-sphinx-build=[PATH] + absolute path to sphinx-build executable + --with-sphinx-apidoc=[PATH] + absolute path to sphinx-apidoc executable + --with-breathe-apidoc=[PATH] + absolute path to breathe-apidoc executable Some influential environment variables: CC C compiler command @@ -1595,6 +1608,12 @@ Some influential environment variables: DOCKER Absolute path to docker executable DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive + PYTHON_SPHINXB + Absolute path to sphinx-build executable + PYTHON_SPHINXA + Absolute path to sphinx-apidoc executable + PYTHON_BREATHE + Absolute path to breathe-apidoc executable Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -22344,32 +22363,6 @@ else $as_nop printf "%s\n" "yes" >&6; } HAVE_PYTHON=1 -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as sphinx" >&5 -printf %s "checking whether $PYTHON as sphinx... " >&6; } - if ! ${PYTHON} -c "import sphinx" 2>/dev/null -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - HAVE_PYTHON_SPHINX=1 - -fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON as breathe" >&5 -printf %s "checking whether $PYTHON as breathe... " >&6; } - if ! ${PYTHON} -c "import breathe" 2>/dev/null -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: python documentation cannot not be built" >&5 -printf "%s\n" "$as_me: WARNING: python documentation cannot not be built" >&2;} -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - HAVE_PYTHON_BREATHE=1 - fi fi fi @@ -24653,6 +24646,445 @@ DX_RULES="${DX_SNIPPET_doc}" +if test x${HAVE_PYTHON} == x1 +then : + + + + + + + + + + + if test -z "$PYTHON_SPHINXB" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sphinx-build executable path has been provided" >&5 +printf %s "checking whether sphinx-build executable path has been provided... " >&6; } + +# Check whether --with-sphinx-build was given. +if test ${with_sphinx_build+y} +then : + withval=$with_sphinx_build; + if test "$withval" != yes && test "$withval" != no +then : + + PYTHON_SPHINXB="$withval" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXB" >&5 +printf "%s\n" "$PYTHON_SPHINXB" >&6; } + +else $as_nop + + PYTHON_SPHINXB="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "$withval" != no +then : + + # Extract the first word of "sphinx-build", so it can be a program name with args. +set dummy sphinx-build; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_SPHINXB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_SPHINXB in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_SPHINXB="$PYTHON_SPHINXB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_SPHINXB="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_SPHINXB=$ac_cv_path_PYTHON_SPHINXB +if test -n "$PYTHON_SPHINXB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXB" >&5 +printf "%s\n" "$PYTHON_SPHINXB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + +fi + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + # Extract the first word of "sphinx-build", so it can be a program name with args. +set dummy sphinx-build; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_SPHINXB+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_SPHINXB in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_SPHINXB="$PYTHON_SPHINXB" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_SPHINXB="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_SPHINXB=$ac_cv_path_PYTHON_SPHINXB +if test -n "$PYTHON_SPHINXB"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXB" >&5 +printf "%s\n" "$PYTHON_SPHINXB" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + + +fi + + + + + + + + + + + + + + + + + if test -z "$PYTHON_SPHINXA" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sphinx-apidoc executable path has been provided" >&5 +printf %s "checking whether sphinx-apidoc executable path has been provided... " >&6; } + +# Check whether --with-sphinx-apidoc was given. +if test ${with_sphinx_apidoc+y} +then : + withval=$with_sphinx_apidoc; + if test "$withval" != yes && test "$withval" != no +then : + + PYTHON_SPHINXA="$withval" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXA" >&5 +printf "%s\n" "$PYTHON_SPHINXA" >&6; } + +else $as_nop + + PYTHON_SPHINXA="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "$withval" != no +then : + + # Extract the first word of "sphinx-apidoc", so it can be a program name with args. +set dummy sphinx-apidoc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_SPHINXA+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_SPHINXA in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_SPHINXA="$PYTHON_SPHINXA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_SPHINXA="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_SPHINXA=$ac_cv_path_PYTHON_SPHINXA +if test -n "$PYTHON_SPHINXA"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXA" >&5 +printf "%s\n" "$PYTHON_SPHINXA" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + +fi + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + # Extract the first word of "sphinx-apidoc", so it can be a program name with args. +set dummy sphinx-apidoc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_SPHINXA+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_SPHINXA in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_SPHINXA="$PYTHON_SPHINXA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_SPHINXA="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_SPHINXA=$ac_cv_path_PYTHON_SPHINXA +if test -n "$PYTHON_SPHINXA"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SPHINXA" >&5 +printf "%s\n" "$PYTHON_SPHINXA" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + + +fi + + + + + + + + + + + + + + + + + if test -z "$PYTHON_BREATHE" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether breathe-apidoc executable path has been provided" >&5 +printf %s "checking whether breathe-apidoc executable path has been provided... " >&6; } + +# Check whether --with-breathe-apidoc was given. +if test ${with_breathe_apidoc+y} +then : + withval=$with_breathe_apidoc; + if test "$withval" != yes && test "$withval" != no +then : + + PYTHON_BREATHE="$withval" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BREATHE" >&5 +printf "%s\n" "$PYTHON_BREATHE" >&6; } + +else $as_nop + + PYTHON_BREATHE="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + if test "$withval" != no +then : + + # Extract the first word of "breathe-apidoc", so it can be a program name with args. +set dummy breathe-apidoc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_BREATHE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_BREATHE in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_BREATHE="$PYTHON_BREATHE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_BREATHE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_BREATHE=$ac_cv_path_PYTHON_BREATHE +if test -n "$PYTHON_BREATHE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BREATHE" >&5 +printf "%s\n" "$PYTHON_BREATHE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + +fi + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + # Extract the first word of "breathe-apidoc", so it can be a program name with args. +set dummy breathe-apidoc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PYTHON_BREATHE+y} +then : + printf %s "(cached) " >&6 +else $as_nop + case $PYTHON_BREATHE in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON_BREATHE="$PYTHON_BREATHE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON_BREATHE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON_BREATHE=$ac_cv_path_PYTHON_BREATHE +if test -n "$PYTHON_BREATHE"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BREATHE" >&5 +printf "%s\n" "$PYTHON_BREATHE" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + +fi + + +fi + + + + + + +fi + HAVE_CXX_DOCS=0 HAVE_PYTHON_DOCS=0 @@ -24666,12 +25098,12 @@ else $as_nop if test x${PYTHON} != xno then : - if test x${HAVE_PYTHON_SPHINX} != x1 + if test x${PYTHON_SPHINXB} = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the sphinx module, python documentation cannot not be built" >&5 printf "%s\n" "$as_me: WARNING: missing the sphinx module, python documentation cannot not be built" >&2;} else $as_nop - if test x${HAVE_PYTHON_BREATHE} != x1 + if test x${PYTHON_BREATHE} = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the breathe module, python documentation cannot not be built" >&5 printf "%s\n" "$as_me: WARNING: missing the breathe module, python documentation cannot not be built" >&2;} @@ -24801,7 +25233,7 @@ fi CXXFLAGS="$CXXFLAGS $lt_prog_compiler_pic_CXX" NVCCFLAGS="$NVCCFLAGS -Xcompiler \"$lt_prog_compiler_pic_CXX\"" -ac_config_files="$ac_config_files config.mk Makefile src/Makefile python/Makefile share/bifrost.pc src/bifrost/config.h" +ac_config_files="$ac_config_files config.mk Makefile src/Makefile python/Makefile docs/Makefile share/bifrost.pc src/bifrost/config.h" cat >confcache <<\_ACEOF @@ -25901,6 +26333,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "share/bifrost.pc") CONFIG_FILES="$CONFIG_FILES share/bifrost.pc" ;; "src/bifrost/config.h") CONFIG_FILES="$CONFIG_FILES src/bifrost/config.h" ;; From 27f28348a2424433b112fada78744c1815b4a716 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:50:18 -0600 Subject: [PATCH 26/32] More verbose about sphinix components. --- configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 59c52ef71..48577c723 100644 --- a/configure.ac +++ b/configure.ac @@ -294,10 +294,12 @@ AS_IF([test x${DX_DOXYGEN} == x], [AC_SUBST(HAVE_CXX_DOCS, 1) AS_IF([test x${PYTHON} != xno], [AS_IF([test x${PYTHON_SPHINXB} = x], - [AC_MSG_WARN([missing the sphinx module, python documentation cannot not be built])], - [AS_IF([test x${PYTHON_BREATHE} = x], - [AC_MSG_WARN([missing the breathe module, python documentation cannot not be built])], - [AC_SUBST(HAVE_PYTHON_DOCS, 1)])])])]) + [AC_MSG_WARN([missing the sphinx-build, python documentation cannot not be built])], + [AS_IF([test x${PYTHON_SPHINXA} = x], + [AC_MSG_WARN([missing the sphinx-apidoc, python documentation cannot not be built])], + [AS_IF([test x${PYTHON_BREATHE} = x], + [AC_MSG_WARN([missing the breathe-apidoc, python documentation cannot not be built])], + [AC_SUBST(HAVE_PYTHON_DOCS, 1)])])])])]) # Version splitting From 9aab2f2f400a3882f7e2acbd36b5e565585aaeae Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Wed, 29 May 2024 15:50:35 -0600 Subject: [PATCH 27/32] Rebuild configure. --- configure | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 56939a021..158cca187 100755 --- a/configure +++ b/configure @@ -25100,13 +25100,18 @@ else $as_nop then : if test x${PYTHON_SPHINXB} = x then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the sphinx module, python documentation cannot not be built" >&5 -printf "%s\n" "$as_me: WARNING: missing the sphinx module, python documentation cannot not be built" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the sphinx-build, python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: missing the sphinx-build, python documentation cannot not be built" >&2;} +else $as_nop + if test x${PYTHON_SPHINXA} = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the sphinx-apidoc, python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: missing the sphinx-apidoc, python documentation cannot not be built" >&2;} else $as_nop if test x${PYTHON_BREATHE} = x then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the breathe module, python documentation cannot not be built" >&5 -printf "%s\n" "$as_me: WARNING: missing the breathe module, python documentation cannot not be built" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: missing the breathe-apidoc, python documentation cannot not be built" >&5 +printf "%s\n" "$as_me: WARNING: missing the breathe-apidoc, python documentation cannot not be built" >&2;} else $as_nop HAVE_PYTHON_DOCS=1 @@ -25114,6 +25119,7 @@ fi fi fi fi +fi # Version splitting From 75edbcfed4de480c6fab348707356162456cddfc Mon Sep 17 00:00:00 2001 From: Sarah Chastain Date: Tue, 16 Jul 2024 11:51:40 -0600 Subject: [PATCH 28/32] Update README.md clarify ctags install --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6bee4c149..6961bdcab 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ go to the following [link](https://colab.research.google.com/github/ledatelescop ### C Dependencies +If using Ubuntu or another Debian-based linux distribution: + $ sudo apt-get install exuberant-ctags ### Python Dependencies From df2201124f38f562a95b62439b09496ad5ff1d48 Mon Sep 17 00:00:00 2001 From: Sarah Chastain Date: Tue, 16 Jul 2024 11:53:51 -0600 Subject: [PATCH 29/32] Update README.md Further clarification on ctags install --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6961bdcab..16d688790 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,8 @@ If using Ubuntu or another Debian-based linux distribution: $ sudo apt-get install exuberant-ctags +Otherwise check https://ctags.sourceforge.net/ for install instructions. + ### Python Dependencies * numpy From 1376fbbd750b2dcfa63a9c89b19469f15247d5d3 Mon Sep 17 00:00:00 2001 From: Sarah Chastain Date: Tue, 16 Jul 2024 12:01:43 -0600 Subject: [PATCH 30/32] Update README.md Clarifications to docs instructions --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16d688790..558d14eaa 100644 --- a/README.md +++ b/README.md @@ -175,8 +175,17 @@ your machine. ### Building the Docs from Scratch -Install sphinx and breathe using pip, and also install Doxygen. +Install breathe using pip: + $ python -m pip install breathe sphinx + +Also install Doxygen using your package manager. +In Ubuntu, for example: + + $ sudo apt install Doxygen + +Otherwise check https://www.doxygen.nl/ for Doxygen install instructions. + Doxygen documentation can be generated by running: $ make doc From 23530b8b648fe3cdeb59f62f04ef17abf8af33d8 Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 16 Jul 2024 12:13:08 -0600 Subject: [PATCH 31/32] Adjust commands to match. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 558d14eaa..955757048 100644 --- a/README.md +++ b/README.md @@ -177,12 +177,12 @@ your machine. Install breathe using pip: - $ python -m pip install breathe sphinx + $ sudo pip install breathe sphinx Also install Doxygen using your package manager. In Ubuntu, for example: - $ sudo apt install Doxygen + $ sudo apt-get install doxygen Otherwise check https://www.doxygen.nl/ for Doxygen install instructions. From 89c6d74b964b1072001769f6281f65ed3120cd3a Mon Sep 17 00:00:00 2001 From: jaycedowell Date: Tue, 16 Jul 2024 12:16:19 -0600 Subject: [PATCH 32/32] See if numpy<2 helps. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9386f2708..64ae9a060 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: - name: "Software Install - Python" run: python -m pip install \ setuptools \ - numpy \ + "numpy<2" \ matplotlib \ contextlib2 \ simplejson \