dwave-cloud-client icon indicating copy to clipboard operation
dwave-cloud-client copied to clipboard

General-use utils should have its own namespace

Open JoelPasvolsky opened this issue 5 years ago • 2 comments

Generally useful decorator like cloud-client's @dwave.cloud.utils.retried or @dwave_networkx.utils.decorators.binary_quadratic_model_sampler that aren't limited in use to the particular repo that were written in should be under a generic dwave.utils or dwave.decorators namespace.

JoelPasvolsky avatar Oct 30 '20 16:10 JoelPasvolsky

I know that @randomir has been suggesting a dwave.common package or similar. Unfortunately, there is no nice way to populate a namespace from multiple packages (or at least none that I know of, though I haven't re-checked recently). https://github.com/dwavesystems/dwave-ocean-sdk/pull/21 is an attempt to create one using entry points.

arcondello avatar Oct 30 '20 16:10 arcondello

Yes, I still have dwave.common on my todo list. It would include:

  • logging stuff
  • profiling (like tictoc)
  • testing utils, like various assertX
  • misc commonly used utils like: @retried, @cached, @deprecated, etc.

Basically, utilities we use across multiple Ocean packages.

randomir avatar Oct 30 '20 16:10 randomir