-
Notifications
You must be signed in to change notification settings - Fork 12
Add (optional at compile-time) G3Frame JSON output #69
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
Draft
cozzyd
wants to merge
87
commits into
master
Choose a base branch
from
json_output
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
7d363c1
Add (optional at compile-time) G3Frame JSON output
cozzyd 1d88104
blindly try to fix the cmake action
cozzyd 740ac3c
move ENABLE_JSON_OUTPUT to core/CmakeLists.txt
cozzyd 97b9413
Add (optional at compile-time) G3Frame JSON output
cozzyd 1fa4c82
move ENABLE_JSON_OUTPUT to core/CmakeLists.txt
cozzyd f85006e
First attempt at abstracting GIL locking / C++ python initialization
cozzyd be76b17
formatting
cozzyd 8be8d2c
make cppexample work with python things
cozzyd 42e7064
use python3 instead of python in shebang
cozzyd 7724616
CmakeLists for cppexample
cozzyd 50b4273
initial commit of spt3g-json-serve
cozzyd 4609008
failed attempts at python thread safety
cozzyd 3abda84
merge
cozzyd 0de19ce
Merge branch 'master' into json_output
arahlin fa0a597
fix name collision with CPython symbol
cozzyd 0cb57fa
G3PythonContext class for handling the Python GIL
arahlin 8e949a4
more words
arahlin 1f56430
terrible merge
cozzyd 8fb0d62
update to newest httplib
cozzyd 0eea5ee
Hold GIL while clearing config in G3ModuleInfo
cozzyd 2b09b89
split interpreter initialization and GIL handling into separate classes
arahlin 17e90d5
Hold GIL while clearing config in G3ModuleInfo
cozzyd d5166c0
Avoid calling into the Python interpeter in the G3ModuleConfig backend
arahlin 2c4f205
remove spurious python context
arahlin f4654ff
don't bother with globals
arahlin f89aec8
pass tests. most pipelines are too complex to exec(repr()) anyway
arahlin d11b4e4
merge
cozzyd eefb20d
mark non-G3FrameObject arguments as repr strings and avoid python con…
arahlin c343a26
switch to G3PythonInterpreter
cozzyd 80080cf
Merge branch 'gil_context' into json_output
cozzyd 8ae8b39
cleanup
arahlin d7b9535
remove now-pointless to_g3frameobject function
arahlin 9681b8f
sigint handler and make python interpreter optional
cozzyd eaaff1b
cleanup
arahlin 482debd
improve whitespace in printout
cozzyd dd682c8
monkeypatch argument getter/setter methods for G3ModuleConfig
arahlin c1fc23c
rename
arahlin 3dd3638
variable name
arahlin 865c9f9
ocd
arahlin b6a1ed5
limit eval namespace, values method
arahlin 48ba193
no print
arahlin fb04351
Merge remote-tracking branch 'origin/master' into modconfig_refactor
arahlin 44ad66a
refactor to hide .config attribute from python user to avoid confusion
arahlin 98edc00
add test
arahlin 170fdbc
cleanup
arahlin 24d354b
merge in latest updates to modconfig_refactor branch
cozzyd 6b46b6d
Merge branch 'master' into json_output
cozzyd da75530
get rid of destructor definition resulting from crappy merge on my part
cozzyd fae872d
merge
cozzyd 67843cc
remove spurious space
cozzyd 220e605
missed part of merge
cozzyd b4b1b3f
somehow ended up with a few extra lines in pipelineinfo.py from earli…
cozzyd 3de2109
cleanups
cozzyd 84db403
style
cozzyd c18afae
big rework of server example, including html output for dir listing
cozzyd 7ee4dcf
increment version, fix json output bug recently introduced
cozzyd 7b9dc86
add some docs
cozzyd fc6bb3d
rst formatting
cozzyd e0468f6
rename to more descriptive name
cozzyd 71d1fa4
Merge branch 'master' into json_output
arahlin 6f41707
Fix build errors
arahlin 0ff476a
undo unnecessary whitespace changes
arahlin d057779
Fix build errors
arahlin d9f03e6
Merge branch 'master' into json_output
arahlin 4e4cec5
Avoid extra boost libraries
arahlin 852f4c0
Merge branch 'master' into json_output
arahlin e237fe1
Use correct load method
arahlin 7895257
Merge branch 'master' into json_output
arahlin add010d
specialize save member function instead of using a separate saveJSON
arahlin e6bf567
Merge branch 'master' into json_output
arahlin 3e437a1
Merge branch 'master' into json_output
arahlin 391b187
Update istream API
arahlin 091f2e6
bug
arahlin cbdaeb3
bug fix for G3Timestream JSON loader
arahlin ab3ac21
Use a pipeline instead of loading/writing frames by hand
arahlin 98ac445
Merge branch 'master' into json_output
arahlin a699c51
Finer control of serialization template specializations
arahlin fddc8eb
Separate template specializations for G3Timestreams
arahlin cf973e8
Merge branch 'master' into json_output
arahlin 3e2cd72
Chasing changes from master branch
arahlin 0d8261e
typo
arahlin 3ff03cb
Merge branch 'master' into json_output
arahlin 4ef9e9d
Missing include
arahlin c8dc058
Merge branch 'master' into json_output
arahlin 3a461e7
Merge branch 'master' into json_output
arahlin 88de55e
Merge branch 'master' into json_output
arahlin 2c1b28d
Merge branch 'master' into json_output
arahlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| import sys | ||
| from spt3g import core | ||
|
|
||
|
|
||
| if len(sys.argv) < 2: | ||
| print('Usage: %s file.g3 ' % sys.argv[0]) | ||
| print('Dumps the given file to standard output as JSON (not quite indented properly, sorry)') | ||
| sys.exit(1) | ||
|
|
||
| #Crappy hand-crafted json wrapper to make this stream valid json | ||
| print('{') | ||
| print(' "filename": "%s",' % (sys.argv[1])) | ||
| print(' "frames":') | ||
| print(' [') | ||
|
|
||
| first = True | ||
| indent = 8*' ' | ||
| print_indent = 7*' ' | ||
|
|
||
| for f in core.G3File(sys.argv[1]): | ||
| if not first: | ||
| print (print_indent,',') | ||
| print(print_indent,indent.join(f.as_json().splitlines(True))) | ||
| first = False | ||
| print(' ]') | ||
| print('}') | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.