Skip to content

Commit

Permalink
annotate reports with centre identifiers, add path check to register CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Mar 18, 2024
1 parent 95223f6 commit f5ddc48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wis2_gdc/registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def register(self, metadata: dict) -> None:

LOGGER.info('Running ETS')
ets_results = self._run_ets()
ets_results['report-by'] = CENTRE_ID
ets_results['centre-id'] = self.centre_id

if PUBLISH_REPORTS:
LOGGER.info('Publishing ETS report to broker')
Expand Down Expand Up @@ -129,6 +131,8 @@ def register(self, metadata: dict) -> None:
if RUN_KPI:
LOGGER.info('Running KPI')
kpi_results = self._run_kpi()
kpi_results['report-by'] = CENTRE_ID
kpi_results['centre-id'] = self.centre_id

if PUBLISH_REPORTS:
LOGGER.info('Publishing KPI report to broker')
Expand Down Expand Up @@ -253,7 +257,8 @@ def teardown(ctx, bypass, verbosity='NOTSET'):

@click.command()
@click.pass_context
@click.argument('path')
@click.argument(
'path', type=click.Path(exists=True, dir_okay=True, file_okay=True))
@cli_options.OPTION_VERBOSITY
def register(ctx, path, verbosity='NOTSET'):
"""Register discovery metadata"""
Expand Down

0 comments on commit f5ddc48

Please sign in to comment.