Open Conchylicultor opened 2 years ago
FWIW, how would this be different from flit init?
flit init
/ poetry init
only create the pyproject.toml
on an existing my_project/
folder.
poetry new
create a minimal my_project/
folder (with __init__.py
, pyproject.toml
, README.md
)
I can see the attraction of the idea, but I think this kind of project setup & automation should be done in a separate tool, not as part of Flit itself.
cookiecutter is one such tool, and there's nothing to stop anyone making a 'Python project with Flit packaging' template for that. Maybe someone already has? Cookiecutter has never entirely clicked for me, though, because I like to start with an empty folder and add bits like packaging, tests, docs, CI when I'm ready for them. I'd be interested to see a tool based around adding pieces like that onto an existing project, like a more advanced cousin of flit init
and sphinx-quickstart
.
Of course, there's also value in keeping things simple and not forcing people to learn many different tools. That's why flit init
exists. But at present, I'm inclined to leave it at that and not add more features for setting up and modifying a project.
Tis true that initializing a project structure might be outside the scope of flit, however even the python.org manual on managing python packing only supplies a 'suggested' folder structure. And if you search around, there are hundreds of opinions.
So, for the new python user, a tool to setup a new project would be a huge benefit. Why not flit? It has a certain expectations on the structure.
Currently poetry has a
poetry new my_package
command which create a new folder containing the minimal required files to publish a project to PyPI.This is very convenient because I can publish a new PyPI project directly from the CLI:
However this is currently not possible with
flit
because the lack ofnew
command. Like everything in flit, the default template could be something minimal, like: