-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support namespace packages with new command and misc. improvements #2768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a good work 👍 I like the idea of creating namespace packages.
I added some questions and opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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__.py
Layout
)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
.rst
readme files as default. This is now changed to use markdown. Additionally,a new option
--readme
has been added. (changes ported from #1515 by @finswimmer).Closes: ##1515 #280
Misc. changes
pytest
dev dependency as this should be left upto the end-user and can be achieved using the cli