Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (optional at compile-time) G3Frame JSON output #69

Draft
wants to merge 65 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7d363c1
Add (optional at compile-time) G3Frame JSON output
cozzyd Dec 17, 2021
1d88104
blindly try to fix the cmake action
cozzyd Dec 17, 2021
740ac3c
move ENABLE_JSON_OUTPUT to core/CmakeLists.txt
cozzyd Dec 18, 2021
97b9413
Add (optional at compile-time) G3Frame JSON output
cozzyd Dec 17, 2021
1fa4c82
move ENABLE_JSON_OUTPUT to core/CmakeLists.txt
cozzyd Dec 18, 2021
f85006e
First attempt at abstracting GIL locking / C++ python initialization
cozzyd Jun 3, 2022
be76b17
formatting
cozzyd Jun 3, 2022
8be8d2c
make cppexample work with python things
cozzyd Jun 3, 2022
42e7064
use python3 instead of python in shebang
cozzyd Jun 3, 2022
7724616
CmakeLists for cppexample
cozzyd Jun 3, 2022
50b4273
initial commit of spt3g-json-serve
cozzyd Jun 3, 2022
4609008
failed attempts at python thread safety
cozzyd Jun 3, 2022
3abda84
merge
cozzyd Jun 3, 2022
0de19ce
Merge branch 'master' into json_output
arahlin Jun 3, 2022
fa0a597
fix name collision with CPython symbol
cozzyd Feb 27, 2024
0cb57fa
G3PythonContext class for handling the Python GIL
arahlin Feb 28, 2024
8e949a4
more words
arahlin Feb 28, 2024
1f56430
terrible merge
cozzyd Feb 28, 2024
8fb0d62
update to newest httplib
cozzyd Feb 28, 2024
0eea5ee
Hold GIL while clearing config in G3ModuleInfo
cozzyd Feb 28, 2024
2b09b89
split interpreter initialization and GIL handling into separate classes
arahlin Feb 29, 2024
17e90d5
Hold GIL while clearing config in G3ModuleInfo
cozzyd Feb 28, 2024
d5166c0
Avoid calling into the Python interpeter in the G3ModuleConfig backend
arahlin Feb 29, 2024
2c4f205
remove spurious python context
arahlin Feb 29, 2024
f4654ff
don't bother with globals
arahlin Feb 29, 2024
f89aec8
pass tests. most pipelines are too complex to exec(repr()) anyway
arahlin Feb 29, 2024
d11b4e4
merge
cozzyd Feb 29, 2024
eefb20d
mark non-G3FrameObject arguments as repr strings and avoid python con…
arahlin Feb 29, 2024
c343a26
switch to G3PythonInterpreter
cozzyd Feb 29, 2024
80080cf
Merge branch 'gil_context' into json_output
cozzyd Feb 29, 2024
8ae8b39
cleanup
arahlin Feb 29, 2024
d7b9535
remove now-pointless to_g3frameobject function
arahlin Feb 29, 2024
9681b8f
sigint handler and make python interpreter optional
cozzyd Feb 29, 2024
eaaff1b
cleanup
arahlin Feb 29, 2024
482debd
improve whitespace in printout
cozzyd Feb 29, 2024
dd682c8
monkeypatch argument getter/setter methods for G3ModuleConfig
arahlin Feb 29, 2024
c1fc23c
rename
arahlin Feb 29, 2024
3dd3638
variable name
arahlin Feb 29, 2024
865c9f9
ocd
arahlin Feb 29, 2024
b6a1ed5
limit eval namespace, values method
arahlin Feb 29, 2024
48ba193
no print
arahlin Feb 29, 2024
fb04351
Merge remote-tracking branch 'origin/master' into modconfig_refactor
arahlin Mar 1, 2024
44ad66a
refactor to hide .config attribute from python user to avoid confusion
arahlin Mar 1, 2024
98edc00
add test
arahlin Mar 1, 2024
170fdbc
cleanup
arahlin Mar 1, 2024
24d354b
merge in latest updates to modconfig_refactor branch
cozzyd Mar 1, 2024
6b46b6d
Merge branch 'master' into json_output
cozzyd Mar 1, 2024
da75530
get rid of destructor definition resulting from crappy merge on my part
cozzyd Mar 1, 2024
fae872d
merge
cozzyd Mar 4, 2024
67843cc
remove spurious space
cozzyd Mar 4, 2024
220e605
missed part of merge
cozzyd Mar 4, 2024
b4b1b3f
somehow ended up with a few extra lines in pipelineinfo.py from earli…
cozzyd Mar 4, 2024
3de2109
cleanups
cozzyd Mar 4, 2024
84db403
style
cozzyd Mar 5, 2024
c18afae
big rework of server example, including html output for dir listing
cozzyd Mar 5, 2024
7ee4dcf
increment version, fix json output bug recently introduced
cozzyd Mar 5, 2024
7b9dc86
add some docs
cozzyd Mar 5, 2024
fc6bb3d
rst formatting
cozzyd Mar 5, 2024
e0468f6
rename to more descriptive name
cozzyd Mar 5, 2024
71d1fa4
Merge branch 'master' into json_output
arahlin Nov 20, 2024
6f41707
Fix build errors
arahlin Nov 20, 2024
0ff476a
undo unnecessary whitespace changes
arahlin Nov 20, 2024
d057779
Fix build errors
arahlin Nov 20, 2024
d9f03e6
Merge branch 'master' into json_output
arahlin Nov 20, 2024
4e4cec5
Avoid extra boost libraries
arahlin Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style
cozzyd committed Mar 5, 2024
commit 84db40363c56fc18e27ef87455a35174228c3a8c
3 changes: 1 addition & 2 deletions core/src/G3Frame.cxx
Original file line number Diff line number Diff line change
@@ -288,8 +288,7 @@ void G3Frame::saveJSON(T & os) const
ar << make_nvp("size", size);
std::string typestr(1,(char) type);
ar << make_nvp("type", typestr);
for (auto i = map_.begin(); i != map_.end(); i++)
{
for (auto i = map_.begin(); i != map_.end(); i++) {
//make sure it's deserialized so we don't just write a blob
blob_decode(i->second);
ar << make_nvp("name", i->first);
8 changes: 4 additions & 4 deletions core/src/G3Timestream.cxx
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ static FLAC__StreamEncoderWriteStatus flac_encoder_write_cb(

// Generic version of loadBinary for all archive types
template <typename A>
static void loadBinaryFn(A * inbuf, void * buffer, size_t size)
static void load_binary_fn(A * inbuf, void * buffer, size_t size)
{
inbuf->template loadBinary<1>(buffer,size);
}
@@ -56,7 +56,7 @@ static void loadBinaryFn(A * inbuf, void * buffer, size_t size)
// wanted to support round-tripping through JSON for some reason).

template <>
void loadBinaryFn<cereal::JSONInputArchive>(cereal::JSONInputArchive * inbuf, void * buffer, size_t size)
void load_binary_fn<cereal::JSONInputArchive>(cereal::JSONInputArchive * inbuf, void * buffer, size_t size)
{
inbuf->loadBinaryValue(buffer,size);
}
@@ -79,11 +79,11 @@ static FLAC__StreamDecoderReadStatus flac_decoder_read_cb(
return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
} else if (*bytes >= size_t(bytes_left)) {
*bytes = bytes_left;
loadBinaryFn(args->inbuf, buffer, bytes_left);
load_binary_fn(args->inbuf, buffer, bytes_left);
args->pos += bytes_left;
return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
} else {
loadBinaryFn(args->inbuf, buffer, *bytes);
load_binary_fn(args->inbuf, buffer, *bytes);
args->pos += *bytes;
return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
}