Conversation
gcroci2
left a comment
There was a problem hiding this comment.
Much cleaner now, great :) I inserted few minor suggestions, and I would only reorder the sections a bit (e.g., [tool.setuptools.packages.find] should go under [tool.setuptools] section).
| "tox", | ||
| "myst_parser", | ||
| ] | ||
| publishing = [ |
There was a problem hiding this comment.
In my project I have build package as well in the publishing extra. Should be needed, right?
There was a problem hiding this comment.
After reading up on setuptools package discovery and data file inclusion (check especially the comment in the pyproject.toml example) I think this whole section could be removed. For sure include-package-data = true can be removed, because it is now true by default. The package discovery could be removed if we move to a src-based layout.
This actually has two advantages:
- This above, i.e. simpler configuration.
- It also automatically supports single-file packages (you don't need a folder for a package if it only consists of one file, but to support that you normally need to reconfigure, see e.g. how I did that in kwandl; I think that with a
srcdir, though, that will also just be autodiscovered, yay!).
| [tool.setuptools] | |
| include-package-data = true | |
| packages = ["{{ cookiecutter.package_name }}"] |
To be clear, this suggestion would have to be accompanied by adding a src dir.
There was a problem hiding this comment.
I also agree that moving to a src-based layout would be the nicest way to go :)
|
This is a great PR, thanks for this effort! One additional change to a |
gcroci2
left a comment
There was a problem hiding this comment.
There is the same typo (almost) everywhere: reporitory instead of repository. For the rest feel free to merge when it's fixed :)
{{cookiecutter.directory_name}}/.github/next_steps/01_sonarcloud_integration.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/02_citation.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/02_citation.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/03_readthedocs.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/03_readthedocs.md
Outdated
Show resolved
Hide resolved
|
@gcroci2 good catch! downside of making a typo during a 'find & replace all' 😅 |
|
Ok, both other PRs are merged. There are some merge conflicts left to fix. Also, I was wondering: you now invoke Finally, if you are up for becoming a true UGHist, I warmly invite you to squash some of the commits (happy to do it together, I'm at the office tomorrow), but no worries if you don't have the time 😁 |
7656b95 to
3d9889c
Compare
|
@egpbos Yep, I indeed had to include Also, UGH challenge accepted 💪 I've rebased my commits on top of the merged main, and |
|
UGH! Super nice addition, thanks! |
This commit changed the test_subpackage build command, but left the now unnecessary '--sdist' and '--wheel' parameters. They are on by default for `python -m build`
This commit changed the test_subpackage build command, but left the now unnecessary '--sdist' and '--wheel' parameters. They are on by default for `python -m build`
Description
setup.pyandsetup.cfgpyproject.tomlSome minor adjustments made during the translation:
>=64.0.0tosetuptoolsunder[build-system]: this is the first version to add support for PEP660: Editable installs for pyproject.toml based buildszip_safesettinginclude-package-data = trueunder[tool.setuptools]in combination with requiringsetuptools-scm. This automatically adds all data files that are included under source control.packages = {{ cookiecutter.package_name }}under[tools.setuptools]repository_urlto define an https github url under[project.urls], since it wouldn't accept the git url incookiecutter.repository:Related issues:
pyproject.tomlonly for installing the generated package #351Instructions to review the pull request
Create a
python-template-testrepo on GitHub (will be overwritten if existing)