GithubHelp home page GithubHelp logo

Refactor 'generate_csv()' about deltacode HOT 3 CLOSED

nexb avatar nexb commented on May 28, 2024
Refactor 'generate_csv()'

from deltacode.

Comments (3)

steven-esser avatar steven-esser commented on May 28, 2024

We should be able to refactor this much more. Your ideas are good, but I am almost certain there is more that we can do.

Right off the bat, the fact that we have to take 12 lines per 'category' to set each variable is very ugly. Also delta['old']['sha1'] is not a great way to reference values either.

Since we are working with the dictionary from to_dict, there is probably an easier way to go from dictionary values to csv.

Give it a try and see what you can do. I can try and write up some examples if you need me too, but you will have to give me some time to dig around and test possible solutions.

from deltacode.

johnmhoran avatar johnmhoran commented on May 28, 2024

Thanks @majurg -- I'll tackle #9 as you suggest and see what I can come up with. 👍

from deltacode.

steven-esser avatar steven-esser commented on May 28, 2024

merged, closing this.

from deltacode.

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.