Code Monkey home page Code Monkey logo

Comments (4)

tobyhodges avatar tobyhodges commented on September 10, 2024

Thank you for taking time to keep the lesson up-to-date with the latest changes in scikit-image, @mkcor.

I am concerned that this would introduce inconsistency in the way we are handling imports and might increase cognitive load. In most cases, we are importing some submodule of skimage rather than the whole thing (by my count, 14 of 19 scikit-image-related imports in the lesson import skimage.<something>). Aliasing skimage to ski would not be possible in these cases, and I think it would be a bit confusing for learners to see ski used in some cases but skimage used elsewhere.

So the question perhaps becomes: do we want to switch over to importing all of skimage instead of only specific submodules? I think @datacarpentry/image-processing-curriculum-maintainers talked about this once before, though I cannot find the notes now, and concluded that we are modeling better practice by importing specific submodules as needed.

from image-processing.

mkcor avatar mkcor commented on September 10, 2024

Hi @tobyhodges,

I think https://github.com/orgs/datacarpentry/teams/image-processing-curriculum-maintainers talked about this once before, though I cannot find the notes now, and concluded that we are modeling better practice by importing specific submodules as needed.

For educational materials, I'm also in favour of importing specific submodules. So let's forget about import skimage as ski. Do we want import skimage.filters or from skimage import filters though? I used to use the latter in scikit-image tutorials (e.g., from skimage import color, filters).

Currently, file episodes/06-blurring.md contains:

import skimage                                                                 
import skimage.filters

and

from skimage.filters import gaussian

elsewhere.

I'm happy to update #294 with import fixes if we agree on a convention for importing submodules. Thanks!

from image-processing.

tobyhodges avatar tobyhodges commented on September 10, 2024

I believe we prefer the import skimage.filters form because it is more explicit, making it easier for learners to identify where a particular function or submodule has come from.

I should really expand our lesson's CONTRIBUTING.md to mention some of these stylistic things. E.g. also #291 and #288

from image-processing.

mkcor avatar mkcor commented on September 10, 2024

Thank you, @tobyhodges! Done f477193.

from image-processing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.