fsspec / community

Discussion space for conversations across multiple fsspec repos
5 stars 0 forks source link

create fsspec cookiecutter template #6

Open efiop opened 2 years ago

efiop commented 2 years ago

We have lots of inconsistencies across fsspec projects (ci, styling, linters, supported python versions, etc), which make it a pain to work with multiple projects at the same time.

We should create one recommended project template, put all recommended stuff into it and use cruft to keep the created projects up-to-date automatically. E.g. the template will contain a skeleton for new fs implementation, so automatic PRs would be a reminder to create new methods, as well as will try to add or remote particular python version support (though that could be handled by just creating an ABC for *FileSystem).

We use a similar approach in dvc plugins: https://github.com/iterative/cookiecutter-dvc-plugin

martindurant commented 2 years ago

Certainly sounds like a nice addition. Would you need a separate sync and async version?

efiop commented 2 years ago

@martindurant It could be a conditional in the same template. Cookiecutter will ask you if you want sync or async version.

martindurant commented 2 years ago

perfect!

efiop commented 2 years ago

After coming back to this over some time, I'm wondering if we should copy and adapt https://github.com/iterative/py-template Obviously I'm biased, but we've been searching for a good template and after not being satisfied by any particular one, @skshetry did a great job adapting https://github.com/cjolowicz/cookiecutter-hypermodern-python (threw out poetry as it is having problems when applied to libraries and seems to be a little polarising and a few other things). Any thoughts?

Created an empty https://github.com/fsspec/cookiecutter-fsspec to be able to create PRs in it.

martindurant commented 2 years ago

I think it's a great idea, and having one framework doesn't preclude anyone else making other ones if they feel like it. Of course it's most useful if we have a tutorial of how it is used.