Skip to content

Commit

Permalink
Merge pull request netneurolab#112 from yarikoptic/enh-codespell
Browse files Browse the repository at this point in the history
codespell: action (to prevent typos in the future), config + typos fixed
  • Loading branch information
liuzhenqi77 authored Nov 27, 2023
2 parents e1f4fcb + 12d898b commit 539d80e
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 17 deletions.
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
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Reference API

.. _ref_points:

:mod:`neuromaps.points` - Triangle mesh utilites
:mod:`neuromaps.points` - Triangle mesh utilities
------------------------------------------------
.. automodule:: neuromaps.points
:no-members:
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Requirements

In order to effectively use ``neuromaps`` you must have the `Connectome
Workbench <https://www.humanconnectome.org/software/connectome-workbench>`_
installed and accesible on your computer. Large portions of the functionality
installed and accessible on your computer. Large portions of the functionality
of the ``neuromaps`` toolbox rely on a few of the functions from the
Connectome Workbench. You can follow `instructions here
<https://www.humanconnectome.org/software/get-connectome-workbench>`_ for
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/comparisons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ There are four options for the ``resampling`` parameters:

The default ('downsample_only') specifies that the higher-resolution map will
be transformed to the space of the lower-resolution map. This ensures that we
are never artifically "creating" (i.e., upsampling) data that does not exist.
are never artificially "creating" (i.e., upsampling) data that does not exist.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/transformations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ system is involved), which we discuss below.
Transforming from volumetric spaces
-----------------------------------

Curently ``neuromaps`` only supports transforming brain annotations *from*
Currently ``neuromaps`` only supports transforming brain annotations *from*
MNI152 volumetric space to one of the other three surface-based coordinate
systems (though work in ongoing to integrate transformations in the other
direction!). This transformation is achieved through a process known as
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_fetch_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
print(tags)

###############################################################################
# Tags can be used as a keyword argumnet with :func:`~.available_annotations`.
# Tags can be used as a keyword argument with :func:`~.available_annotations`.
# You can supply either a single tag or a list of tags. Note that supplying a
# list will only return those annotations that match ALL supplied tags:

Expand Down
2 changes: 1 addition & 1 deletion neuromaps/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
# TAG-NUM-gHEX
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
# unparsable. Maybe git-describe is misbehaving?
pieces["error"] = ("unable to parse git-describe output: '%s'"
% describe_out)
return pieces
Expand Down
6 changes: 3 additions & 3 deletions neuromaps/datasets/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def available_annotations(source=None, desc=None, space=None, den=None,
Values on which to match annotations. If not specified annotations with
any value for the relevant key will be matched. Default: None
return_restricted : bool, optional
Whether to return restricted annotations. These will only be accesible
Whether to return restricted annotations. These will only be accessible
with a valid OSF token. Default: True
Returns
Expand All @@ -142,7 +142,7 @@ def available_tags(return_restricted=False):
Parameters
----------
return_restricted : bool, optional
Whether to return restricted annotations. These will only be accesible
Whether to return restricted annotations. These will only be accessible
with a valid OSF token. Default: True
Expand Down Expand Up @@ -213,7 +213,7 @@ def fetch_annotation(*, source=None, desc=None, space=None, den=None, res=None,
source=source, desc=desc, space=space, den=den,
res=res, hemi=hemi, tags=tags, format=format)
if verbose > 1:
print(f'Identified {len(info)} datsets matching specified parameters')
print(f'Identified {len(info)} datasets matching specified parameters')

# get session for requests
session = _get_session(token=token)
Expand Down
6 changes: 3 additions & 3 deletions neuromaps/datasets/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Utilites for loading / creating datasets
Utilities for loading / creating datasets
"""

import json
Expand All @@ -21,7 +21,7 @@ def _osfify_urls(data, return_restricted=True):
data : object
If dict with a `url` key, will format OSF_API with relevant values
return_restricted : bool, optional
Whether to return restricted annotations. These will only be accesible
Whether to return restricted annotations. These will only be accessible
with a valid OSF token. Default: True
Returns
Expand Down Expand Up @@ -65,7 +65,7 @@ def get_dataset_info(name, return_restricted=True):
name : str
Name of dataset
return_restricted : bool, optional
Whether to return restricted annotations. These will only be accesible
Whether to return restricted annotations. These will only be accessible
with a valid OSF token. Default: True
Returns
Expand Down
9 changes: 5 additions & 4 deletions neuromaps/nulls/spins.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,11 @@ def gen_spinsamples(coords, hemiid, n_rotate=1000, check_duplicates=True,
True may increase the runtime of this function! Default: True
method : {'original', 'vasa', 'hungarian'}, optional
Method by which to match non- and rotated coordinates. Specifying
'original' will use the method described in [ST1]_. Specfying 'vasa'
will use the method described in [ST4]_. Specfying 'hungarian' will use
the Hungarian algorithm to minimize the global cost of reassignment
(will dramatically increase runtime). Default: 'original'
'original' will use the method described in [ST1]_. Specifying 'vasa'
will use the method described in [ST4]_. Specifying 'hungarian' will
use the Hungarian algorithm to minimize the global cost of
reassignment (will dramatically increase runtime).
Default: 'original'
seed : {int, np.random.RandomState instance, None}, optional
Seed for random number generation. Default: None
verbose : bool, optional
Expand Down
2 changes: 1 addition & 1 deletion neuromaps/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _fix_facecolors(ax, facecolors, vertices, faces, view, hemi):
Returns
-------
colors : (F,) array_like
Updated facecolors with approriate shading
Updated facecolors with appropriate shading
"""

hemi_view = {'R': {'lateral': 'medial', 'medial': 'lateral'}}
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[build-system]
requires = ["setuptools >= 38.3.0", "wheel", "versioneer-518"]
build-backend = "setuptools.build_meta"

[tool.codespell]
skip = '.git,*.pdf,*.svg,versioneer.py'
#
# ignore-words-list = ''

0 comments on commit 539d80e

Please sign in to comment.