oda-hub / oda_api

API client to access some of the MMODA resources: INTEGRAL, POLAR, ANTARES, LIGO/Virgo, SDSS
Other
2 stars 1 forks source link

add progress_max in progress report #239

Closed volodymyrss closed 7 months ago

volodymyrss commented 8 months ago

could we?

okolo commented 7 months ago

@volodymyrss how do you suggest to use this parameter? Currently we have the following doc string for the parameters: """ Report progress via callback URL :param stage: current stage description string :param progress: current stage progress in % :param substage: current substage description string :param subprogress: current substage progress in % :param message: message to pass """ i.e. we assume that progress is given in %. Do you suggest to give progress in arbitrary units and add progress_max parameter for relative progress calculation? In this case I would change description of the progress parameter to :param progress: current stage progress and add extra parameter: :param progress_max: maximal progress value Is it what you suggest?

volodymyrss commented 7 months ago

(sorry I edit your comment for readability)

Yes, I suggest to make the two parameters. Keeping the default of progress_max to 100. Seems like people find it natural to have it so.