From d793fa80515058bae6e474ed07c14ff9f0e1a343 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 19 Sep 2018 15:57:00 +0100 Subject: [PATCH] Correct spelling mistakes. --- TODO.rst | 2 +- docs/applications.rst | 2 +- docs/gaffer.rst | 2 +- docs/gafferpm_ext.py | 2 +- docs/getting-started.rst | 10 +++++----- docs/index.rst | 2 +- docs/news.rst | 4 ++-- docs/overview.rst | 8 ++++---- examples/sockjs/chat/chat_console.py | 2 +- gaffer/cli/commands/key.py | 2 +- gaffer/cli/commands/ps.py | 2 +- gaffer/console_output.py | 4 ++-- gaffer/events.py | 2 +- gaffer/gafferd/http.py | 2 +- gaffer/gafferd/keys.py | 2 +- gaffer/gafferd/main.py | 2 +- gaffer/gafferd/users.py | 6 +++--- gaffer/lookupd/registry.py | 2 +- gaffer/manager.py | 12 ++++++------ gaffer/message.py | 4 ++-- gaffer/process.py | 12 ++++++------ gaffer/webhooks.py | 4 ++-- 22 files changed, 45 insertions(+), 45 deletions(-) diff --git a/TODO.rst b/TODO.rst index 0e03c94..8ba6452 100644 --- a/TODO.rst +++ b/TODO.rst @@ -1,5 +1,5 @@ TODO ==== -- deployement solution +- deployment solution - add ui to admin gaffer diff --git a/docs/applications.rst b/docs/applications.rst index 8324dc5..a5e5a75 100644 --- a/docs/applications.rst +++ b/docs/applications.rst @@ -2,7 +2,7 @@ Gaffer applications =================== Gaffer applications are applications that are started by the manager. A -gaffer application can be used to interract with the manager or +gaffer application can be used to interact with the manager or listening on events. An application is a class with the following structure:: diff --git a/docs/gaffer.rst b/docs/gaffer.rst index ae2af22..fe0dd4a 100644 --- a/docs/gaffer.rst +++ b/docs/gaffer.rst @@ -83,7 +83,7 @@ SUBCOMMANDS folder. **ps** [] - List your processes informations + List your processes information he name of the application (session) of process recoreded in gafferd. By default it will be the name of your diff --git a/docs/gafferpm_ext.py b/docs/gafferpm_ext.py index 335ae13..73448fa 100644 --- a/docs/gafferpm_ext.py +++ b/docs/gafferpm_ext.py @@ -89,7 +89,7 @@ load Load a Procfile application to gafferd unload Unload a Procfile application to gafferd scale Scaling your process - ps List your process informations + ps List your process information help Get help on a command """ diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 7a50a90..e971f62 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -103,7 +103,7 @@ parameters are: - **cmd**: the full command line to launch. eg. ``./dummy.p¨`` - **args**: arguments to pass as a string. eg. ``-some value --option=a`` -- **cwd**: path to working directorty +- **cwd**: path to working directory - **uid**: user name or id used to execute the process - **gid**: group name or id used to execute the process - **detach**: if you wnt to completely detach the process from gafferd @@ -111,9 +111,9 @@ parameters are: - **shell**: The process is executed in a shell (unix only) - **flapping**: flapping rule. eg. `2, 1., 7., 5` which means attempts=2, window=1., retry_in=7., max_retry=5 -- **redirect_input**: to allows you to interract with stdin +- **redirect_input**: to allows you to interact with stdin - **redirect_output**: to watch both stdout & stderr. output names can - be whatever you cant. For example you. eg. ``redirect_output = + be whatever you want. For example you. eg. ``redirect_output = mystdout, mystderr`` stdout will be labelled *mysdtout* in this case. - **graceful_timeout**: time to wait before definitely kill a process. @@ -128,7 +128,7 @@ parameters are: processes have the same order. -Sometimes you also want to pass a custom environnement to your process. +Sometimes you also want to pass a custom environment to your process. This is done by creating a special configuration section named ``env:processname``. Each environmenets sections are prefixed by ``env:``. For example to pass a special PORT environment variable to @@ -195,7 +195,7 @@ and then scale them up and down:: .. image:: _static/gaffer_ps.png -have a look on the :doc:`gaffer` page for more informations about the +have a look on the :doc:`gaffer` page for more information about the commands. diff --git a/docs/index.rst b/docs/index.rst index 779b6a4..2571a09 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -32,7 +32,7 @@ Features a gaffer node from any browser or SOCKJS client. - Framework to manage and interact your applications and jobs on differerent machines - - Server and :doc:`command-line` tools to manage and interract with your + - Server and :doc:`command-line` tools to manage and interact with your processes - manages topology information. Clients query gaffer_lookupd to discover gaffer nodes for a specific job or application. diff --git a/docs/news.rst b/docs/news.rst index ad02d24..e74f195 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -6,7 +6,7 @@ CHANGES - new intermediary release. See https://github.com/benoitc/gaffer/compare/0.4.4...0.5.0 for a - detailled changelog. + detailed changelog. 2012/12/20 - version 0.4.4 @@ -33,7 +33,7 @@ CHANGES 2012/10/29 - version 0.4.0 -------------------------- -- add environent variables support in the gafferd setting file. +- add environment variables support in the gafferd setting file. - add a plugin system to easily extend :doc:`gafferd` using HTML sites or gaffer applications in Python diff --git a/docs/overview.rst b/docs/overview.rst index b13959c..18c8fd7 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -58,7 +58,7 @@ Current properties for each template: and try to spawn them - **max_retry**: maximum number of retry before we give up and stop the process. -- **redirect_output**: list of io to redict (max 2) this is a list of custom +- **redirect_output**: list of io to redirect (max 2) this is a list of custom labels to use for the redirection. Ex: ["a", "b"] will redirect stdoutt & stderr and stdout events will be labeled "a" - **redirect_input**: Boolean (False is the default). Set it if @@ -130,7 +130,7 @@ Watch stats ----------- Stats of a process can be monitored continuously (there is a refresh -interval of 0.1s to fetch CPU informations) using the following +interval of 0.1s to fetch CPU information) using the following method:: manager.monitor(, ) @@ -237,7 +237,7 @@ write at the same time. This method is threadsafe. HTTP API -------- -See the :doc:`HTTP api description ` for more informations. +See the :doc:`HTTP api description ` for more information. Tools ----- @@ -248,4 +248,4 @@ processes without having to code. It can be used like `supervisor `_ or other tools around. Speaking of runit a similar controlling will be available in 0.2 . -See the :doc:`command-line` documentation for more informations. +See the :doc:`command-line` documentation for more information. diff --git a/examples/sockjs/chat/chat_console.py b/examples/sockjs/chat/chat_console.py index 30e55b9..eef5c70 100644 --- a/examples/sockjs/chat/chat_console.py +++ b/examples/sockjs/chat/chat_console.py @@ -26,7 +26,7 @@ def on_input(self, handle, data, err): class ChatReader(WebSocket): def on_open(self): - print("connection openned") + print("connection opened") self.console = Input(self) def on_message(self, data): diff --git a/gaffer/cli/commands/key.py b/gaffer/cli/commands/key.py index ca909d9..e4aeda7 100644 --- a/gaffer/cli/commands/key.py +++ b/gaffer/cli/commands/key.py @@ -29,7 +29,7 @@ def run(self, config, args): permissions = key.get('permissions', {}) print("Key %r found." % args['']) print("Label: %s" % key.get("label", "")) - print("Permisssions:") + print("Permissions:") display_permissions(permissions) def display_permissions(permissions): diff --git a/gaffer/cli/commands/ps.py b/gaffer/cli/commands/ps.py index c0d7320..7d16bcf 100644 --- a/gaffer/cli/commands/ps.py +++ b/gaffer/cli/commands/ps.py @@ -17,7 +17,7 @@ class Ps(Command): """ name = "ps" - short_descr = "list your processes informations" + short_descr = "list your processes information" def run(self, config, args): balance = copy.copy(GAFFER_COLORS) diff --git a/gaffer/console_output.py b/gaffer/console_output.py index 730c837..60daf73 100644 --- a/gaffer/console_output.py +++ b/gaffer/console_output.py @@ -33,7 +33,7 @@ class Color(object): """ wrapper around colorama to ease the output creation. Don't use it directly, instead, use the ``colored(name_of_color, lines)`` to - return the colored ouput. + return the colored output. Colors are: cyan, yellow, green, magenta, red, blue, intense_cyan, intense_yellow, intense_green, intense_magenta, @@ -43,7 +43,7 @@ class Color(object): """ def __init__(self): - # intialize colors code + # initialize colors code colors = {} for color in GAFFER_COLORS: c = color.upper() diff --git a/gaffer/events.py b/gaffer/events.py index b8b93aa..4f778b7 100644 --- a/gaffer/events.py +++ b/gaffer/events.py @@ -181,7 +181,7 @@ def publish(self, evtype, *args, **kwargs): self._dispatch_event() def subscribe(self, evtype, listener, once=False): - """ subcribe to an event """ + """ subscribe to an event """ if evtype == ".": # wildcard self._wildcards.add((once, listener)) diff --git a/gaffer/gafferd/http.py b/gaffer/gafferd/http.py index 8de02cc..0cc9548 100644 --- a/gaffer/gafferd/http.py +++ b/gaffer/gafferd/http.py @@ -73,7 +73,7 @@ def __init__(self, config, plugin_manager=None, **settings): self.clients = dict() - # intialize the config + # initialize the config self.init_config() diff --git a/gaffer/gafferd/keys.py b/gaffer/gafferd/keys.py index 7bd8154..d3a50ae 100644 --- a/gaffer/gafferd/keys.py +++ b/gaffer/gafferd/keys.py @@ -326,7 +326,7 @@ def __init__(self, loop, cfg): if self.dbname != ":memory:": self.dbname = os.path.join(cfg.config_dir, self.dbname) - # intitialize conn + # initialize conn self.conn = None def open(self): diff --git a/gaffer/gafferd/main.py b/gaffer/gafferd/main.py index 53b9625..466e361 100644 --- a/gaffer/gafferd/main.py +++ b/gaffer/gafferd/main.py @@ -202,7 +202,7 @@ def run(self): # initialize the plugin manager self.plugin_manager = PluginManager(self.cfg.plugin_dir) - # check if any plugin dependancy is missing + # check if any plugin dependency is missing self.plugin_manager.check_mandatory() # initialize the manager diff --git a/gaffer/gafferd/users.py b/gaffer/gafferd/users.py index 178b9d9..9565b18 100644 --- a/gaffer/gafferd/users.py +++ b/gaffer/gafferd/users.py @@ -17,7 +17,7 @@ class UserNotFound(Exception): class UserConflict(Exception): - """ exception raised when you try to create an already exisiting user """ + """ exception raised when you try to create an already existing user """ class User(object): """ instance representing an authenticated user """ @@ -165,7 +165,7 @@ def _check_password(self, a, b): if len(a) != len(b): return False - # do a binary comparaison of password hashes + # do a binary comparison of password hashes rv = 0 for x, y in zip(a, b): rv |= ord(x) ^ ord(y) @@ -246,7 +246,7 @@ def __init__(self, loop, cfg): if self.dbname != ":memory:": self.dbname = os.path.join(cfg.config_dir, self.dbname) - # intitialize conn + # initialize conn self.conn = None def open(self): diff --git a/gaffer/lookupd/registry.py b/gaffer/lookupd/registry.py index e0b4217..f9a1df2 100644 --- a/gaffer/lookupd/registry.py +++ b/gaffer/lookupd/registry.py @@ -26,7 +26,7 @@ class IdentExists(Exception): """ class AlreadyRegistered(Exception): - """ exception raised when a job is alreay registered """ + """ exception raised when a job is already registered """ class RemoteJob(object): diff --git a/gaffer/manager.py b/gaffer/manager.py index 9a03d39..881f4e7 100644 --- a/gaffer/manager.py +++ b/gaffer/manager.py @@ -3,7 +3,7 @@ # This file is part of gaffer. See the NOTICE for more information. """ The manager module is a core component of gaffer. A Manager is -responsible of maintaining processes and allows you to interract with +responsible of maintaining processes and allows you to interact with them. Classes @@ -109,7 +109,7 @@ def start(self, apps=[]): # manage processes self.events.subscribe('exit', self._on_exit) - # start contollers + # start controllers for mapp in self.mapps: mapp.start(self.loop, self) @@ -279,7 +279,7 @@ def unload(self, name_or_process, sessionid=None): self._stopall(state) def reload(self, name, sessionid=None): - """ reload a process config. The number of processes is resetted to + """ reload a process config. The number of processes is reset to the one in settings and all current processes are killed """ if not sessionid: @@ -396,7 +396,7 @@ def scale(self, name, n): m.scale("sometemplate", -1) # decrease of 1 m.scale("sometemplate", "+1") # increase of 1 m.scale("sometemplate", "-1") # decrease of 1 - m.scale("sometemplate", "=1") # set the number of processess to 1 + m.scale("sometemplate", "=1") # set the number of processes to 1 """ sessionid, name = self._parse_name(name) pname = "%s.%s" % (sessionid, name) @@ -738,7 +738,7 @@ def _shutdown(self): # h.close() #self.loop.walk(walk_cb) - # if there any stop callback, excute it + # if there any stop callback, execute it if self.stop_cb is not None: self.stop_cb(self) self.stop_cb = None @@ -900,7 +900,7 @@ def _reap_processes(self, state): # graceful time self._tracker.check(p, state.graceful_timeout) - # notify others that the process is beeing reaped + # notify others that the process is being reaped self._publish("reap", name=p.name, pid=p.pid, os_pid=p.os_pid) self._publish("job.%s.reap" % p.name, name=p.name, pid=p.pid, os_pid=p.os_pid) diff --git a/gaffer/message.py b/gaffer/message.py index efe8ba1..b975bb1 100644 --- a/gaffer/message.py +++ b/gaffer/message.py @@ -28,7 +28,7 @@ class Message(object): V1 type messageid\0body This simple messaging protocol allows us to pass any kind of blob as a - body and eventually a json while still beeing able to know the type of the + body and eventually a json while still being able to know the type of the message. """ @@ -60,7 +60,7 @@ def decode_frame(cls, frame): # the magic bit. _, type, id = header.split() - # return the message classe + # return the message class return cls(body, id=id, type=type) except ValueError: raise MessageError("invalid message %r" % frame) diff --git a/gaffer/process.py b/gaffer/process.py index bd183dd..34e49c4 100644 --- a/gaffer/process.py +++ b/gaffer/process.py @@ -257,7 +257,7 @@ def refresh(self, interval=0): def _start(self): if not self.active: self._timer = pyuv.Timer(self.loop) - # start the timer to refresh the informations + # start the timer to refresh the information # 0.1 is the minimum interval to fetch cpu stats for this # process. self._timer.start(self._async_refresh, 0.1, 0.1) @@ -291,7 +291,7 @@ def __init__(self, name, cmd, **settings): Settings: - **args**: the arguments for the command to run. Can be a list or - a string. If **args** is a string, it's splitted using + a string. If **args** is a string, it's split using :func:`shlex.split`. Defaults to None. - **env**: a mapping containing the environment variables the command will run with. Optional @@ -314,7 +314,7 @@ def __init__(self, name, cmd, **settings): and try to spawn them - **max_retry**: maximum number of retry before we give up and stop the process. - - **redirect_output**: list of io to redict (max 2) this is a list of custom + - **redirect_output**: list of io to redirect (max 2) this is a list of custom labels to use for the redirection. Ex: ["a", "b"] will redirect stdout & stderr and stdout events will be labeled "a" - **redirect_input**: Boolean (False is the default). Set it if @@ -415,7 +415,7 @@ class Process(object): - **name**: name of the process - **cmd**: program command, string) - **args**: the arguments for the command to run. Can be a list or - a string. If **args** is a string, it's splitted using + a string. If **args** is a string, it's split using :func:`shlex.split`. Defaults to None. - **env**: a mapping containing the environment variables the command will run with. Optional @@ -426,7 +426,7 @@ class Process(object): won't exit when the manager is stopped. - **shell**: boolean, run the script in a shell. (UNIX only) - - **redirect_output**: list of io to redict (max 2) this is a list of custom + - **redirect_output**: list of io to redirect (max 2) this is a list of custom labels to use for the redirection. Ex: ["a", "b"] will redirect stdoutt & stderr and stdout events will be labeled "a" - **redirect_input**: Boolean (False is the default). Set it if @@ -602,7 +602,7 @@ def os_pid(self): @property def info(self): """ return the process info. If the process is monitored it - return the last informations stored asynchronously by the watcher""" + return the last information stored asynchronously by the watcher""" # info we have on this process if self._info is None: diff --git a/gaffer/webhooks.py b/gaffer/webhooks.py index b46806b..c755a58 100644 --- a/gaffer/webhooks.py +++ b/gaffer/webhooks.py @@ -2,7 +2,7 @@ # # This file is part of gaffer. See the NOTICE for more information. """ -Webhooks allow to register an url to a specific event (or alls) and the +Webhooks allow to register an url to a specific event (or all) and the event will be posted on this URL. Each events can triger a post on a given url. @@ -12,7 +12,7 @@ [webhooks] create = http://echohttp.com/echo you -Or programatically:: +Or programmatically:: from gaffer.manager import Manager from gaffer.webhooks import WebHooks