Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codespell: workflow and some typos fixed #176

Merged
merged 6 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ repos:
- types-appdirs
- types-paramiko
- types-simplejson
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion datashuttle/command_line_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def main() -> None:
should match the datashuttle API function name.

Next, initialise a datashuttle project using the API.
Supress the warning that a config file must
Suppress the warning that a config file must
be made on project initialisation when
a config is being made.

Expand Down
2 changes: 1 addition & 1 deletion datashuttle/datashuttle.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def upload(
data type folder to upload.
ses_names :
a session name / list of session names, similar to
sub_names but requring a "ses-" prefix.
sub_names but requiring a "ses-" prefix.
dry_run :
perform a dry-run of upload. This will output as if file
transfer was taking place, but no files will be moved. Useful
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"substitution",
"tasklist",
]
# Automatically add achors to markdown headings
# Automatically add anchors to markdown headings
myst_heading_anchors = 3

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/pages/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ To discuss, contribute or give feedback on DataShuttle, please check out our dis

## Python API Guide

DataShuttle can be used through the command line interface (as exampled in the *Get Started* section) or through a Python API. All commands shown in the *Get Started* guide can be used similarly in the Python API (with hypens replaced by underscores).
DataShuttle can be used through the command line interface (as exampled in the *Get Started* section) or through a Python API. All commands shown in the *Get Started* guide can be used similarly in the Python API (with hyphens replaced by underscores).

To start a project in Python, import DataShuttle and initialise the project class:

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,8 @@ ignore = [

[project.scripts]
datashuttle = "datashuttle.command_line_interface:main"

[tool.codespell]
skip = '.git,*.pdf,*.svg'
#
# ignore-words-list = ''
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

FILESYSTEM_PATH and SERVER_PATH these must point
to the same folder on the HPC, filesystem,
as a moutned drive and server as the linux path to
as a mounted drive and server as the linux path to
connect through SSH
"""
import platform
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def get_top_level_folder_path(

assert (
folder_name in canonical_folders.get_top_level_folders()
), "folder_name must be cannonical e.g. rawdata"
), "folder_name must be canonical e.g. rawdata"

if local_or_central == "local":
base_path = project.cfg["local_path"]
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_integration/test_command_line_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_multiple_inputs(self, command):
"""
To process lists, a syntax "<>" is used
to specify input is list. Check the passed
varialbes are processed as expected.
variables are processed as expected.
"""
stdout, stderr = test_utils.run_cli(
f"{command} "
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_integration/test_ssh_file_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_all_data_transfer_options(
):
"""
Parse the arguments to filter the pathtable, getting
the files expected to be transferred pased on the arguments
the files expected to be transferred passed on the arguments
Note files in sub/ses/datatype folders must be handled
separately to those in non-sub, non-ses, non-data-type folders

Expand Down