Skip to content

Commit

Permalink
Merge pull request #16 from AgPipeline/develop
Browse files Browse the repository at this point in the history
Merging develop into master - no review
  • Loading branch information
Chris-Schnaufer authored Sep 30, 2020
2 parents c51a647 + bcdd083 commit 79f978e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The metadata keys listed below are all defined in the [BRAPI V1.3](https://brapi
* studyName - the name of the study the data belongs to
* season - the season associated with the data
* observationTimeStamp - a timestamp override in ISO 8610 long format
* germplasmName - the name of the crop being tested in the plot
* species - the name of the crop being tested in the plot
* collectingSite - site identification

If the observationTimeStamp metadata key is not specified, the EXIF information in source image files are checked and the earliest found timestamp will be used.
Expand Down
13 changes: 8 additions & 5 deletions agpypeline/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,21 +388,24 @@ def do_work(parser: argparse.ArgumentParser, configuration_info: Configuration,
result = __internal__.handle_error(-100, "Unable to create transformer class instance for processing")
return __internal__.handle_result(result, None, None)

add_parameters(parser, transformer_instance, algorithm_instance)
add_parameters(parser, algorithm_instance, transformer_instance)
args = parser.parse_args()

# start logging system
logging.getLogger().setLevel(args.debug if args.debug == logging.DEBUG else args.info)

# Check that we have mandatory metadata
# Check that we have metadata
if not args.metadata and __internal__.check_metadata_needed(configuration_info):
result = __internal__.handle_error(-1, "No metadata paths were specified.")
elif args.metadata:
md_results = __internal__.load_metadata_files(args.metadata)
if 'metadata' in md_results:
result = __internal__.perform_processing(transformer_instance, algorithm_instance, args, md_results['metadata'])
else:
if 'metadata' not in md_results:
result = __internal__.handle_error(-3, md_results['error'])
else:
md_results = {'metadata': []}

if not result:
result = __internal__.perform_processing(transformer_instance, algorithm_instance, args, md_results['metadata'])

if args.working_space:
result_path = os.path.join(args.working_space, 'result.json')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="agpypeline",
version="0.0.42",
version="0.0.43",
author="Jacob van der Leeuw",
author_email="[email protected]",
description="Installable package for entrypoint and drone-specific environment code within a transformer",
Expand Down

0 comments on commit 79f978e

Please sign in to comment.