Giter VIP home page Giter VIP logo

brainsss's People

Contributors

ashley-smart avatar ilanazs avatar jcsimon89 avatar lukebrez avatar mhturner avatar minseungchoi avatar poldrack avatar tacbox3 avatar yandanw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainsss's Issues

passing json string for command line args is overly complex

I checked on this with my development team and got several comments and suggestions:

I see two issues. The first is that it will violate expectations of CLI tools, which is fine if your documentation is good and users aren't picky. The second is that it's expecting the entire JSON to be a single string, so quotes are going to have to be carefully escaped and painful to debug. If I were to do this, I would probably make all of these --flag ARG arguments and then add in a special --json PATH argument that would allow you to pass in a file instead. I would not do JSON as a single positional argument.

The shell script is using the traditonal --flag styling, I'd recommend using a library like click (to help set the boolean flags etc) in python and then argv can be passed directly through the shell script without that inital switch statement.
or put everything in json files like [@Markiewicz] said, then your configuration is saved to some place other than the history file.

If you’re refactoring, I don’t really see a benefit of checking the args in the bash file - I think it’s more beneficial to have an argument parser in the python script (gives you type validation, help generation). Then you can remove L10-82 in the submission script and just replace with ARGS=($@)

I would probably just go with the third suggestion as I think it's simplest, though it will require some rework because args will be an argparse object rather than a dict, though it could be easily converted for backwards compatibilty. I will try these out and see.

wildcard imports in __init__.py

wildcard imports (import *) are problematic - e.g. https://rules.sonarsource.com/python/RSPEC-2208

they can be particularly confusing within init.py because they make it challenging to figure out where a particular function is coming from and many people don't think to look there to figure out what's going on.

since I found it, I'm happy to fix it, but it will require breaking changes throughout the code so wanted to first check on what you think about this.

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.