Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find better name for "non-src" layout (picked: flat) #618

Closed
astrojuanlu opened this issue May 26, 2019 · 9 comments
Closed

Find better name for "non-src" layout (picked: flat) #618

astrojuanlu opened this issue May 26, 2019 · 9 comments

Comments

@astrojuanlu
Copy link
Contributor

From #320 (comment):

We should use a name for non-src/ layout that isn't negative-tone:

Suggestions so far:

@cjerdonek
Copy link
Member

cjerdonek commented May 26, 2019

Another possibility:

  • top-level

One thought is that the name "src" layout communicates primarily where e.g. setup.py goes, so for parallel reasons the other name should also say where setup.py goes. Names like "root" and "top-level" would fit this.

@drunkwcodes
Copy link

I think it should be just "src" layout and others.

The src layout seems to be misused and denies the fact that setup.py is kind of a piece of important source which runs on every installation.

@pradyunsg
Copy link
Member

Since this is bikesheding after all, I think it is important to decide what to focus on.

I think that'll be: what these terms might communicate to first timers and to avoid names that can be mixed with other common concepts.

IMO that means we can take the following off the table:

  • "root" can be confused with the root of the file system or as the superuser.
  • "simple" and "natural" would communicate that the layout is somehow better than the alternatives. (we don't want to convey either way, in the guide)
  • "adhoc" would communicate that the layout is inferior to the alternatives. (we don't want to convey either way, in the guide)

That leaves us with "flat" and "top-level".

Between these two, I think I'll go with flat since it's a common enough name and conveys the meaning well enough. It'll be pretty search friendly too.

@drunkwcodes
Copy link

No. "Flat" layout conflicts with its duplicate path name convention.
"Mediocre" layout for the first timers FTW.

@pradyunsg
Copy link
Member

Not sure if you're serious or trying to be funny/sarcastic there.

Anyway, mediocre doesn't make sense (it's not a neutral term) so I'm going to ignore all of that.

@ncoghlan
Copy link
Member

Directory name duplication happens in both layouts when the source project and the published package share a name (it just appears as project/package in the flat layout, and project/src/package in the src layout).

So the general way of describing the two layouts would be:

In a flat project layout, the importable Python modules and/or packages live at the same level as the distribution package definition files (e.g. pyproject.toml, setup.py, setup.cfg, MANIFEST.in), whereas in a "src" (pronounced "source") layout, the importable components are placed one level further down, inside a src subdirectory.

@pradyunsg
Copy link
Member

@ncoghlan I'm gonna borrow that wording, for the discussion topic. :)

@ibraheemybg
Copy link

Hello am actually an intermediate python developer but then i think "auto_src.py" will make a good layout as it will kind of notify users that its automatic and he no specific layout🙌🏼

@pradyunsg
Copy link
Member

The concensus here seems to be "flat". :)

@pradyunsg pradyunsg changed the title Find better name for "non-src" layout Find better name for "non-src" layout (picked: flat) Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants