diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..cf67a95 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,js +# ignore-words-list = diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..5768d7c --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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@v1 diff --git a/docs/dev_notes/testing.rst b/docs/dev_notes/testing.rst index 09e50ba..843a6b1 100644 --- a/docs/dev_notes/testing.rst +++ b/docs/dev_notes/testing.rst @@ -88,7 +88,7 @@ A browser window will be opened with a visualization looking like this. Posting test -It will close automatically. The test checks wether the returned configuration is equal to the posted configuration. +It will close automatically. The test checks whether the returned configuration is equal to the posted configuration. Reproducibility ~~~~~~~~~~~~~~~ diff --git a/docs/visualization/init.rst b/docs/visualization/init.rst index 2b9084e..45e459d 100644 --- a/docs/visualization/init.rst +++ b/docs/visualization/init.rst @@ -22,7 +22,7 @@ Other physics parameters are: * *Link distance variation*. Shortens the optimal distance of strong links. This is mostly useful in sparse networks as the link strengths in dense networks are small. Works well when link distance is large. * *Collision*: Implemented with `d3.forceCollide `_ with default strength (0.7) and makes overlapping nodes more unlikely. -* *Wiggle*: Sets the simulation *alphaTarget* to 1, causing nodes to move more freely. Useful for "wiggling" nodes out of place if the layout seems stuck in a local minumum. +* *Wiggle*: Sets the simulation *alphaTarget* to 1, causing nodes to move more freely. Useful for "wiggling" nodes out of place if the layout seems stuck in a local minimum. * *Freeze*: Stops the force simulation. The simulation is restarted when this is untoggled. When the network nodes have initial positions (given as node-attributes "x" and "y"), "Freeze" is enabled at launch, so that the initial positions are respected. diff --git a/netwulf/tests/test_all.py b/netwulf/tests/test_all.py index c1fac02..df6c29d 100644 --- a/netwulf/tests/test_all.py +++ b/netwulf/tests/test_all.py @@ -45,7 +45,7 @@ class Test(unittest.TestCase): maxDiff = None def test_posting(self): - """Test whether results are sucessfully posted to Python.""" + """Test whether results are successfully posted to Python.""" G = _get_test_network() visualize(G,is_test=True,config=_get_test_config()) @@ -58,7 +58,7 @@ def test_reproducibility(self): newprops, newconfig = visualize(G, config=config,is_test=True) # test if node positions are close within 1% and subsequently - # round all positional values to the 2nd positon (e.g. 451 => 450) + # round all positional values to the 2nd position (e.g. 451 => 450) _assert_positions_within_one_percent(props,newprops) _drastically_round_positions(props) _drastically_round_positions(newprops) @@ -66,7 +66,7 @@ def test_reproducibility(self): # the second visualization should have frozen the nodes assert(newconfig['freeze_nodes']) - # change it so the dictionary-equal-assertion doesnt fail + # change it so the dictionary-equal-assertion doesn't fail newconfig['freeze_nodes'] = False self.assertDictEqual(props, newprops) diff --git a/netwulf/tools.py b/netwulf/tools.py index 5392945..549baf6 100644 --- a/netwulf/tools.py +++ b/netwulf/tools.py @@ -220,7 +220,7 @@ def bind_properties_to_network(network, >>> props, _ = netwulf.visualize(G) >>> netwulf.bind_properties_to_network(G, props) """ - # Add individial node attributes + # Add individual node attributes if bind_node_positions: x = { node['id']: node['x'] for node in network_properties['nodes'] } y = { node['id']: node['y'] for node in network_properties['nodes'] }