Giter VIP home page Giter VIP logo

dex-starr's Introduction

⚡ GitHub Stats ⚡

Github Stats Top Langs

dex-starr's People

Contributors

buried-in-code avatar

Watchers

 avatar

Forkers

bpepple

dex-starr's Issues

Create and use Default values for Config instead of throwing errors

After taking a closer look at how I implemented the tests rather than loading a test config, they try and load it how Comic-Organizer would for any user.

Really, I'd say this is actually a bug that was exposed.

By hard-coding a config file location without any type of error handling you're making this section of the code fairly brittle. A better solution would be to gracefully exit if the file isn't found, or to create an empty file and then error out if any info is missing when needed. Really all those variables (COMICVINE_API_KEY, LEAGUE_API_KEY, etc) should be using default values (None, "", etc) if for some reason their keys are not in config file.

There are a lot of different ways to implement this depending on your needs, for most of my simple projects I tend to use something like this:

https://github.com/bpepple/metron-tagger/blob/master/metrontagger/taggerlib/settings.py

Anyway, something to think about.

Originally posted by @bpepple in #16 (comment)

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.