GithubHelp home page GithubHelp logo

Comments (14)

cjh1 avatar cjh1 commented on July 18, 2024 2

This there consensus that we should use Girders style?

from girder_worker.

jeffbaumes avatar jeffbaumes commented on July 18, 2024

Just wanted to bubble this one back up, since this is the time where the new girder_worker code is starting to solidify.

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

As I raised this, I am happy to take on the conversion if we can decide on a style 😄

from girder_worker.

kotfic avatar kotfic commented on July 18, 2024

now would also be a good time as there are no major PR's open, or immediately planned

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

Is "Girder style" documented any where? All I found was this

from girder_worker.

zachmullen avatar zachmullen commented on July 18, 2024

We have a flake8 config file, the only other major difference is that girder uses camel case for historical reasons.

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

I will start with flake8, do we want CamelCase as well?

from girder_worker.

jeffbaumes avatar jeffbaumes commented on July 18, 2024

I thought it felt somewhat disjointed to have camel and underscore together, e.g. when writing a girder endpoint that uses girder_worker, so I'd vote to unify to camel. I'd want some actual dev input though before deciding. Is camel disliked enough that devs would rather have mixed underscore/camel code (and know what to use in what codebase) instead of going all camel?

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

The flake8 config currently used by girder_worker is pretty much the same as Girder's ( unsurprisingly )

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

Personally I prefer snake_case ( its also the convention else where ... ) but I also like consistency.

from girder_worker.

zachmullen avatar zachmullen commented on July 18, 2024

snake_case is now the officially sanctioned convention in python, but it would be much more disruptive to change girder to snake_case than to change the worker to camel case, so I'd also vote to do the latter.

from girder_worker.

cjh1 avatar cjh1 commented on July 18, 2024

May be this could help: https://github.com/abarker/camel-snake-pep8

from girder_worker.

danlamanna avatar danlamanna commented on July 18, 2024

I thought it felt somewhat disjointed to have camel and underscore together.

Agreed it does, and this is how most of Girder interacts with the rest of the Python ecosystem now. For instance just look at when Girder code meets other libraries (cherrypy, requests, pymongo, dogpile, boto, click, etc).

I think leaving GW as is might actually be better here, especially given that most task code is wrangling together other libraries which are almost all snake_case.

from girder_worker.

kotfic avatar kotfic commented on July 18, 2024

this morning i agreed with @cjh1 about consistency over my preference (snake_case) but i think dan brings up an important point. EIther way we should be ensuring we're consistent throughout girder worker (which i'm not sure we are) are there flake8 rules we can add that enforce snake_case/camel_case?

from girder_worker.

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.