achoudh5 / Manipulating_Excel_Sheet

Real world application of Manipulating Excel Sheet using python.
Apache License 2.0
8 stars 14 forks source link

applying pep8 character limit to the code Issue Issue #13 clean code in zip.py #31

Closed saisiddhant12 closed 3 years ago

saisiddhant12 commented 3 years ago

applying pep8 character limit to the code

Next Steps

  1. Break the code into adding more number of functions
  2. Include a config.yaml file
  3. Build class & Objects for the entire functionality
achoudh5 commented 3 years ago

@saisiddhant12 good stuff but I want you to think about where we will be using config.yaml. Will it be used for our Docker application or it can be used when we run zip.py? Also, made some comments on the PR!

saisiddhant12 commented 3 years ago

@saisiddhant12 good stuff but I want you to think about where we will be using config.yaml. Will it be used for our Docker application or it can be used when we run zip.py? Also, made some comments on the PR!

@achoudh5 we will use this as part of constructor while building class as each object will have this set of value

achoudh5 commented 3 years ago

@saisiddhant12 good stuff but I want you to think about where we will be using config.yaml. Will it be used for our Docker application or it can be used when we run zip.py? Also, made some comments on the PR!

@achoudh5 we will use this as part of constructor while building class as each object will have this set of value

@saisiddhant12 can you write a line or two with example of your thought process? I want to simplify it for anyone who later on picks up on this so they don't have to repeat the same thing! Let me know if it makes sense :)

saisiddhant12 commented 3 years ago

@saisiddhant12 good stuff but I want you to think about where we will be using config.yaml. Will it be used for our Docker application or it can be used when we run zip.py? Also, made some comments on the PR!

@achoudh5 we will use this as part of constructor while building class as each object will have this set of value

@saisiddhant12 can you write a line or two with example of your thought process? I want to simplify it for anyone who later on picks up on this so they don't have to repeat the same thing! Let me know if it makes sense :)

@achoudh5 definitely I will document it

saisiddhant12 commented 3 years ago

Process to consume the config file

The idea behind introducing a config file is to have the following features

  1. Any change to the data, source of data will be done over here without disturbing the codebase
  2. While creating an object of the class, these values will be initiated in default constructor init(), so that any instance of the class will have these as defaults and can be over ridden if required

Example to consume

classs network_alloc(): def init(self): with open(.config.config.yml) as config_file: self.object_config = yaml.load(config_file, Loader=yaml.FullLoader) self.c_green_a = self.object_config['network']['subnet']['first_sheet']['c_green_a'] self.c_grey_a = self.object_config['network']['subnet']['first_sheet']['c_grey_a']

achoudh5 commented 3 years ago

Thanks for your contribution @saisiddhant12