napari / cookiecutter-napari-plugin

Cookiecutter for napari plugins
BSD 3-Clause "New" or "Revised" License
67 stars 39 forks source link

Docstrings describing inputs to writer functions #154

Closed GenevieveBuckley closed 1 year ago

GenevieveBuckley commented 1 year ago

The cookiecutter writer functions do not describe what inputs they expect adequately. This PR attempts to improve that.

In particular, it is confusing because the input data in function write_single_image is not the same type of object as the input data in function write_multiple.

I've used numpy style docstring formatting here, mostly because I didn't see enough other docstrings to know what docstring format I should use for this project. We can change it, of course.

GenevieveBuckley commented 1 year ago

Requested changes addressed. Should be good to merge when the CI tests pass

GenevieveBuckley commented 1 year ago

@jni when you get a sec could you merge this? Thanks

GenevieveBuckley commented 1 year ago

Done - good suggestions @jni

jni commented 1 year ago

Hmmm I thought #150 would fix the build but it didn't... If anyone has ideas about that (@Czaki @aganders3 @tlambert03?) I would appreciate them! The build logs aren't very informative:

>               raise CalledProcessError(retcode, process.args,
[1965](https://github.com/napari/cookiecutter-napari-plugin/actions/runs/4614369575/jobs/8157264751?pr=154#step:6:1968)
                                         output=stdout, stderr=stderr)
[1966](https://github.com/napari/cookiecutter-napari-plugin/actions/runs/4614369575/jobs/8157264751?pr=154#step:6:1969)
E               subprocess.CalledProcessError: Command '['pre-commit', 'run', '--all']' returned non-zero exit status 1.

from test_pre_commit_validity in all configurations...

Czaki commented 1 year ago

@jni the #156 is fixing pre-commit related things