augur icon indicating copy to clipboard operation
augur copied to clipboard

Use Classes to enforce consistent APIs

Open MoralCode opened this issue 3 months ago • 1 comments

https://github.com/chaoss/augur/blob/2c9a5f1f2a9b58cfec035982fd0b27bd31cb0fbe/augur/tasks/start_tasks.py#L159

These builders are all intended to use the same APIs and conventions, which is why many of them refer to "enabled phases" when they dont need the ability to have disabled phases. All collection request builders must be able to accept a list of 'enabled_phase_names', even if they are not used.

these should maybe be refactored into instances or subclasses so that the convention of matching signatures is more explicit in its purpose and able to be technically enforced.

MoralCode avatar Sep 15 '25 21:09 MoralCode

same applies here https://github.com/chaoss/augur/blob/2c9a5f1f2a9b58cfec035982fd0b27bd31cb0fbe/augur/tasks/util/collection_util.py#L605

lists of tasks, such as can be seen in facade_phase (variable facade_core_collection)

MoralCode avatar Sep 16 '25 16:09 MoralCode