From 19c4bbb36effb1454253072f70ebf2c83f2ea095 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 18:49:32 -0500 Subject: [PATCH] Codespell: typo fixes, rudimentary config, github action (#537) --- .codespellrc | 3 +++ .github/workflows/codespell.yml | 19 +++++++++++++++++++ core/nwb.file.yaml | 6 +++--- core/nwb.image.yaml | 2 +- docs/format/Makefile | 2 +- docs/format/Readme.md | 8 ++++---- docs/format/source/conf.py | 2 +- docs/format/source/conf_doc_autogen.py | 2 +- docs/format/source/format_release_notes.rst | 4 ++-- docs/storage/Makefile | 2 +- 10 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..5512b069 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,*.pdf +# ignore-words-list = diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..7a1e8dc0 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [dev] + pull_request: + branches: [dev] + +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/core/nwb.file.yaml b/core/nwb.file.yaml index 6b0b9fe2..682a5844 100644 --- a/core/nwb.file.yaml +++ b/core/nwb.file.yaml @@ -62,7 +62,7 @@ groups: doc: Acquired, raw data. quantity: '*' - neurodata_type_inc: DynamicTable - doc: Tabular data that is relevent to acquisition + doc: Tabular data that is relevant to acquisition quantity: '*' - name: analysis doc: Lab-specific and custom scientific analysis of data. There is no defined @@ -78,7 +78,7 @@ groups: doc: Custom analysis results. quantity: '*' - neurodata_type_inc: DynamicTable - doc: Tabular data that is relevent to data stored in analysis + doc: Tabular data that is relevant to data stored in analysis quantity: '*' - name: scratch doc: 'A place to store one-off analysis results. Data placed here is not intended for @@ -355,7 +355,7 @@ groups: neurodata_type_inc: SweepTable doc: '[DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable - tabels. Additional SequentialRecordingsTable, RepetitionsTable and + tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.' quantity: '?' - name: intracellular_recordings diff --git a/core/nwb.image.yaml b/core/nwb.image.yaml index 8cec4c24..11c36fb5 100644 --- a/core/nwb.image.yaml +++ b/core/nwb.image.yaml @@ -93,7 +93,7 @@ groups: - null doc: Each external image may contain one or more consecutive frames of the full ImageSeries. This attribute serves as an index to indicate which frames each file - contains, to faciliate random access. The 'starting_frame' attribute, hence, + contains, to facilitate random access. The 'starting_frame' attribute, hence, contains a list of frame numbers within the full ImageSeries of the first frame of each file listed in the parent 'external_file' dataset. Zero-based indexing is used (hence, the first element will always be zero). For example, if the diff --git a/docs/format/Makefile b/docs/format/Makefile index 802284f8..ab94d325 100644 --- a/docs/format/Makefile +++ b/docs/format/Makefile @@ -22,7 +22,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . help: @echo "To update documentation sources from the format specification please use \`make apidoc'" @echo "" - @echo "To build the documenation please use \`make ' where is one of" + @echo "To build the documentation please use \`make ' where is one of" @echo " fulldoc to rebuild the apidoc, html, and latexpdf documents all at once" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" diff --git a/docs/format/Readme.md b/docs/format/Readme.md index acde4fe5..a5076d5a 100644 --- a/docs/format/Readme.md +++ b/docs/format/Readme.md @@ -57,14 +57,14 @@ In addition to standard Sphinx options, there are a number of additional options * ```spec_show_yaml_src``` Boolean indicating whether the YAML sources should be included for the different neurodata types * ```spec_show_json_src``` Boolean indicating whether the JSON sources should be included for the different neurodata types -* ```spec_generate_src_file``` Boolen indicating whether the YAML/JSON sources of the neurodata_types should be rendered in a separate section (True) or in the same location as the main documentation -* ```spec_show_hierarchy_plots ``` Boolean indicating whether we should generate and show figures of the hierachy defined by the specifications as part of the documentation +* ```spec_generate_src_file``` Boolean indicating whether the YAML/JSON sources of the neurodata_types should be rendered in a separate section (True) or in the same location as the main documentation +* ```spec_show_hierarchy_plots ``` Boolean indicating whether we should generate and show figures of the hierarchy defined by the specifications as part of the documentation * ```spec_file_per_type``` Boolean indicating whether we should generate separate .inc reStructuredText for each neurodata_type (True) or should all text be added to the main file (False) -* ```spec_show_subgroups_in_tables``` Should subgroups of the main groups be renderd in the table as well. Usually this is disabled since groups are rendered as separte sections in the tex +* ```spec_show_subgroups_in_tables``` Should subgroups of the main groups be rendered in the table as well. Usually this is disabled since groups are rendered as separate sections in the tex * ```spec_appreviate_main_object_doc_in_tables``` Appreviate the documentation of the main object for which a table is rendered in the table. This is commonly set to True as doc of the main object is alrready rendered as the main intro for the section describing the object * ```spec_show_title_for_tables``` Add a title for the table showing the specifications. -* ```spec_show_subgroups_in_seperate_table``` Should top-level subgroups be listed in a seperate table or as part of the main dataset and attributes table +* ```spec_show_subgroups_in_seperate_table``` Should top-level subgroups be listed in a separate table or as part of the main dataset and attributes table * ```spec_table_depth_char``` Char to be used as prefix to indicate the depth of an object in the specification hierarchy. NOTE: The char used should be supported by LaTeX. * ```spec_add_latex_clearpage_after_ndt_sections``` Add a LaTeX clearpage after each main section describing a neurodata_type. This helps in LaTeX to keep the ordering of figures, tables, and code blocks consistent in particular when the hierarchy_plots are included. * ```spec_resolve_type_inc``` Resolve includes to always show the full list of objects that are part of a type (True) or to show only the parts that are actually new to a current type while only linking to base types (False) diff --git a/docs/format/source/conf.py b/docs/format/source/conf.py index 7ff48d4f..349c8b59 100644 --- a/docs/format/source/conf.py +++ b/docs/format/source/conf.py @@ -12,7 +12,7 @@ # serve to show the default. import sys -sys.setrecursionlimit(1500) # Attempt to fix probelm with pickle on ReadTheDocs +sys.setrecursionlimit(1500) # Attempt to fix problem with pickle on ReadTheDocs import sphinx_rtd_theme diff --git a/docs/format/source/conf_doc_autogen.py b/docs/format/source/conf_doc_autogen.py index f3b7bae1..77c16c42 100644 --- a/docs/format/source/conf_doc_autogen.py +++ b/docs/format/source/conf_doc_autogen.py @@ -58,7 +58,7 @@ # or should all text be added to the main file spec_file_per_type = True -# Should top-level subgroups be listed in a seperate table or as part of the main dataset and attributes table +# Should top-level subgroups be listed in a separate table or as part of the main dataset and attributes table spec_show_subgroups_in_seperate_table = True # Appreviate the documentation of the main object for which a table is rendered in the table. diff --git a/docs/format/source/format_release_notes.rst b/docs/format/source/format_release_notes.rst index e20c8a9b..2b8a496b 100644 --- a/docs/format/source/format_release_notes.rst +++ b/docs/format/source/format_release_notes.rst @@ -67,7 +67,7 @@ Major changes - ``SimultaneousRecordingsTable`` is a ``DynamicTable`` for grouping different intracellular recordings from the ``IntracellularRecordingsTable`` together that were recorded simultaneously from different electrodes and for - storing metdata about simultaneous recordings + storing metadata about simultaneous recordings - ``SequentialRecordingsTable`` is a ``DynamicTable`` for grouping different sequential recordings from the ``SimultaneousRecordingsTable`` together and storing metadata about sequential recordings - ``RepetitionsTable`` a ``DynamicTable`` for grouping different sequential intracellular recordings from the @@ -761,7 +761,7 @@ Over the course of the development of NWB:N 2 the epoch storage has been refined ``epochs``. This simplified the extension of the epochs structure. ``/epochs`` at that point contained a compound (row-based) table with neurodata_type ``EpochTable`` that described the start/stop times, tags, and a region reference into the ``TimeSeriesIndex`` to identify the timeseries - parts the epoch applys to. Note, the types ``Epochs``, ``EpochTable`` and ``TimeSeriesIndex`` have been + parts the epoch applies to. Note, the types ``Epochs``, ``EpochTable`` and ``TimeSeriesIndex`` have been removed/superseded in subsequent changes. (See `PR396 (PyNWB) `_ and `I119 (nwb-schema) `_ ). - Later, an additional :ref:`DynamicTable ` for storing dynamic metadata about epochs was then diff --git a/docs/storage/Makefile b/docs/storage/Makefile index 459712e8..a62869f2 100644 --- a/docs/storage/Makefile +++ b/docs/storage/Makefile @@ -21,7 +21,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . help: @echo "To update documentation sources from the format specification please use \`make apidoc'" @echo "" - @echo "To build the documenation please use \`make ' where is one of" + @echo "To build the documentation please use \`make ' where is one of" @echo " fulldoc to rebuild the html and latexpdf documents all at once" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories"