""") parser.add_argument('-tns_folder', type=str, default='', help=""" Folder to store logs and keys for TNS submission [TNS_FOLDER] """) parser.add_argument('--tns_sandbox', action='store_true', help=""" If True, push to TNS sandbox. Default is False. [TNS_SANDBOX] """) parser.add_argument('-substream_prefix', type=str, default='fink_', help=""" Prefix for outgoing substreams [SUBSTREAM_PREFIX] """) args = parser.parse_args(None) return args if __name__ == "__main__": """ Execute the test suite """ # Run the regular test suite regular_unit_tests(globals())
fn: str Input Avro file with schema. Returns ---------- schema: dict Dictionary (JSON) describing the schema. Examples ---------- >>> schema = readschemafromavrofile(ztf_alert_sample) >>> print(schema['version']) 3.1 """ with open(fn, mode='rb') as file_data: data = readschemadata(file_data) schema = data.schema return schema if __name__ == "__main__": """ Execute the test suite """ # Add sample file to globals globs = globals() root = os.environ['FINK_HOME'] globs["ztf_alert_sample"] = os.path.join( root, "schemas/template_schema_ZTF.avro") # Run the regular test suite regular_unit_tests(globs)