enthought / ets

ets.py is a utility to clone and manage various Enthought Tool Suite packages
http://docs.enthought.com/ets
Other
34 stars 11 forks source link

Discuss how to manage common utility functions #51

Open mdickinson opened 4 years ago

mdickinson commented 4 years ago

This discussion is broken out of https://github.com/enthought/traits/issues/1239. That issue started out as a specific proposal to add the non-Traits-related utility functions xgetattr and xsetattr to traits.api, and turned into a more general discussion. We should continue that more general discussion here.

Summary: at issue is where to put functionality representing common non-package-specific tasks found across ETS and ETS-using projects. Apart from xgetattr and xsetattr, examples include time and timezone handling, slugification of strings, and common testing utilities.

See enthought/traits#1239 for previous discussion on the topic.

corranwebster commented 4 years ago

At one time the thought was that encore would be a place for that, but the project was too unfocused. In retrospect, I would prefer a handful of more focused and smaller projects.

In terms of things that should be there, I'd add (human_date)[https://github.com/enthought/encore/blob/master/encore/util/human_date.py] (unless that or something equivalent is now in PyPI), import_symbol (duplicated in a few places in ETS), code for converting Python identifiers to/from "human friendly" versions, a decent generic topological sort implementation. Probably a lot of stuff from traits.utils and traits.trait_base.

I don't think ets_config belongs in the same place, it's really application support code, and so it should go in a library with that sort of focus. Similarly for some of the "resource" code.