-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from 20DM/yoda2_writer
YODA2 writer
- Loading branch information
Showing
32 changed files
with
130,961 additions
and
257 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -58,4 +58,7 @@ README.html | |
target/ | ||
|
||
.idea | ||
MANIFEST | ||
MANIFEST | ||
|
||
# venv | ||
venv/ |
This file contains 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 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
Submodule docker
updated
6 files
+29 −0 | .github/workflows/ci.yml | |
+0 −30 | .travis.yml | |
+3 −7 | Dockerfile | |
+11 −19 | README.md | |
+3 −3 | docker_push | |
+0 −3 | requirements.txt |
This file contains 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 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 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 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 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 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,34 @@ | ||
# -*- encoding: utf-8 -*- | ||
import os | ||
import hepdata_converter | ||
from hepdata_converter.testsuite import insert_data_as_file, insert_path, insert_paths | ||
from hepdata_converter.testsuite.test_writer import WriterTestSuite | ||
|
||
__author__ = 'Michał Szostak' | ||
|
||
|
||
class YODA1WriterTestSuite(WriterTestSuite): | ||
@insert_path('yaml_full') | ||
@insert_data_as_file('yoda1/full.yoda') | ||
def test_simple_parse(self, yaml_simple_path, yoda_template): | ||
output_file_path = os.path.join(self.current_tmp, 'datafile.yoda') | ||
hepdata_converter.convert(yaml_simple_path, output_file_path, | ||
options={'output_format': 'yoda1', | ||
'validator_schema_version': '0.1.0', | ||
'hepdata_doi': '10.17182/hepdata.62535.v1', | ||
'rivet_analysis_name': 'ATLAS_2012_I1203852'}) | ||
|
||
self.assertNotEqual(os.stat(output_file_path).st_size, 0, 'output yoda file is empty') | ||
with open(output_file_path, 'r') as f: | ||
self.assertMultiLineAlmostEqual(f, yoda_template) | ||
|
||
@insert_paths('yaml/ins1283183', 'yaml/ins1397637', 'yaml/ins699647', 'yaml/ins1413748') | ||
def test_parse_all(self, test_submissions): | ||
|
||
for idx, test_submission in enumerate(test_submissions): | ||
output_file_path = os.path.join(self.current_tmp, 'data-{}.yoda'.format(idx)) | ||
|
||
hepdata_converter.convert(test_submission, output_file_path, | ||
options={'output_format': 'yoda1'}) | ||
|
||
self.assertNotEqual(os.stat(output_file_path).st_size, 0, 'output yoda file is empty') |
This file contains 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
Oops, something went wrong.