Replies: 19 comments 43 replies
-
I could create a PR if I you are okay with the procedure @FlorianWilhelm |
Beta Was this translation helpful? Give feedback.
-
Hi @CarliJoy, thank you for bringing this discussion forward. I agree with you that the way things are right now is definitely not the most "uniform" or "ideal" way of doing things, however I would argue that it is the more pragmatic 😝 For the version 4, I think we are still committing to provide people a escape hatch from isolated builds so they can still do some old fashion packages while things are not stable enough (via We could also try other alternatives like using By the way, we do have some individual files for other tools like |
Beta Was this translation helpful? Give feedback.
-
Well .coveragerc should be included to travis, cirrus and kind of also tox are more CI tools so I kind of expect them to have their own files. |
Beta Was this translation helpful? Give feedback.
-
After digesting a little bit more the discussion, I think we can have 2 approaches here:
What do you guys think? |
Beta Was this translation helpful? Give feedback.
-
@abravalheri I guess some things are mixed up here. So my general question is: Why would I ever need the So my suggestion would be:
|
Beta Was this translation helpful? Give feedback.
-
Hi @CarliJoy, @FlorianWilhelm , thank you for your feedback. Something to have in mind is that the existence of a One of the problems I found myself when working with both
I apologise if my knowledge in this topic is outdated, it is been a few months that I checked, and the packaging ecosystem in Python is evolving very fast. You can follow the discussion in PyPA that led me to these conclusions in: pypa/pyproject-hooks#86. |
Beta Was this translation helpful? Give feedback.
-
Hi @CarliJoy and @FlorianWilhelm, I created a proof of concept PR implementing the changes discussed here: #353. Please feel free to have a look and comment (specially about the auxiliary documentation). I noticed a few things, and I would like to know your opinion before keep working on the PR:
|
Beta Was this translation helpful? Give feedback.
-
Hi @abravalheri, many valid points especially update the fact that updating becomes easier if we have separate files. Looking at
external configs are:
So what would be our rule of thumb if a configuration is rather an external file or included in Another rule could be: If the config file is from an (internal) extension and thus can be deactivated, it stays in a separate config. This rule would also work but might be confusing for the users as it's rather an implementation detail of PyScaffold. Speaking about extensions, I wonder if So what do you think about:
|
Beta Was this translation helpful? Give feedback.
-
Sorry if my posts are bit confusing. I prefer oral discussions. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much @FlorianWilhelm and @CarliJoy for the feedback. I agree that moving forward we need to come up with a rule of thumb for where to put the configuration files, and you guys did a really nice job in explaining some nice approaches. In my mind all the solutions presented make sense [a) short/stable/not-"deactivatable" configs go to However, I would like to propose to postpone this decision to v5. Right now, even if we do our best to centralise all the tools in a single place there will always be tools that accept only either As previously stated, this does not change the fact that we can merge 8bb4428 right now (or at least after fixing eventual bugs, regardless of the decision of the configurations). |
Beta Was this translation helpful? Give feedback.
-
Issue to monitor the progress of setuptools: pypa/setuptools#2671 |
Beta Was this translation helpful? Give feedback.
-
Useful summary of supported config files (maybe outdated?): https://blog.pilosus.org/posts/2019/12/26/python-third-party-tools-configuration/ |
Beta Was this translation helpful? Give feedback.
-
I have created the experimental ini2toml package that could help us with this... It is possible to install it with The |
Beta Was this translation helpful? Give feedback.
-
After the chat with @RonnyPfannschmidt, just as a note what the alternatives to
|
Beta Was this translation helpful? Give feedback.
-
A couple things to note about config files:
One example of the second reason is have pylint generate a config file with all the options. I find it very convenient to use, as it has all the options and descriptions. However, if I used multiple tools that had very large config files and merged it all into pyproject.toml things would get ugly in a hurry. I also seem to remember reading that it was never the intent that pyproject.toml hold all tool configuration information, but rather it held the required information about the builds system being used. I'll have to look for the reference. |
Beta Was this translation helpful? Give feedback.
-
Another part of this topic just occurred to me. Many editors run tools while editing via some sort of integration. I have been using vscode lately and it runs linting continuously and formatting when I save a file. I've used it mostly for a javascript project, so I don't have much knowledge about python tool integration. One thing about vscode tool integration is it allows some of the tools to be configured in vscode settings or in rcfiles for the tool. I always use the rcfile because I want to be able to run tools on the command line, such as in precommit. Does anyone know if putting settings for tools in pyproject.toml has any affect on editor integration? |
Beta Was this translation helpful? Give feedback.
-
For those interested in seeing how the
|
Beta Was this translation helpful? Give feedback.
-
To revive this thread and also with regard to version 5. There are more and more build systems out there and if we ever gonna drop setuptools for something else, we should evaluate at least PDM, Hatch, Poetry, PyFlow and Flit. For comments on Poetry and Flit see above and @RonnyPfannschmidt seems to be a proponent of Hatch. Also my colleague @zotroneneis looks into these tools right now, which is certainly very helpful to us. Are there any news about the development of setuptools @abravalheri? Maybe with respect to dropping |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? It would be nice to move away from the mixed use of setup.cfg and pyproject.toml to have -only- pyproject.toml |
Beta Was this translation helpful? Give feedback.
-
Describe your use-case
There is a deciated isort.cfg file but no other tool (besides pre-commit) has its one config file, thats confusing.
Also isort.cfg only get added if --pre-commit is used.
Describe the solution you would like to see for your use-case
Add the isort.cfg into
pyproject.toml
orsetup.cfg
(both possible according to https://pycqa.github.io/isort/docs/configuration/config_files/)Then it would be also okay (IMO) to include the settings by default in the pyproject.toml because they are related to the other tools (black for instance) used by the template.
IMO that would be the best and easiest solution:
Beta Was this translation helpful? Give feedback.
All reactions