Skip to content

Commit d67b095

Browse files
yarikopticdxenes1
andauthored
Add codespell support (config, workflow to detect/not fix) and make it fix few typos (#413)
* Add github action to codespell main on push and PRs * Add rudimentary codespell config * Add pre-commit definition for codespell * tune ups to codespellrc * [DATALAD RUNCMD] chore: run codespell throughout fixing typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --------- Co-authored-by: Daniel Xenes <[email protected]>
1 parent 7b6a029 commit d67b095

File tree

10 files changed

+58
-17
lines changed

10 files changed

+58
-17
lines changed

.codespellrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[codespell]
2+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
3+
skip = .git*,*.svg,package-lock.json,*.css,*-min.*,.codespellrc,*.bundle.*,*.map
4+
check-hidden = true
5+
# ignore-regex =
6+
# some favorite albeit unfortunate variable names
7+
ignore-words-list = te

.github/workflows/codespell.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Annotate locations with typos
23+
uses: codespell-project/codespell-problem-matcher@v1
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ repos:
99
rev: 22.10.0
1010
hooks:
1111
- id: black
12+
- repo: https://github.com/codespell-project/codespell
13+
# Configuration for codespell is in .codespellrc
14+
rev: v2.3.0
15+
hooks:
16+
- id: codespell
17+

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pip install -r requirements.txt
2222

2323
## Development Installation
2424

25-
Install developer python requirements and set up pre-commit enviroment.
25+
Install developer python requirements and set up pre-commit environment.
2626

2727
```
2828
source venv/bin/activate
@@ -102,7 +102,7 @@ Or perform each step individually:
102102

103103
## OAuth Set-up
104104

105-
The included development database is preconfigured to allow OAuth to authetnticate user accounts from `localhost:8000`. Here is a more [complete guide](https://www.section.io/engineering-education/django-google-oauth/) on how this was done.
105+
The included development database is preconfigured to allow OAuth to authenticate user accounts from `localhost:8000`. Here is a more [complete guide](https://www.section.io/engineering-education/django-google-oauth/) on how this was done.
106106

107107
We use `django-allauth` to connect Google OAuth to the Django environment. Users also have the option to log in through the base allauth login/signup page:
108108

neuvue_project/templates/workspace.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@
584584
var char_to_key_code = {'c': 67, 'd': 68, 'j': 74, 'm': 77, 'q': 81,
585585
'r': 82, 't': 84, 'v': 86, 'w': 87, 'y': 89, 'z': 90};
586586

587-
// iterate through forced choice butttons to check for hotkey action
587+
// iterate through forced choice buttons to check for hotkey action
588588
var button_list = document.getElementsByClassName('forcedChoiceButton');
589589
for (var i = 0; i < button_list.length; i++) {
590590
var button = button_list.item(i);

neuvue_project/workspace/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class NeuroglancerLinkType(models.TextChoices):
1515
Draws a path between all coordinates.
1616
1717
point -> expects a list of coordinates (metadata), description (metadata), and
18-
group (metadata). Needs atleast one seed point (points). Places dot points for
18+
group (metadata). Needs at least one seed point (points). Places dot points for
1919
all coordinates listed.
2020
2121
pregenerated -> neuroglancer state already added to task. Useful for external

neuvue_project/workspace/static/getting_started.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Clicking on the blue row header for a task type will expand it to show a table w
2626

2727
The pending table will show tasks for that task type ordered by descending priority level. The number in the tab after "Pending" show how many pending tasks are available. The columns are described below:
2828

29-
* **Task ID** - The unique identifer for this task. Useful for referencing task to NeuVue admins or developers as well as for inspecting the task in the "Inspect Task" page. Click on the task ID in this table will redirect you to the "Inspect Task" page for the task ID you clicked on.
30-
* **Seg ID** - The unique identifier for the neuron in the volume that is the primary target for this proofreading task. Seg IDs will sometimes be repeated across many tasks or even users. Seg IDs also change after edits so a seg ID listed in the task page may be outdated by the time a user opens that task. More info here.
29+
* **Task ID** - The unique identifier for this task. Useful for referencing task to NeuVue admins or developers as well as for inspecting the task in the "Inspect Task" page. Click on the task ID in this table will redirect you to the "Inspect Task" page for the task ID you clicked on.
30+
* **Seg ID** - The unique identifier for the neuron in the volume that is the primary target for this proofreading task. Seg IDs will sometimes be repeated across many tasks or even users. Seg IDs also change after edits so a seg ID listed in the task page may be outdated by the time a user opens that task. More info here.
3131
* **Created** - EST Datetime of creation for this task.
3232
* **Priority** - Numerical priority of this task. Higher priority means that task will be provided to the user earlier in the queue. Skipping a task reduces the task priority by 1.
3333
* **Status** - Current status of the task. Four possible statuses: "open", "pending", "closed", "errored". Only "open" and "pending" tasks are shown in this table.
@@ -46,9 +46,10 @@ The closed tab is slightly different than the pending tab. This table is sorted
4646

4747
In addition to the task tables, you will also see buttons on the right side of the task type headers. These buttons are described below:
4848

49-
* **Start Proofreading** - This button exists for all task types with pending tasks available and assigned to you. Click this will nagivate you to the Workspace page, where the next task will automatically be queued up and displayed.
50-
* **Add More Tasks** - Available for some task types only. Clicking this will allow additional tasks to be assigned to your user in cases where you deplete your queue or would like fresh tasks to work on. The number of tasks added to your user depends on the task type and there are certain limits set on how many tasks can be assigned to one user at a time.
51-
* **Remove Skipped Tasks** - Available for some task types only. Clicking this will remove all tasks that have been skipped once or more from your queue permanently.
49+
50+
* **Start Proofreading** - This button exists for all task types with pending tasks available and assigned to you. Click this will navigate you to the Workspace page, where the next task will automatically be queued up and displayed.
51+
* **Add More Tasks** - Available for some task types only. Clicking this will allow additional tasks to be assigned to your user in cases where you deplete your queue or would like fresh tasks to work on. The number of tasks added to your user depends on the task type and there are certain limits set on how many tasks can be assigned to one user at a time.
52+
* **Remove Skipped Tasks** - Available for some task types only. Clicking this will remove all tasks that have been skipped once or more from your queue permanently.
5253

5354
From this point you can begin proofreading by deciding on which task types you would like to work on and then clicking "Start Proofreading" for that task type. This will navigate you to the workspace page, which is the main interface for proofreading work.
5455

@@ -88,7 +89,8 @@ Here is a great instructional video on how to operate Neuroglancer for basic nav
8889

8990
<iframe width="560" height="315" src="https://www.youtube.com/embed/TwBTyWWnbxc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
9091

91-
[This cheatsheet](https://docs.google.com/document/d/1eypqJ9iI1GlWSPMTZQo9oDCLEahye6oYo_CuhS_5QTA/edit?usp=sharing) (credit to flywire.ai) has additional useful information thats specific to this proofreading effort!
92+
[This cheatsheet](https://docs.google.com/document/d/1eypqJ9iI1GlWSPMTZQo9oDCLEahye6oYo_CuhS_5QTA/edit?usp=sharing) (credit to flywire.ai) has additional useful information that's specific to this proofreading effort!
93+
9294

9395
## Additional Pages and Tools
9496

@@ -104,7 +106,8 @@ The inspect task page has a similar layout to the workspace except it does not c
104106

105107
<img src="https://i.imgur.com/a29xKER.png" alt="Synapse Viewer Page" width="800"/>
106108

107-
The synapse viewer page is a visualization tool which means it can be accessed by any user with a valid root ID. It displays all presynaptic and postsynaptic locations for a valid root ID or multiple IDs. The pre and post annotations for each root ID are placed in an individual Neuroglancer layer so colors and sizes can be indepedently set. The sidebar displays information of on the number of connections for each root ID. This information can be copied or downloaded with the buttons below the table in the sidebar as well. To use the synaptic viewer, copy the list of root IDs (comma-separated) you want to visualize and paste them in the input box at app.neuvue.io/synapse.
109+
110+
The synapse viewer page is a visualization tool which means it can be accessed by any user with a valid root ID. It displays all presynaptic and postsynaptic locations for a valid root ID or multiple IDs. The pre and post annotations for each root ID are placed in an individual Neuroglancer layer so colors and sizes can be independently set. The sidebar displays information of on the number of connections for each root ID. This information can be copied or downloaded with the buttons below the table in the sidebar as well. To use the synaptic viewer, copy the list of root IDs (comma-separated) you want to visualize and paste them in the input box at app.neuvue.io/synapse.
108111

109112
Be aware that visualizing more than 10 root IDs at a time in the synpase viewer may cause Neuroglancer or your browser to crash!
110113

@@ -125,7 +128,7 @@ When a Neuroglancer link is copied from the app, it will use our externally host
125128

126129
Any modern OS should work with NeuVue. To lower the chances of crashes or missing functionality, we recommend all users proofreading using Google Chrome. There have been compatibility issues with Safari and Firefox in the past.
127130

128-
### What should I do if I'm having a techical issue?
131+
### What should I do if I'm having a technical issue?
129132

130133
Copy the task ID and paste in the proofreading slack channel. Describe your issue in detail and paste your task ID, browser and OS as well. A NeuVue developer will then provide more specific instructions on how to troubleshoot or fix the issue.
131134

@@ -135,7 +138,7 @@ We recommend you do not refresh your browser when on the workspace page. This ca
135138

136139
### Is there an undo for Neuroglancer?
137140

138-
Yes, on the top right there will be an "undo/redo" arrow buttons that can be used to undo layer/ID selects, pans, zooms, and any changes to the Neuroglancer state. ** However, you cannot undo direct edits (i.e. splits/merges). ** To undo these, you can do the inverse operation for the undo, such as merging two accidently split IDs or splitting two accidently merged IDs.
141+
Yes, on the top right there will be an "undo/redo" arrow buttons that can be used to undo layer/ID selects, pans, zooms, and any changes to the Neuroglancer state. ** However, you cannot undo direct edits (i.e. splits/merges). ** To undo these, you can do the inverse operation for the undo, such as merging two accidentally split IDs or splitting two accidentally merged IDs.
139142

140143
### How do I stop Neuroglancer from lagging/slowing down?
141144

neuvue_project/workspace/static/updates.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
{
5454
"update_name": "v1.6.2",
5555
"update_date":"June 30th, 2022",
56-
"update_description": "Allows tags to be saved when skipping, flagging, or exitting a task. Improved load times for admin tools."
56+
"update_description": "Allows tags to be saved when skipping, flagging, or exiting a task. Improved load times for admin tools."
5757
},
5858
{
5959
"update_name": "v1.6.1",
@@ -73,7 +73,7 @@
7373
{
7474
"update_name": "v1.5.3",
7575
"update_date":"April 28th, 2022",
76-
"update_description": "Adds annotation color pallete preference. Updates to lineage viewer."
76+
"update_description": "Adds annotation color palette preference. Updates to lineage viewer."
7777
},
7878
{
7979
"update_name": "v1.5.2",

neuvue_project/workspace/static/workspace/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
(storage && storage.length !== 0);
3030

3131
if (!outOfSpace) {
32-
alert('Local Storage has been disabled, please renable it in Chrome');
32+
alert('Local Storage has been disabled, please re-enable it in Chrome');
3333
}
3434
}
3535
}

neuvue_project/workspace/views/task.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def post(self, request, *args, **kwargs):
213213
max_tasks = namespace_obj.max_number_of_pending_tasks_per_user
214214

215215
# Dev Note: Below is the logic for handling re-assignment of tasks. User levels default to novice and
216-
# can be overriden by the user profile in the admin page. How levels affect what group the namespace
216+
# can be overridden by the user profile in the admin page. How levels affect what group the namespace
217217
# belongs to depends on how the namespace configures the push to and pull from attributes.
218218
# By default, namespaces do not allow for reassignment.
219219

0 commit comments

Comments
 (0)