ola icon indicating copy to clipboard operation
ola copied to clipboard

Ship Python "example" scripts

Open peternewman opened this issue 2 years ago • 3 comments

E.g. in a separate Debian package etc

As raised by @kengruven in #1912 but I've thought the same thing too previously (and don't seem to have made an issue about it).

  • not part of the distribution, perhaps because it's an "example", but the C++ command-line programs are "examples", too -- ?
  • [ ] Write Man pages
  • [ ] Debian (and other) packaging

peternewman avatar Oct 23 '23 15:10 peternewman

FWIW, shipping examples in Debian packages is usually done by placing them in /usr/share/doc/package/examples

yoe avatar Nov 28 '23 16:11 yoe

Although some are fairly simplistic, others such as https://github.com/OpenLightingProject/ola/blob/master/python/examples/rdm_compare.py are fully blown programmes which just happen to be written in Python and currently in an examples directory. Even the simplest scripts are no different to (but some may duplicate) the C++ examples we ship as our binaries.

I don't know if that changes where they should live?

peternewman avatar Nov 28 '23 17:11 peternewman

Although some are fairly simplistic, others such as https://github.com/OpenLightingProject/ola/blob/master/python/examples/rdm_compare.py are fully blown programmes which just happen to be written in Python and currently in an examples directory. Even the simplest scripts are no different to (but some may duplicate) the C++ examples we ship as our binaries.

I don't know if that changes where they should live?

Not really.

If some are expected to be run by end users, they should probably live in /usr/bin rather than in an example directory.

But if that's not the case, then they should be in the examples directory. There is no limit to how big installed examples can be; policy says that large example files should be compressed (and debhelper implements that), so it makes it slightly less easy to look at them, but not to an extent that is problematic.

yoe avatar Dec 11 '23 20:12 yoe