From 02e962f61ba57c345d660d31731af7b56d1c63a0 Mon Sep 17 00:00:00 2001 From: Blockstream Satellite Date: Wed, 10 Jul 2024 12:14:34 -0300 Subject: [PATCH] Clean up several typos Closes Blockstream/satellite#101 and Blockstream/satellite#103. --- blocksatcli/api/gpg.py | 2 +- blocksatcli/api/msg.py | 10 +++++----- blocksatcli/config.py | 2 +- blocksatcli/monitoring_api.py | 2 +- blocksatcli/satip.py | 2 +- blocksatcli/test_config.py | 2 +- blocksatcli/test_tsp.py | 2 +- blocksatcli/tsp.py | 6 +++--- doc/antenna-pointing.md | 2 +- doc/api.md | 2 -- doc/mkdocs.md | 4 +--- 11 files changed, 16 insertions(+), 20 deletions(-) diff --git a/blocksatcli/api/gpg.py b/blocksatcli/api/gpg.py index f8378977..4401f6b6 100644 --- a/blocksatcli/api/gpg.py +++ b/blocksatcli/api/gpg.py @@ -74,7 +74,7 @@ def create_keys(self, name, email, comment, passphrase=None): name_email=email, passphrase=self.passphrase) self.gpg.gen_key(key_params) - logger.info("Keys succesfully generated at {}".format( + logger.info("Keys successfully generated at {}".format( os.path.abspath(self.gpghome))) def prompt_passphrase(self, prompt=None): diff --git a/blocksatcli/api/msg.py b/blocksatcli/api/msg.py index 797fcace..707da4b5 100644 --- a/blocksatcli/api/msg.py +++ b/blocksatcli/api/msg.py @@ -312,11 +312,11 @@ def clearsign(self, gpg, sign_key): def verify(self, gpg, signer): """Verify signed (but non-encrypted) message from target signer - Detects whether the clearsigned plaintext messages comes from the + Detects whether the clear-signed plaintext messages comes from the specified signer. In the positive case, overwrite the "original" data container with the underlying data, excluding the signature. In other - words, if the verification is succesful, remove the signature and leave - the data only. + words, if the verification is successful, remove the signature and + leave the data only. Args: gpg : Gpg object. @@ -573,7 +573,7 @@ def generate(data, if (recipient is None): recipient = gpg.get_default_public_key()["fingerprint"] assert (recipient != defs.blocksat_pubkey), \ - "Defaul public key is not the user's public key" + "Default public key is not the user's public key" else: # Make sure the key exists gpg.get_public_key(recipient) @@ -617,7 +617,7 @@ def decode(data, gpg : Gpg object. Returns: - ApiMsg if the message is succesfully decoded, None otherwise. + ApiMsg if the message is successfully decoded, None otherwise. """ if ((not plaintext or sender) and gpg is None): diff --git a/blocksatcli/config.py b/blocksatcli/config.py index 76a687e9..78f2afdc 100644 --- a/blocksatcli/config.py +++ b/blocksatcli/config.py @@ -770,7 +770,7 @@ def get_rx_model(user_info): Note: this function differs from _get_rx_marketing_name(). The latter includes the satellite kit name. In contrast, this function returns the raw - vendeor-model string. + vendor-model string. """ return (user_info['setup']['vendor'] + " " + diff --git a/blocksatcli/monitoring_api.py b/blocksatcli/monitoring_api.py index 782b15e9..70ee4d73 100644 --- a/blocksatcli/monitoring_api.py +++ b/blocksatcli/monitoring_api.py @@ -545,7 +545,7 @@ def _register_thread(self, # - Sent over the API channel dedicated for authentication messages download_dir = None # Don't save messages interface = config.get_net_if(self.user_info) - recv_queue = queue.Queue() # save API donwloads on this queue + recv_queue = queue.Queue() # save API downloads on this queue listen_loop = ApiListener(recv_queue=recv_queue) listen_thread = threading.Thread(target=listen_loop.run, daemon=True, diff --git a/blocksatcli/satip.py b/blocksatcli/satip.py index ec2ad446..8672a3f1 100644 --- a/blocksatcli/satip.py +++ b/blocksatcli/satip.py @@ -144,7 +144,7 @@ def discover(self, src_port, interface): src_port: Source port. interface: Network interface. - Retuns: + Returns: List with the discovered devices """ diff --git a/blocksatcli/test_config.py b/blocksatcli/test_config.py index 4d304bb2..7c028738 100644 --- a/blocksatcli/test_config.py +++ b/blocksatcli/test_config.py @@ -231,7 +231,7 @@ def test_verify_chan_config(self): self.assertFalse(config.verify_chan_conf(info)) @patch('blocksatcli.util.ask_yes_or_no') - def test_cfg_reseting(self, mock_yes_or_no): + def test_cfg_resetting(self, mock_yes_or_no): # Create the config file test_info = {'test': 123} config.write_cfg_file(self.cfg_name, self.cfg_dir, test_info) diff --git a/blocksatcli/test_tsp.py b/blocksatcli/test_tsp.py index b77ddca9..bfdf9253 100644 --- a/blocksatcli/test_tsp.py +++ b/blocksatcli/test_tsp.py @@ -22,7 +22,7 @@ def test_file_save_prompt(self, mock_yes_or_no): def test_non_prompting_opts(self): # If the prompting options are not provided, the tsp command should be - # generated succesfully every time + # generated successfully every time tsp_handler = tsp.Tsp() args = self.parser.parse_args( ['--ts-monitor-bitrate', '--ts-monitor-sequence']) diff --git a/blocksatcli/tsp.py b/blocksatcli/tsp.py index b845167f..55a21e54 100644 --- a/blocksatcli/tsp.py +++ b/blocksatcli/tsp.py @@ -88,7 +88,7 @@ def gen_cmd(self, args, in_plugin=None): Args: in_plugin : List with input plugin command to be used by tsp. - Rerturns: + Returns: Boolean indicating whether a valid command was generated. """ @@ -148,8 +148,8 @@ def run(self, stdin=None): Args: stdin : Stdin to attach to the tsp process. - Rerturns: - Boolean indicating whether the process is running succesfully. + Returns: + Boolean indicating whether the process is running successfully. """ # Create a .tsduck.lastcheck file on the home directory to skip the diff --git a/doc/antenna-pointing.md b/doc/antenna-pointing.md index 2ffd8f00..31a1b51a 100644 --- a/doc/antenna-pointing.md +++ b/doc/antenna-pointing.md @@ -60,7 +60,7 @@ At this stage, you can leave the screws that control the azimuth angle slightly Assuming that the receiver is configured correctly and connected, your next step is to find the satellite. You will adjust the antenna pointing until the receiver can lock to the Blockstream Satellite signal. Please note that this is likely the most time-consuming part of the setup process, especially when doing it for the first time. As mentioned earlier, a single degree shifted on the dish represents a change of thousands of kilometers over the geosynchronous orbit. -The process will be easier with a laptop than can be watched while moving the antenna. If you cannot watch the computer, you’ll need two people: one to move the antenna and one to monitor the computer. +The process will be easier with a laptop that can be watched while moving the antenna. If you cannot watch the computer, you’ll need two people: one to move the antenna and one to monitor the computer. To start, make sure that your receiver is running. Depending on your type of receiver, this step involves one of the following commands: diff --git a/doc/api.md b/doc/api.md index 442d1ead..c2544310 100644 --- a/doc/api.md +++ b/doc/api.md @@ -14,8 +14,6 @@ The `blocksat-cli` command-line interface (CLI) provides a range of commands for > To install the CLI, please refer to the [installation instructions](quick-reference.md#cli-installation-and-upgrade). -> The API support on the CLI is available starting from version `0.3.0`. Please refer to instructions regarding how to [check and upgrade your CLI version](quick-reference.md#cli-installation-and-upgrade). - For details regarding the RESTful API, please refer to the [Satellite API's repository](https://github.com/Blockstream/satellite-api). diff --git a/doc/mkdocs.md b/doc/mkdocs.md index dcda2abe..6378d758 100644 --- a/doc/mkdocs.md +++ b/doc/mkdocs.md @@ -1,8 +1,6 @@ # MkDocs -An MkDocs setup is available for local development of docs and visualization -before pushing to Github Pages. Please run it as follows from the root -directory: +A MkDocs setup is available for local development of docs and visualization before pushing to Github Pages. Please run it as follows from the root directory: ```bash docker build -f doc/mkdocs.dockerfile -t blocksat-mkdocs .