def fetch_metadata(self): """ @brief collect metadata from the user """ self.driver_make = prompt.text("Driver Make") self.driver_model = prompt.text("Driver Model") self.driver_name = prompt.text("Driver Name") self.metadata = Metadata(self.driver_make, self.driver_model, self.driver_name)
def fetch_metadata(self): """ @brief collect metadata from the user """ self.driver_make = prompt.text('Driver Make') self.driver_model = prompt.text('Driver Model') self.driver_name = prompt.text('Driver Name') self.metadata = Metadata(self.driver_make, self.driver_model, self.driver_name)
def get_from_console(self): """ @brief Read metadata from the console and initialize the object. Continue to do this until we get valid input. """ self.instrument_class = prompt.text( 'Instrument Class', self.instrument_class ) self.name = prompt.text( 'Driver Name', self.name ) self.author = prompt.text( 'Author', self.author ) self.email = prompt.text( 'Email', self.email ) self.notes = prompt.multiline( 'Release Notes', self.notes ) if( self.confirm_metadata() ): self.store_to_file() else: return self.get_from_console()
def get_from_console(self): """ @brief Read metadata from the console and initialize the object. Continue to do this until we get valid input. """ self.driver_make = prompt.text('Driver Make', self.driver_make) self.driver_model = prompt.text('Driver Model', self.driver_model) self.driver_name = prompt.text('Driver Name', self.driver_name) self.author = prompt.text('Author', self.author) self.email = prompt.text('Email', self.email) self.notes = prompt.multiline('Release Notes', self.notes) if (self.confirm_metadata()): self.store_to_file() else: return self.get_from_console()
def _store_resource_files(self): """ @brief Store additional files added by the driver developer. These files life in the driver resource dir. """ log.debug( " -- Searching for developer added resource files." ) for file in os.listdir(self.generator.resource_dir()): log.debug(" ++ found: " + file) desc = prompt.text( 'Describe ' + file ) self._add_file(self.generator.resource_dir() + "/" + file, 'resource', desc)
def _store_resource_files(self): """ @brief Store additional files added by the driver developer. These files life in the driver resource dir. """ log.debug(" -- Searching for developer added resource files.") for file in os.listdir(self.generator.resource_dir()): log.debug(" ++ found: " + file) desc = prompt.text('Describe ' + file) self._add_file(self.generator.resource_dir() + "/" + file, 'resource', desc)
def get_from_console(self): self.device_addr = prompt.text("Device Address", self.device_addr) self.device_port = prompt.text("Device Port", self.device_port) self.server_addr = prompt.text("Server Address", self.server_addr) self.server_port = prompt.text("Server Port", self.server_port) CommConfig.get_from_console(self)
def get_from_console(self): self.device_addr = prompt.text('Device Address', self.device_addr) self.device_port = prompt.text('Device Port', self.device_port) self.server_addr = prompt.text('Server Address', self.server_addr) self.server_port = prompt.text('Server Port', self.server_port) CommConfig.get_from_console(self)