I also am not 100% on this decision, so this is an excellent question. * pip naturally transforms the underscore to a hyphen which causes some folks [0] to believe it won't work unless hyphens are used. In my testing, it does still work with PyPI because PyPI treats an _ and a - as the same character when looking up names. A stack overflow post that I read (and can't find now) suggested that the transformation of pip is doing was done to maintain compatibility with more Python packaging types. I think the concern is that if pip was fetching from something other than PyPI which doesn't provide that mapping feature pip's translation would cause the user to require the '-e' option which is more work.
* The dashes seem to be a more popular convention [1] * We still won't have a one-for-one matching in many places even if we do use hyphens. For example pulp_rpm_cli would actually be providing pulp_rpm.cli. I'm +0 on hypens mainly on readability and the inability for us to actually have consistency. What do you think? [0]: https://pybuilder.github.io/documentation/external_plugins.html#.WRyX_zcpCV4 [1]: https://gist.github.com/gene1wood/9472a9d0dffce1a56d6e796afc6539b8 On Wed, May 17, 2017 at 2:29 PM, Michael Hrivnak <[email protected]> wrote: > Our python package names currently all have underscores. For example: > > https://github.com/pulp/pulp_rpm/blob/2.13-release/plugins/setup.py#L6 > > Are we thinking of moving to hyphens for a particular reason? I could be > persuaded, but consistency is certainly nice between the python package > name and the python namespace. > > On Wed, May 17, 2017 at 2:05 PM, Brian Bouterse <[email protected]> > wrote: > >> I got some positive IRC feedback about the names in the doc, but nothing >> via e-mail. I've added the PyPI names to be registered from the Google doc >> to the ticket about registering them [0]. It needs to be groomed. I plan to >> nominate it at sprint planning tomorrow. >> >> [0]: https://pulp.plan.io/issues/2444 >> >> -Brian >> >> On Mon, May 15, 2017 at 3:02 PM, Brian Bouterse <[email protected]> >> wrote: >> >>> To make a concrete listing of what we would register, I wrote out a list >>> of all PyPI packages to be registered as column A here: >>> >>> https://docs.google.com/spreadsheets/d/1F6_eOefpHkwtxm1YXgjA >>> ypGHW826Ogt5Z3Us4elg-YY/edit?usp=sharing >>> >>> I've written these out with dashes not underscores. I *think* either >>> would work. Is this what others had in mind? >>> >>> >>> On Mon, May 15, 2017 at 1:11 PM, Michael Hrivnak <[email protected]> >>> wrote: >>> >>>> I also imagine us getting to that point where the CLI does not require >>>> any code specific to a particular plugin, but I'm not sure we'll get there >>>> in 3.0. >>>> >>>> On Mon, May 15, 2017 at 10:25 AM, Brian Bouterse <[email protected]> >>>> wrote: >>>> >>>>> +1 to all of the core stuff. Thank you for writing it up. >>>>> >>>>> For the pulp_rpm case +0 to what you had written. I had imagined it >>>>> with a slightly different example, but I think in practice it's almost the >>>>> same. >>>>> >>>>> pip install pulp_rpm >>>>> from pulp_rpm import anything >>>>> >>>>> As an aside, I'm hoping that plugins only have to provide a server >>>>> package and that by installing it on the server the CLI will know about >>>>> the >>>>> additional command set somehow. If so this would avoid plugin writers >>>>> having to make additional pulp_rpm_common and pulp_rpm_cli pip packages. >>>>> If >>>>> we can't do that then I would think the pip and import for a plugin like >>>>> RPM would be: >>>>> >>>>> pip install pulp_rpm >>>>> pip install pulp_rpm_common >>>>> pip install pulp_rpm_cli >>>>> >>>>> from pulp_rpm import anything >>>>> from pulp_rpm import cli >>>>> from pulp_rpm import common >>>>> >>>>> Does ^ make sense? Is that similar or different to how others imagined >>>>> it? It's slightly different than the example given by @mrhivnak, but in >>>>> practice I don't think it is different. >>>>> >>>>> On Fri, May 12, 2017 at 12:52 PM, Daniel Alley <[email protected]> >>>>> wrote: >>>>> >>>>>> +1 >>>>>> >>>>>> On Fri, May 12, 2017 at 12:13 PM, Jeff Ortel <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> +1, This sounds good to me. >>>>>>> >>>>>>> On 05/11/2017 10:59 AM, Michael Hrivnak wrote: >>>>>>> > We had a brainstorm session today to re-evaluate the >>>>>>> previously-identified options, and try to come up with >>>>>>> > some new ones. None of the previously-identified options had >>>>>>> enough support to be chosen. See the thread "PyPI >>>>>>> > names for Pulp3" for background. >>>>>>> > >>>>>>> > To re-cap, we are focused on two related questions: >>>>>>> > >>>>>>> > 1. What python namespace should Pulp use, since we cannot continue >>>>>>> to use "pulp"? >>>>>>> > >>>>>>> > 2. What PyPI package names should we use? >>>>>>> > >>>>>>> > I pitched an idea for 1 that everyone on the call liked, which is >>>>>>> "pulpcore". It could alternatively be >>>>>>> > "pulp_core", although my pinky finger prefers the former. The >>>>>>> group of roughly 10 people who participated in >>>>>>> > the discussion are recommending "pulpcore" for consideration as >>>>>>> the python namespace to replace "pulp". Please >>>>>>> > add your feedback to this thread. >>>>>>> > >>>>>>> > "core" is likable because it implies a plugin architecture. It's >>>>>>> similar to the word "platform" that we've >>>>>>> > used extensively, but shorter (which people liked), and perhaps >>>>>>> slightly more descriptive (which people also >>>>>>> > liked). Example: >>>>>>> > >>>>>>> > from pulpcore import streamer >>>>>>> > >>>>>>> > We discussed renaming what is currently "pulp.platform" to >>>>>>> something more descriptive. "platform" is a word >>>>>>> > that's been with us a long time, but it's worth re-considering, >>>>>>> especially if we shift to a similar word such >>>>>>> > as "core". "pulpcore.platform" seems awkward. >>>>>>> > >>>>>>> > A proposal is "pulpcore.apps", since that code is all directly >>>>>>> related to the celery app and django app. >>>>>>> > >>>>>>> > Python namespaces would include: >>>>>>> > >>>>>>> > pulpcore.apps >>>>>>> > pulpcore.cli >>>>>>> > pulpcore.common >>>>>>> > pulpcore.plugin >>>>>>> > pulpcore.streamer >>>>>>> > >>>>>>> > For python package names, they would look something like this: >>>>>>> > >>>>>>> > pip install pulpcore >>>>>>> > pip install pulpcore_cli >>>>>>> > pip install pulpcore_streamer >>>>>>> > pip install pulpcore_common >>>>>>> > >>>>>>> > Plugins would continue to use their existing namespace and package >>>>>>> names, with whatever variations are >>>>>>> > appropriate in Pulp 3. For example: >>>>>>> > >>>>>>> > import pulp_rpm.plugins >>>>>>> > pip install pulp_rpm_plugins >>>>>>> > >>>>>>> > Thoughts? Those of you who were part of the discussion, please >>>>>>> chime in with any additional points you'd like >>>>>>> > to highlight. >>>>>>> > >>>>>>> > -- >>>>>>> > >>>>>>> > Michael Hrivnak >>>>>>> > >>>>>>> > Principal Software Engineer, RHCE >>>>>>> > >>>>>>> > Red Hat >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > _______________________________________________ >>>>>>> > Pulp-dev mailing list >>>>>>> > [email protected] >>>>>>> > https://www.redhat.com/mailman/listinfo/pulp-dev >>>>>>> > >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Pulp-dev mailing list >>>>>>> [email protected] >>>>>>> https://www.redhat.com/mailman/listinfo/pulp-dev >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Pulp-dev mailing list >>>>>> [email protected] >>>>>> https://www.redhat.com/mailman/listinfo/pulp-dev >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Pulp-dev mailing list >>>>> [email protected] >>>>> https://www.redhat.com/mailman/listinfo/pulp-dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Michael Hrivnak >>>> >>>> Principal Software Engineer, RHCE >>>> >>>> Red Hat >>>> >>> >>> >> > > > -- > > Michael Hrivnak > > Principal Software Engineer, RHCE > > Red Hat >
_______________________________________________ Pulp-dev mailing list [email protected] https://www.redhat.com/mailman/listinfo/pulp-dev
