From ee578ea9a3d9042eaa4e0845fed40bc2ef900aeb Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 19 Jun 2023 14:22:31 -0400 Subject: [PATCH 1/6] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 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 00000000..7373affc --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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 From 96f664d3544055dca686b120b18bff4027c48a05 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 19 Jun 2023 14:22:31 -0400 Subject: [PATCH 2/6] Add rudimentary codespell config --- .codespellrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..da3c0571 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg +# +# ignore-words-list = From d9a76f967015262d965513239b4746fbfb91a2af Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 19 Jun 2023 14:25:21 -0400 Subject: [PATCH 3/6] ignores --- .codespellrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.codespellrc b/.codespellrc index da3c0571..d647bcfb 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,4 @@ [codespell] -skip = .git,*.pdf,*.svg -# -# ignore-words-list = +skip = .git,*.pdf,*.svg,*.min.js,xtk.js,*.min.map,*.css,*.pkl,papaya.js +ignore-regex = (FWE|TE) +# ignore-words-list = From be766bc561a47fb610607adc931b542186093689 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 19 Jun 2023 14:25:27 -0400 Subject: [PATCH 4/6] [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 ^^^ --- README.md | 2 +- neurovault/CELERY_README.md | 2 +- neurovault/apps/main/templates/FAQ.html | 2 +- neurovault/apps/statmaps/migrations/0001_initial.py | 2 +- neurovault/apps/statmaps/models.py | 4 ++-- neurovault/apps/statmaps/templates/pycortex/dataview.html | 2 +- .../apps/statmaps/templates/statmaps/atlas_details.html | 2 +- .../apps/statmaps/templates/statmaps/my_metaanalyses.html | 2 +- .../statmaps/templates/statmaps/statisticmap_details.html | 8 ++++---- .../api/VentralFrontal_thr75_summaryimage_2mm.xml | 2 +- .../unordered_VentralFrontal_thr75_summaryimage_2mm.xml | 2 +- neurovault/apps/statmaps/views.py | 6 +++--- scripts/preparing_AHBA_data.py | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index fc748efb..db8667b5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ After making changes to the code you need to restart the server (but just the uw ``` docker-compose restart nginx django worker ``` -### Reseting the server +### Resetting the server If you would like to reset the server and clean the database: ``` docker-compose stop diff --git a/neurovault/CELERY_README.md b/neurovault/CELERY_README.md index 1453ef81..7e40d3fe 100644 --- a/neurovault/CELERY_README.md +++ b/neurovault/CELERY_README.md @@ -1,6 +1,6 @@ # Setting Up Celery for NeuroVault -Celery requires a task server. They recommend rabbitmq (and I tested this for the virtual machine) however django (a database) can also be used (but it's not recommended). The other option is redis, but they don't recommend because it is "suseptible to data loss in event of power failures" This is really just like a task database or queue. I was going to do rabbit, but Gabriel said do redis, so I will do redis. Celery is python based so we install from pip. +Celery requires a task server. They recommend rabbitmq (and I tested this for the virtual machine) however django (a database) can also be used (but it's not recommended). The other option is redis, but they don't recommend because it is "susceptible to data loss in event of power failures" This is really just like a task database or queue. I was going to do rabbit, but Gabriel said do redis, so I will do redis. Celery is python based so we install from pip. source /opt/nv_env/bin/activate pip install -U celery[redis] diff --git a/neurovault/apps/main/templates/FAQ.html b/neurovault/apps/main/templates/FAQ.html index e4ef20de..b2653851 100644 --- a/neurovault/apps/main/templates/FAQ.html +++ b/neurovault/apps/main/templates/FAQ.html @@ -49,7 +49,7 @@

2. Why would I submit anything?

decoded using neurosynth.org.

-

3. How do I know my data is safe and will be +

3. How do I know my data is safe and will be available for the years to come?

All of NeuroVault is backed up daily into off site storage. diff --git a/neurovault/apps/statmaps/migrations/0001_initial.py b/neurovault/apps/statmaps/migrations/0001_initial.py index dfa00054..e7c72b99 100644 --- a/neurovault/apps/statmaps/migrations/0001_initial.py +++ b/neurovault/apps/statmaps/migrations/0001_initial.py @@ -71,7 +71,7 @@ class Migration(migrations.Migration): ('file', models.FileField(max_length=500, storage=neurovault.apps.statmaps.storage.DoubleExtensionStorage(), upload_to=neurovault.apps.statmaps.models.upload_img_to, verbose_name='File with the unthresholded volume map (.img, .nii, .nii.gz)')), ('surface_left_file', models.FileField(blank=True, null=True, storage=neurovault.apps.statmaps.storage.DoubleExtensionStorage(), upload_to=neurovault.apps.statmaps.models.upload_img_to, verbose_name='File with the unthresholded LEFT hemisphere fsaverage surface map (.mgh, .curv, .gii)')), ('surface_right_file', models.FileField(blank=True, null=True, storage=neurovault.apps.statmaps.storage.DoubleExtensionStorage(), upload_to=neurovault.apps.statmaps.models.upload_img_to, verbose_name='File with the unthresholded RIGHT hemisphere fsaverage surface map (.mgh, .curv, .gii)')), - ('data_origin', models.CharField(blank=True, choices=[('volume', 'volume'), ('surface', 'surface')], default='volume', help_text='Was this map originaly derived from volume or surface?', max_length=200, null=True, verbose_name='Data origin')), + ('data_origin', models.CharField(blank=True, choices=[('volume', 'volume'), ('surface', 'surface')], default='volume', help_text='Was this map originally derived from volume or surface?', max_length=200, null=True, verbose_name='Data origin')), ('target_template_image', models.CharField(choices=[('GenericMNI', 'Human (Generic/Unknown MNI)'), ('Dorr2008', 'Mouse (Dorr 2008 space)'), ('NMT', 'Rhesus - macacca mulatta (NMT)'), ('MNI152NLin2009cAsym', 'Human (MNI152 NLin 2009c Asym)')], default='GenericMNI', help_text='Name of target template image', max_length=200, verbose_name='Target template image')), ('subject_species', models.CharField(blank=True, default='homo sapiens', max_length=200, null=True)), ('figure', models.CharField(blank=True, help_text='Which figure in the corresponding paper was this map displayed in?', max_length=200, null=True, verbose_name='Corresponding figure')), diff --git a/neurovault/apps/statmaps/models.py b/neurovault/apps/statmaps/models.py index 914521ed..11fe2795 100644 --- a/neurovault/apps/statmaps/models.py +++ b/neurovault/apps/statmaps/models.py @@ -1000,7 +1000,7 @@ class Image(BaseCollectionItem): verbose_name="File with the unthresholded RIGHT hemisphere fsaverage surface map (.mgh, .curv, .gii)", ) data_origin = models.CharField( - help_text=("Was this map originaly derived from volume or surface?"), + help_text=("Was this map originally derived from volume or surface?"), verbose_name="Data origin", default="volume", max_length=200, @@ -1156,7 +1156,7 @@ def create( niftiFile = File(f) image.file.save(my_file_name, niftiFile) - # If a .img file was loaded then load the correspoding .hdr file as well + # If a .img file was loaded then load the corresponding .hdr file as well _, ext = os.path.splitext(my_file_name) print(ext) if ext in [".img"]: diff --git a/neurovault/apps/statmaps/templates/pycortex/dataview.html b/neurovault/apps/statmaps/templates/pycortex/dataview.html index 51990b08..6b3caba3 100644 --- a/neurovault/apps/statmaps/templates/pycortex/dataview.html +++ b/neurovault/apps/statmaps/templates/pycortex/dataview.html @@ -185,7 +185,7 @@

View -
+
diff --git a/neurovault/apps/statmaps/templates/statmaps/atlas_details.html b/neurovault/apps/statmaps/templates/statmaps/atlas_details.html index 1a964c39..a8cac746 100644 --- a/neurovault/apps/statmaps/templates/statmaps/atlas_details.html +++ b/neurovault/apps/statmaps/templates/statmaps/atlas_details.html @@ -99,7 +99,7 @@
Regions
- + diff --git a/neurovault/apps/statmaps/templates/statmaps/my_metaanalyses.html b/neurovault/apps/statmaps/templates/statmaps/my_metaanalyses.html index afe8369a..5ced0809 100644 --- a/neurovault/apps/statmaps/templates/statmaps/my_metaanalyses.html +++ b/neurovault/apps/statmaps/templates/statmaps/my_metaanalyses.html @@ -35,7 +35,7 @@

My metanalyses

Here you can create, activate, and finalize (run inference on) your metaanalyses. When you will have an active metaanalysis an "Add to the active metaanalysis" button - become present on comaptible (group level T or Z) maps.

+ become present on compatible (group level T or Z) maps.

IntesityIntensity Name
diff --git a/neurovault/apps/statmaps/templates/statmaps/statisticmap_details.html b/neurovault/apps/statmaps/templates/statmaps/statisticmap_details.html index b60091a2..872ca9c3 100644 --- a/neurovault/apps/statmaps/templates/statmaps/statisticmap_details.html +++ b/neurovault/apps/statmaps/templates/statmaps/statisticmap_details.html @@ -200,19 +200,19 @@

{{ image.name }}