Skip to content

Commit

Permalink
Merge pull request #4045 from mathesar-foundation/mkdocs_spellcheck
Browse files Browse the repository at this point in the history
Add spell-checking to MkDocs build process
  • Loading branch information
seancolsen authored Dec 4, 2024
2 parents bd1fe16 + 32961c1 commit 8bcc0d4
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion db/sql/00_msar.sql
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ $$ LANGUAGE SQL RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION msar.get_fkey_map_table(tab_id oid)
RETURNS TABLE (target_oid oid, conkey smallint, confkey smallint)
AS $$/*
Generate a table mapping foreign key values from refererrer to referant tables.
Generate a table mapping foreign key values from refererrer to referent tables.
Given an input table (identified by OID), we return a table with each row representing a foreign key
constraint on that table. We return only single-column foreign keys, and only one per foreign key
Expand Down
2 changes: 1 addition & 1 deletion db/sql/10_msar_joinable_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A Foreign Key path gives the same information in a different form:
]
In this form, `constraint_idN` is a foreign key constraint, and `reversed` is a boolean giving
whether to travel from referrer to referant (when False) or from referant to referrer (when True).
whether to travel from referrer to referent (when False) or from referent to referrer (when True).
*/


Expand Down
17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,23 @@ We have some custom code in `overrides/404.html` which is pretty weird!
- We have some customizations to the version switcher which are applied within the `extra.css` file.
- If you modify this, you'll need to port those modifications to all published versions so that the user experience is consistent when switching between versions.
## Spell-checking
We use the [`mkdocs-spellcheck`](https://github.com/pawamoy/mkdocs-spellcheck) plugin to spell-check our documentation.
- CI will fail if there are any spelling errors.
- To check for spelling errors locally, run:
```
mkdocs build --strict
```
Spelling errors will be reported as warnings when building in strict mode.
- To configure ignored words, see the `spellcheck` section in `mkdocs.yml` and refer to the [plugin docs](https://github.com/pawamoy/mkdocs-spellcheck) as needed.
- If you happen to be writing documentation content using VS Code, we recommend the Code Spell Checker extension (id: `streetsidesoftware.code-spell-checker`). It will highlight spelling errors in real-time as you type.
## Page redirects
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/releases/0.1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This release:
- Properly detect identity columns _([#3125](https://github.com/centerofci/mathesar/pull/3125))_
- Wiring sql functions for links and tables _([#3130](https://github.com/centerofci/mathesar/pull/3130))_
- Tests for alter table _([#3139](https://github.com/centerofci/mathesar/pull/3139))_
- Add constraint copying to column extration logic _([#3168](https://github.com/centerofci/mathesar/pull/3168))_
- Add constraint copying to column extraction logic _([#3168](https://github.com/centerofci/mathesar/pull/3168))_

### Summarization improvements

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/releases/0.1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ _[#3186](https://github.com/mathesar-foundation/mathesar/pull/3186) [#3219](http

### Text-only imports

When importing CSV data, Mathesar now gives you the option to use `TEXT` as the database type for all columns. This choice speeds up the import for larger data sets by skipping the process of guessing colum types.
When importing CSV data, Mathesar now gives you the option to use `TEXT` as the database type for all columns. This choice speeds up the import for larger data sets by skipping the process of guessing column types.

![image](https://github.com/mathesar-foundation/mathesar/assets/42411/6e0b5b1c-2e10-4e1f-8ad3-f4d99d28d8a9)

Expand Down
11 changes: 11 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ plugins:
show_root_members_full_path: true
show_source: false
group_by_category: false
- spellcheck:
backends:
- codespell:
dictionaries: [clear]
known_words:
- Mathesar
ignore_code: yes
min_length: 2
max_capital: 1
allow_unicode: yes
strict_only: yes

theme:
name: material
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ mkdocs-material==8.5.11
mkdocs-redirects==1.2.0
mkdocs-macros-plugin==0.7.0
mkdocs-placeholder-plugin==0.3.1
mkdocs-spellcheck[codespell]==1.1.0
mkdocstrings==0.25.2
mkdocstrings-python==1.10.8
2 changes: 1 addition & 1 deletion mathesar/rpc/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class UniqueConstraint(TypedDict):

CreatableConstraintInfo = list[Union[ForeignKeyConstraint, PrimaryKeyConstraint, UniqueConstraint]]
"""
Type alias for a list of createable constraints which can be unique, primary key, or foreign key constraints.
Type alias for a list of creatable constraints which can be unique, primary key, or foreign key constraints.
"""


Expand Down
2 changes: 1 addition & 1 deletion mathesar/rpc/databases/privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DBPrivileges(TypedDict):
Attributes:
role_oid: The `oid` of the role on the database server.
direct: A list of database privileges for the afforementioned role_oid.
direct: A list of database privileges for the aforementioned role_oid.
"""
role_oid: int
direct: list[Literal['CONNECT', 'CREATE', 'TEMPORARY']]
Expand Down
4 changes: 2 additions & 2 deletions mathesar/rpc/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Grouping(TypedDict):
Attributes:
columns: The columns to be grouped by.
preproc: The preprocessing funtions to apply (if any).
preproc: The preprocessing functions to apply (if any).
"""
columns: list[int]
preproc: list[str]
Expand Down Expand Up @@ -123,7 +123,7 @@ class GroupingResponse(TypedDict):
Attributes:
columns: The columns to be grouped by.
preproc: The preprocessing funtions to apply (if any).
preproc: The preprocessing functions to apply (if any).
groups: The groups applicable to the records being returned.
"""
columns: list[int]
Expand Down
2 changes: 1 addition & 1 deletion mathesar/rpc/roles/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class RoleInfo(TypedDict):
description: A description of the role
members: The member roles that directly inherit the role.
Refer PostgreSQL documenation on:
Refer PostgreSQL documentation on:
- [pg_roles table](https://www.postgresql.org/docs/current/view-pg-roles.html).
- [Role attributes](https://www.postgresql.org/docs/current/role-attributes.html)
- [Role membership](https://www.postgresql.org/docs/current/role-membership.html)
Expand Down
2 changes: 1 addition & 1 deletion mathesar/rpc/schemas/privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SchemaPrivileges(TypedDict):
Attributes:
role_oid: The `oid` of the role.
direct: A list of schema privileges for the afforementioned role_oid.
direct: A list of schema privileges for the aforementioned role_oid.
"""
role_oid: int
direct: list[Literal['USAGE', 'CREATE']]
Expand Down
2 changes: 1 addition & 1 deletion mathesar/rpc/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class JoinableTableRecord(TypedDict):
]
In this form, `constraint_idN` is a foreign key constraint, and `reversed` is a boolean giving
whether to travel from referrer to referant (when False) or from referant to referrer (when True).
whether to travel from referrer to referent (when False) or from referent to referrer (when True).
depth: Specifies how far to search for joinable tables.
multiple_results: Specifies whether the path included is reversed.
"""
Expand Down
2 changes: 1 addition & 1 deletion mathesar/rpc/tables/privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TablePrivileges(TypedDict):
Information about table privileges for a role.
Attributes:
role_oid: The `oid` of the role.
direct: A list of table privileges for the afforementioned role_oid.
direct: A list of table privileges for the aforementioned role_oid.
"""
role_oid: int
direct: list[Literal['INSERT', 'SELECT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER']]
Expand Down
2 changes: 1 addition & 1 deletion mathesar_ui/src/components/rich-text/RichText.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
For example:
```
The documenation can be found [anchorComponent](here).
The documentation can be found [anchorComponent](here).
```
The argument 'here' would be translated, and passed to the 'anchorComponent' slot.
Expand Down
2 changes: 1 addition & 1 deletion mathesar_ui/src/i18n/languages/en/dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"data_explorer": "Data Explorer",
"data_loss_warning_alert": "Data loss can result from changing the data type of a column. This action cannot be undone.",
"data_source": "Data Source",
"data_tabular_format_help": "The data must be in tabular format (CSV, TSV etc) or JSON. See relevant [documentationLink](documenation).",
"data_tabular_format_help": "The data must be in tabular format (CSV, TSV etc) or JSON. See relevant [documentationLink](documentation).",
"data_type": "Data Type",
"data_type_linked_column_restricted": "The data type of this column must match the referenced column and cannot be changed.",
"data_type_pk_column_restricted": "The data type of the primary key column is restricted and cannot be changed.",
Expand Down

0 comments on commit 8bcc0d4

Please sign in to comment.