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

feat(python): support src/packagename/__init__.py #1062

Merged
merged 5 commits into from Sep 24, 2021
Merged

feat(python): support src/packagename/__init__.py #1062

merged 5 commits into from Sep 24, 2021

Conversation

@scop
Copy link
Contributor

@scop scop commented Sep 20, 2021

For the popular src directory layout,
https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Refs #1026

Basically just monkeying what was done with earlier related python changes recently and git grepping what might need updating without really understanding it all, could very well be that I've missed something.

@scop scop requested review from as code owners Sep 20, 2021
@google-cla google-cla bot added the cla: yes label Sep 20, 2021
@@ -115,6 +115,14 @@ export class Python extends ReleasePR {
packageName: packageName.name,
})
);
updates.push(
Copy link
Contributor

@bcoe bcoe Sep 23, 2021

Mind adding a // TODO: figure out refactor that makes logic for updating __init__.py, etc., configurable

I'm a little worried about the number of optional paths we've added at this point.

Copy link
Contributor Author

@scop scop Sep 24, 2021

Added.

FWIW after this one's in, pretty much the last one re filenames I'm aware some projects could appreciate would be updating __version__.py files anywhere in the tree. That could be handled just like version.py currently is.

But at that point I think all the "standard" ways to refer to the version would be addressed and a reasonable alternative to configurability might be to nudge projects to use a more common filename to place their __version__ in.

Then again while the __version__ symbol is probably the most prominent, some projects use just version or VERSION...

bcoe
bcoe approved these changes Sep 24, 2021
@chingor13 chingor13 merged commit 598667d into googleapis:main Sep 24, 2021
12 checks passed
@scop scop deleted the feat-src-init-py branch Sep 25, 2021
scop added a commit to scop/pytekukko that referenced this issue Oct 4, 2021
release-please(-action) supports that now.

Refs googleapis/release-please#1062
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants