-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
At the moment, the WPSClient's arguments are set at instantiation, and there is no public API to go from async to sync mode. The language setting can be changed, but at the expense of possibly shadowing processe with the same name.
These are the attributes for which we would want an API:
- self._converters = converters
- self._interactive = progress
- self._mode = ASYNC if progress else SYNC
- self.language
- self.languages
Options
- A configuration attribute object (
.settings,.config,._config, etc.) which would shadow only one name. - A more extensive refactoring, where processes are defined inside a specific
processattribute, so the call would bewps.process.word_counter(). - Same idea but with explicit mode :
wps.sync.word_counter,wps.async.word_counter.
Note that currently, changing the language using the language property will not reload the process descriptions, so maybe there is no point in being able to change the language after instantiation.
Maybe a first simple step is just to remove the properties and store the languages with underscores.
Metadata
Metadata
Assignees
Labels
No labels