Skip to content

Commit 16dd1ae

Browse files
authored
Add support for yoda-H5 (#17)
* include yoda-H5 in supported formats and add suffix to temp files so YODA can differentiate between .yoda and .yoda.h5 * update README, bump version number, bump required hepdata-converter version, fix missing dot in tmp file name
1 parent f66dc26 commit 16dd1ae

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ input: Base64 encoded tar.gz file containing hepdata-converter-ws-data entry (di
3030
id: str used for caching purposes (same input files have to have same ID), not implemented?
3131
options: dictionary with options accepted by hepdata_converter.convert function. The most important are:
3232
input_format: (input format identifier e.g. yaml, oldhepdata, etc.)
33-
output_format: (output format identifier e.g. yaml, root, yoda, yoda1, csv, etc.)
33+
output_format: (output format identifier e.g. yaml, root, yoda, yoda1, yoda.h5, csv, etc.)
3434
other options are dependent on the input / output format and are documented in their respective parsers / readers
3535
in https://github.com/HEPData/hepdata-converter
3636
}

hepdata_converter_ws/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
__author__ = 'Michał Szostak'
1515

16-
SINGLEFILE_FORMATS = ['root', 'yoda', 'yoda1']
16+
SINGLEFILE_FORMATS = ['root', 'yoda', 'yoda1', 'yoda.h5']
1717

1818

1919
@api.route('/debug-sentry')
@@ -35,7 +35,7 @@ def convert():
3535

3636
output, os_handle = BytesIO(), None
3737
if output_format.lower() in SINGLEFILE_FORMATS or 'table' in kwargs['options']:
38-
os_handle, tmp_output = tempfile.mkstemp()
38+
os_handle, tmp_output = tempfile.mkstemp(suffix='.'+output_format if output_format else '')
3939
else:
4040
tmp_output = tempfile.mkdtemp()
4141

hepdata_converter_ws/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# this file ideally should only contain __version__ declaration, as anything else
44
# may break setup.py and PyPI uploads
5-
__version__ = '0.3.1'
5+
__version__ = '0.3.2'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_version():
2929
name='hepdata-converter-ws',
3030
version=get_version(),
3131
install_requires=[
32-
'hepdata-converter>=0.3.1',
32+
'hepdata-converter>=0.3.3',
3333
'flask',
3434
'sentry-sdk[flask]',
3535
],

0 commit comments

Comments
 (0)