From c383285582bf36f0231ee2847ddfa878b7cb14a5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Jan 2023 21:45:42 -0500 Subject: [PATCH 1/5] Add .codespellrc just to instruct to skip .git --- .codespellrc | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..55d1790 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git +# ignore-words-list = From 79bd7b290012a0c358f83542cb8c2b2a79bf454f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Jan 2023 21:47:23 -0500 Subject: [PATCH 2/5] Fix some ambigious to codespell typos --- docs/dev_notes/testing.rst | 2 +- netwulf/tests/test_all.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/netwulf/tests/test_all.py b/netwulf/tests/test_all.py index c1fac02..3f6bcb3 100644 --- a/netwulf/tests/test_all.py +++ b/netwulf/tests/test_all.py @@ -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) From 62df28fa1282100c00f8fbf5c973ee185d9ee48b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Jan 2023 21:47:26 -0500 Subject: [PATCH 3/5] [DATALAD RUNCMD] Run codespell throughout === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- docs/visualization/init.rst | 2 +- netwulf/tests/test_all.py | 2 +- netwulf/tools.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 3f6bcb3..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()) 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'] } From 3074e915539fad1114cc2204078558106abc4d11 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Jan 2023 21:49:24 -0500 Subject: [PATCH 4/5] Add GitHub workflow to run codespell checking --- .github/workflows/codespell.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/codespell.yml 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 From 103f2d7399ebcfd923640f51d1849bd01eb7b8d7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 27 Jan 2023 21:52:21 -0500 Subject: [PATCH 5/5] Ignore js which is within submodule and is independent repo --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 55d1790..cf67a95 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,3 +1,3 @@ [codespell] -skip = .git +skip = .git,js # ignore-words-list =