Support namespace packages with new command and misc. improvements#2768
Support namespace packages with new command and misc. improvements#2768abn merged 7 commits intopython-poetry:masterfrom
Conversation
finswimmer
left a comment
There was a problem hiding this comment.
Overall a good work 👍 I like the idea of creating namespace packages.
I added some questions and opinions.
sdispater
left a comment
There was a problem hiding this comment.
"a-b-c" creates package name "a-b-c" with directory structure "a/b/c"
I am not sure we want this, and it's a change to the existing behavior. Putting a dash in the package name is common but does not necessarily mean we want a namespace package.
Personally, I reckon this is a better default. Especially since we can do |
22df8d0 to
80201d0
Compare
|
@sdispater I have left the current beahviour as it is for now; but supporting |
80201d0 to
1d62ac9
Compare
|
@python-poetry/core this is rebased and ready for review again |
finswimmer
left a comment
There was a problem hiding this comment.
I have some minor points about type hinting :)
1d62ac9 to
5ab216f
Compare
|
Good ol' type hinting. Fixed :) |
|
@finswimmer can you have a look at this one again please? |
5ab216f to
971a739
Compare
sdispater
left a comment
There was a problem hiding this comment.
Looks good to me 👍
However, it will have to wait the 1.1 release before being merged (I put it into the 1.2 project).
|
Sigh :( I hoped to get this in this release. 1.2 it is! |
|
@sdispater this is ready again; CI might have failures that should be fixed once #3900 is merged. |
- remove unnecessary template duplication - stop generating default test case (this is out of scope for poetry) - stop generating content for package `__init__.py` - simplify inheritance to only require base directory overrides - remove "StandardLayout" (replaced with `Layout`) - support handling namespace package names given in the form "a.b.c" - specify include packages by default (be explicit)
With this change, names containing "." are treated as namespace packages. The following behaviour is now expected. - "a.b.c" creates package name "a-b-c" with directory structure "a/b/c" - "a-b-c" creates package name "a-b-c" with directory structure "a/b/c" - "a.b_c" creates package name "a-b-c" with directory structure "a/b_c" - "a_b_c" creates package name "a-b-c" with directory structure "a_b_c"
Relates-to: python-poetry#280 Co-authored-by: Arun Babu Neelicattu <[email protected]>
This change makes readme formant configurable, defaulting to markdown when using the new command. Resolves: python-poetry#280 Closes: python-poetry#1515 Co-authored-by: Arun Babu Neelicattu <[email protected]>
81d4119 to
152d720
Compare
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Improve supported layout creation
__init__.pyLayout)Support namespace package creation (via --name)
With this change, names containing "." are treated as namespace
packages. The following behaviour is now expected.
Add --readme option with default fromat markdown
Previously, the new command created a
.rstreadme files as default. This is now changed to use markdown. Additionally,a new option
--readmehas been added. (changes ported from #1515 by @finswimmer).Closes: ##1515 #280
Misc. changes
pytestdev dependency as this should be left upto the end-user and can be achieved using the cli