Skip to content

Commit

Permalink
Documentation: Fix typos in docstrings, comments and variable names; #…
Browse files Browse the repository at this point in the history
…6628

Used the tool "codespell" to identify the typos.
  • Loading branch information
rdimaio authored and bari12 committed May 6, 2024
1 parent 2c389be commit 7327c57
Show file tree
Hide file tree
Showing 150 changed files with 462 additions and 462 deletions.
4 changes: 2 additions & 2 deletions bin/rucio
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def exception_handler(function):
used_account = '%s (from rucio.cfg)' % config_get('client', 'account')
except:
pass
try: # are we overriden by the environment?
try: # are we overridden by the environment?
used_account = '%s (from RUCIO_ACCOUNT)' % os.environ['RUCIO_ACCOUNT']
except:
pass
Expand Down Expand Up @@ -1550,7 +1550,7 @@ def list_rse_attributes(args):
"""
client = get_client(args)
attributes = client.list_rse_attributes(rse=args.rse)
table = [(k + ':', str(v)) for (k, v) in sorted(attributes.items())] # columns hav mixed datatypes
table = [(k + ':', str(v)) for (k, v) in sorted(attributes.items())] # columns have mixed datatypes
print(tabulate(table, tablefmt='plain', disable_numparse=True)) # disabling number parsing
return SUCCESS

Expand Down
16 changes: 8 additions & 8 deletions bin/rucio-admin
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def set_limits(args):
try:
byte_limit = int(limit_input)
except ValueError:
logger.error('The limit could not be set. Either you misspelled infinity or your input could not be converted to integer or you used a wrong pattern. Please use a format like 10GB with B,KB,MB,GB,TB,PB as units (not case sensistive)')
logger.error('The limit could not be set. Either you misspelled infinity or your input could not be converted to integer or you used a wrong pattern. Please use a format like 10GB with B,KB,MB,GB,TB,PB as units (not case sensitive)')
return FAILURE

client.set_account_limit(account=args.account, rse=args.rse, bytes_=byte_limit, locality=locality)
Expand Down Expand Up @@ -1384,7 +1384,7 @@ def get_parser():
oparser.add_argument('--oidc-refresh-lifetime', dest='oidc_refresh_lifetime', default=None, help='Max lifetime in hours for this an access token will be refreshed by asynchronous Rucio daemon. '
+ 'If not specified, refresh will be stopped after 4 days. This option is effective only if --oidc-scope includes offline_access scope for a refresh token to be granted to Rucio.') # NOQA: W503
oparser.add_argument('--oidc-issuer', dest='oidc_issuer', default=None,
help='Defines which Identity Provider is goign to be used. The issuer string must correspond '
help='Defines which Identity Provider is going to be used. The issuer string must correspond '
+ 'to the keys configured in the /etc/idpsecrets.json auth server configuration file.') # NOQA: W503

# Options for the x509 auth_strategy
Expand Down Expand Up @@ -1709,7 +1709,7 @@ def get_parser():
' $ rucio-admin identity delete --account jdoe --type X509 --id \'CN=Joe Doe,CN=707658,CN=jdoe,OU=Users,OU=Organic Units,DC=cern,DC=ch\'\n'
' Deleted identity: CN=Joe Doe,CN=707658,CN=jdoe,OU=Users,OU=Organic Units,DC=cern,DC=ch\n'
'\n'
'Note: if the identity was accidentaly deleted, use add option.\n'
'Note: if the identity was accidentally deleted, use add option.\n'
'\n')
identity_delete_parser.set_defaults(which='identity_delete')
identity_delete_parser.add_argument('--account', dest='account', action='store', help='Account name', required=True)
Expand Down Expand Up @@ -1957,7 +1957,7 @@ def get_parser():
' $ rucio-admin rse add-protocol --hostname jdoes.test.org --scheme gsiftp --prefix \'/atlasdatadisk/rucio/\' --port 8443 JDOE_DATADISK\n'
'\n'
'Note: no printed stdout.\n'
'Note: examples of optional parametres::\n'
'Note: examples of optional parameters::\n'
'\n'
' --space-token DATADISK\n'
' --web-service-path \'/srm/managerv2?SFN=\'\n'
Expand Down Expand Up @@ -2111,7 +2111,7 @@ def get_parser():

# The config subparser
config_parser = subparsers.add_parser('config',
help='Configuration methods. The global configuration of data mangement system can by modified.',
help='Configuration methods. The global configuration of data management system can by modified.',
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog='''e.g. quotas, daemons, rses''')
config_subparser = config_parser.add_subparsers(dest='config_subcommand', **required_arg)
Expand Down Expand Up @@ -2312,9 +2312,9 @@ def get_parser():
declare_bad_file_replicas_parser.add_argument('--inputfile', dest='inputfile', nargs='?', action='store', help='File containing list of bad items')
declare_bad_file_replicas_parser.add_argument('--allow-collection', dest='allow_collection', action='store_true', help='Allow passing a collection DID as bad item')

declare_bad_file_replicas_parser.add_argument('--lfns', dest='lfns', nargs='?', action='store', help='File cotaining list of LFNs for bad replicas. Requires --rse and --scope')
declare_bad_file_replicas_parser.add_argument('--scope', dest='scope', nargs='?', action='store', help='Common scope for bad replicas secified with LFN list, ignored wthout --lfns')
declare_bad_file_replicas_parser.add_argument('--rse', dest='rse', nargs='?', action='store', help='Common RSE for bad replicas secified with LFN list, ignored wthout --lfns')
declare_bad_file_replicas_parser.add_argument('--lfns', dest='lfns', nargs='?', action='store', help='File containing list of LFNs for bad replicas. Requires --rse and --scope')
declare_bad_file_replicas_parser.add_argument('--scope', dest='scope', nargs='?', action='store', help='Common scope for bad replicas specified with LFN list, ignored without --lfns')
declare_bad_file_replicas_parser.add_argument('--rse', dest='rse', nargs='?', action='store', help='Common RSE for bad replicas specified with LFN list, ignored without --lfns')

# The declare-temporary-unavailable command
declare_temporary_unavailable_replicas_parser = rep_subparser.add_parser('declare-temporary-unavailable',
Expand Down
4 changes: 2 additions & 2 deletions bin/rucio-auditor
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def main(args):
time.sleep(RETRY_AFTER)

# Avoid infinite loop if an alternative check() implementation doesn't
# decrement the number of attemps and keeps pushing failed checks.
# decrement the number of attempts and keeps pushing failed checks.
tmp_list = []
while not retry.empty():
tmp_list.append(retry.get())
Expand All @@ -149,7 +149,7 @@ def get_parser():
"""
Returns the argparse parser.
"""
parser = argparse.ArgumentParser(description="The auditor daemon is the one responsable for the detection of inconsistencies on storage, i.e.: dark data discovery.",
parser = argparse.ArgumentParser(description="The auditor daemon is the one responsible for the detection of inconsistencies on storage, i.e.: dark data discovery.",
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument(
'--nprocs',
Expand Down
2 changes: 1 addition & 1 deletion bin/rucio-automatix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_parser():
"""
Returns the argparse parser.
"""
parser = argparse.ArgumentParser(description="Automatix is a daemon used to inject random generated files to an RSE. It is used to continuosly check that an RSE is reachable and operating as spected.")
parser = argparse.ArgumentParser(description="Automatix is a daemon used to inject random generated files to an RSE. It is used to continuously check that an RSE is reachable and operating as expected.")
parser.add_argument("--run-once", action="store_true", default=False, help='Runs one loop iteration')
parser.add_argument("--input-file", action="store", default="/opt/rucio/etc/automatix.json", type=str, help='Automatix configuration')
parser.add_argument("--threads-per-process", action="store", default=1, type=int, help='Total number of workers per process')
Expand Down
2 changes: 1 addition & 1 deletion bin/rucio-conveyor-finisher
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_parser():
"""
Returns the argparse parser.
"""
parser = argparse.ArgumentParser(description="Conveyor is a group of daemons to manage file transfers. The conveyor-finisher is the resposible to update Rucio internal state after the transfer has finished.")
parser = argparse.ArgumentParser(description="Conveyor is a group of daemons to manage file transfers. The conveyor-finisher is the responsible to update Rucio internal state after the transfer has finished.")
parser.add_argument("--run-once", action="store_true", default=False,
help='One iteration only')
parser.add_argument("--total-threads", action="store", default=1, type=int,
Expand Down
4 changes: 2 additions & 2 deletions bin/rucio-conveyor-submitter
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Upload a file and create a replication rule::
$ rucio add-rule mock:file 1 MOCK2
$ rucio-admin rse add-distance MOCK2 MOCK --distance 1
The rule should replicate the file from RSE MOCK to RSE MOCK2. Therefor a distance between these RSEs is needed.
The rule should replicate the file from RSE MOCK to RSE MOCK2. Therefore a distance between these RSEs is needed.
Check transfer requests for the DID::
Expand All @@ -56,7 +56,7 @@ Check again the transfer requests for the DID::
session.get_session().query(models.Request).filter_by(scope='mock', name='file').first()
# {'request_type': TRANSFER, 'state': SUBMITTED', ...}
A tranfer request got created by executing the transfer. Depending on the transfer submission, the request state can be different. In this example the transfer got submitted successfully.
A transfer request got created by executing the transfer. Depending on the transfer submission, the request state can be different. In this example the transfer got submitted successfully.
When run in multi-VO mode, by default the daemon will run on RSEs from all VOs::
Expand Down
4 changes: 2 additions & 2 deletions bin/rucio-judge-evaluator
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ Check the replicas for the DID mock:file::
from rucio.db.sqla import session, models
session.get_session().query(models.RSEFileAssociation).filter_by(name='file', scope='mock').first()
// [{'name': 'file','lock_cnt': 1, 'state': COPYING, 'scope': 'mock', 'rse_id': 'f81f366593754c01b0c340fa5ea0ab90'},
// {'scope': 'mock', 'rse_id': '1330d5daee37474c88ba888101d7b859', 'name': 'file', 'state': AVAIABLE, 'lock_cnt': 1}]
// {'scope': 'mock', 'rse_id': '1330d5daee37474c88ba888101d7b859', 'name': 'file', 'state': AVAILABLE, 'lock_cnt': 1}]
The DID mock:file has now two replicas with one lock each.
As the file replica is attached to the dataset and the rule for the dataset specifies another RSE MOCK instead of the upload RSE, it has to be replicated to this RSE.
Therefor a second replica in state COPYING got created on RSE MOCK.
Therefore a second replica in state COPYING got created on RSE MOCK.
''', formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("--run-once", action="store_true", default=False, help='One iteration only')
parser.add_argument("--threads", action="store", default=1, type=int, help='Concurrency control: total number of threads for this process')
Expand Down
2 changes: 1 addition & 1 deletion bin/rucio-necromancer
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_parser():
parser = argparse.ArgumentParser(description="The Necromancer daemon is responsible for managing bad replicas. If a replica that got declared bad has other replicas, it will try to recover it by requesting a new transfer. If there are no replicas anymore, then the file gets marked as lost.", epilog='''
Lost replica:
In this example the file gets uploaded and will only have this replica as there are no replication rules. If it gets declared bad, there will be no replica to recover from.
Therefor the replica gets marked as lost.
Therefore the replica gets marked as lost.
Upload a file::
Expand Down
4 changes: 2 additions & 2 deletions bin/rucio-oauth-manager
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

"""
OAuth Manager is a daemon which is reponsible for:
OAuth Manager is a daemon which is responsible for:
- deletion of expired access tokens (in case there is a valid refresh token, expired access tokens will be kept until refresh_token expires as well.)
- deletion of expired OAuth session parameters
- refreshing access tokens via their refresh tokens.
Expand All @@ -32,7 +32,7 @@ def get_parser():
"""
parser = argparse.ArgumentParser(description='''
OAuth Manager is a daemon which is reponsible for:
OAuth Manager is a daemon which is responsible for:
- deletion of expired access tokens (in case there is a valid refresh token,
expired access tokens will be kept until refresh_token expires as well.)
- deletion of expired OAuth session parameters
Expand Down
4 changes: 2 additions & 2 deletions bin/rucio-replica-recoverer
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $ id0=`uuidgen`
$ id1=`uuidgen`
$ id2=`uuidgen`
$ id3=`uuidgen`
$ echo "file available on MOCK_RECOVERY and decalred suspicious on MOCK_SUSPICIOUS (11 times)" > /tmp/file_available_suspicious'_'$id1
$ echo "file available on MOCK_RECOVERY and declared suspicious on MOCK_SUSPICIOUS (11 times)" > /tmp/file_available_suspicious'_'$id1
$ echo "file available on MOCK_RECOVERY and declared suspicious on MOCK_SUSPICIOUS (11 times) and 1 time bad/deleted/lost on MOCK_SUSPICIOUS" > /tmp/file_available_suspicious_and_bad'_'$id2
$ echo "file declared as unavailable on MOCK_RECOVERY and declared as suspicious 11 times on MOCK_SUSPICIOUS" > /tmp/file_notavailable_suspicious'_'$id3
Expand Down Expand Up @@ -228,7 +228,7 @@ Note that attempting the use the ``--vos`` argument when in single-VO mode will
2020-07-28 15:21:33,349 5488 WARNING Ignoring argument vos, this is only applicable in a multi-VO setup.
''', formatter_class=argparse.RawDescriptionHelpFormatter) # NOQA: E501
parser.add_argument("--nattempts", action="store", default=5, help='Minimum count of suspicious file replica appearance in bad_replicas table. Default value is 5.')
parser.add_argument("--younger-than", action="store", default=5, help='Consider all file replicas logged in bad_replicas table since speicified number of younger-than days. Default value is 5.')
parser.add_argument("--younger-than", action="store", default=5, help='Consider all file replicas logged in bad_replicas table since specified number of younger-than days. Default value is 5.')
parser.add_argument('--vos', nargs='+', type=str, help='Optional list of VOs to consider. Only used in multi-VO mode.')
parser.add_argument("--run-once", action="store_true", default=False, help='One iteration only.')
parser.add_argument("--limit-suspicious-files-on-rse", action="store", default=5, help='Maximum number of suspicious replicas on an RSE before that RSE is considered problematic and the suspicious replicas on that RSE are declared "TEMPORARY_UNAVAILABLE". Default value is 5.')
Expand Down
2 changes: 1 addition & 1 deletion etc/docker/dev/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ When all the daemons ran you will be able to find the events in Kibana. If you r

Additionally, there is also a Grafana server running with one simple dashboard. You can access it at http://localhost:3000. The default credentials are "admin/admin". Also ActiveMQ web console can be accessed at http://localhost:8161.

If you would like to continously create some transfers and events there are scripts available for that. Open two different shells and in one run::
If you would like to continuously create some transfers and events there are scripts available for that. Open two different shells and in one run::

create_monit_data

Expand Down
2 changes: 1 addition & 1 deletion etc/ldap.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ldap_host = ldap-host.domain.name
baseDN = dc=foo,dc=bar,dc=domain,dc=
searchFilter = (objectClass=OpenLDAPperson)

# set as DEFAULT to use annonymous bind
# set as DEFAULT to use anonymous bind
username = DEFAULT
# Leave blank for prompt
password =
Expand Down
2 changes: 1 addition & 1 deletion etc/sql/oracle/procedures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ EXECUTE IMMEDIATE 'ALTER SESSION SET hash_area_size=2100000000';
-- rep_type = 1 if non locked rule with no expiration data. Permanent data
-- rep_type = 0 if non locked rule with expiration date. Temporary data
-- 28th May 2018, version 1.6, added check for the number or rows when the CURRTIME is null
-- 10th Oct 2017, version 1.5, The CURRTIME is populated only at the end of the work because of the Monit Flume JDBC sorce
-- 10th Oct 2017, version 1.5, The CURRTIME is populated only at the end of the work because of the Monit Flume JDBC source
-- Direct select - insert instead of passing data via collection.
-- Added 3 more metrics (columns to the RUCIO_ACCOUNTING_TAB and HIST tables) on which is based the computation TIER, SPACETOKEN, GRP_DATATYPE

Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/client/accountclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def list_accounts(self, account_type=None, identity=None, filters=None):
:param type: The account type
:param identity: The identity key name. For example x509 DN, or a username.
:param filters: A dictionnary key:account attribute to use for the filtering
:param filters: A dictionary key:account attribute to use for the filtering
:return: a list containing account info dictionary for all rucio accounts.
:raises AccountNotFound: if account doesn't exist.
Expand Down
6 changes: 3 additions & 3 deletions lib/rucio/client/baseclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _get_creds(self, creds: Optional[dict[str, Any]]) -> dict[str, Any]:
if self.auth_type == 'oidc':
if not creds:
creds = {}
# if there are defautl values, check if rucio.cfg does not specify them, otherwise put default
# if there are default values, check if rucio.cfg does not specify them, otherwise put default
if 'oidc_refresh_lifetime' not in creds or creds['oidc_refresh_lifetime'] is None:
creds['oidc_refresh_lifetime'] = config_get('client', 'oidc_refresh_lifetime', False, None)
if 'oidc_issuer' not in creds or creds['oidc_issuer'] is None:
Expand Down Expand Up @@ -616,7 +616,7 @@ def __get_token_OIDC(self) -> bool:

else:
print("\nAccording to the OAuth2/OIDC standard you should NOT be sharing \n"
+ "your password with any 3rd party appplication, therefore, \n" # NOQA: W503
+ "your password with any 3rd party application, therefore, \n" # NOQA: W503
+ "we strongly discourage you from following this --oidc-auto approach.") # NOQA: W503
print("-------------------------------------------------------------------------")
auth_res = self._send_request(auth_url, get_token=True)
Expand Down Expand Up @@ -659,7 +659,7 @@ def __get_token_OIDC(self) -> bool:

self.auth_token = result.headers['x-rucio-auth-token']
if self.auth_oidc_refresh_active:
self.logger.debug("Reseting the token expiration epoch file content.")
self.logger.debug("Resetting the token expiration epoch file content.")
# reset the token expiration epoch file content
# at new CLI OIDC authentication
self.token_exp_epoch = None
Expand Down
2 changes: 1 addition & 1 deletion lib/rucio/client/didclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def list_dids(self, scope, filters, did_type='collection', long=False, recursive
path = '/'.join([self.DIDS_BASEURL, quote_plus(scope), 'dids', 'search'])

# stringify dates.
if isinstance(filters, dict): # backwards compatability for filters as single {}
if isinstance(filters, dict): # backwards compatibility for filters as single {}
filters = [filters]
for or_group in filters:
for key, value in or_group.items():
Expand Down

0 comments on commit 7327c57

Please sign in to comment.