Skip to content

Commit b5e9062

Browse files
Updating docs (#43)
* Short length * Fatal errors (prefix: F) * Errors (prefix: E) * Warnings (prefix: W) * Update constants.py * Update constants.py * update * update docs * example * update * YY * revisions: docs/linters --------- Co-authored-by: Laureen Thurner <130306776+LaureenTh@users.noreply.github.com>
1 parent 28a6c26 commit b5e9062

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1247
-194
lines changed

docs/source/dev_docs/_autosummary/search_query.linter.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ search\_query.linter
1313

1414
.. autosummary::
1515

16-
get_parser
16+
lint_file
17+
lint_query_string
1718
pre_commit_hook

docs/source/lint/E0001.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ E0001 — search-field-missing
99

1010
**Scope**: all
1111

12-
**Description**: Expected search field is missing
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
# PLATFORM.PUBMED:
17+
"eHealth" OR "digital health"
18+
19+
**Recommended query**:
20+
21+
.. code-block:: text
22+
23+
# PLATFORM.PUBMED:
24+
"eHealth"[all] OR "digital health"[all]
1325
1426
**Back to**: :ref:`lint`

docs/source/lint/E0002.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ E0002 — search-field-contradiction
99

1010
**Scope**: all
1111

12-
**Description**: Contradictory search fields specified
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
# PLATFORM.WOS:
17+
# Search with general search field = "ALL FIELDS"
18+
TI=(digital AND online)
19+
20+
**Recommended query**:
21+
22+
.. code-block:: text
23+
24+
# PLATFORM.WOS:
25+
# Search without general search field
26+
TI=(digital AND online)
27+
28+
**Typical fix**: Ensure that the search fields used in the query and the general search field parameter are consistent.
1329

1430
**Back to**: :ref:`lint`

docs/source/lint/E0004.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ E0004 — invalid-character
99

1010
**Scope**: PLATFORM.PUBMED
1111

12-
**Description**: Search term contains invalid character
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
# PLATFORM.WOS
17+
"@digital-native"[ti]
18+
19+
**Recommended query**:
20+
21+
.. code-block:: text
22+
23+
# PLATFORM.WOS
24+
"digital-native"[ti]
1325
1426
**Back to**: :ref:`lint`

docs/source/lint/E0005.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ E0005 — invalid-proximity-use
99

1010
**Scope**: PLATFORM.PUBMED, PLATFORM.EBSCO
1111

12-
**Description**: Invalid use of the proximity operator
12+
Proximity operators must have a non-negative integer as the distance.
13+
14+
**Problematic query**:
15+
16+
.. code-block:: text
17+
18+
"digital health"[tiab:~0.5]
19+
20+
**Recommended query**:
21+
22+
.. code-block:: text
23+
24+
"digital health"[tiab:5]
1325
1426
**Back to**: :ref:`lint`

docs/source/lint/E0006.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ E0006 — invalid-wildcard-use
99

1010
**Scope**: PLATFORM.PUBMED
1111

12-
**Description**: Invalid use of the wildcard operator *
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
"health tracking" AND AI*
17+
18+
**Recommended query**:
19+
20+
.. code-block:: text
21+
22+
"health tracking" AND AID*
23+
24+
**Typical fix**: Avoid using wildcards (*) with short strings (less than 4 characters). Specify search fields directly in the query instead of relying on general search field settings.
1325

1426
**Back to**: :ref:`lint`

docs/source/lint/E0007.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,20 @@ E0007 — query-starts-with-platform-identifier
77

88
**Message**: ``Query starts with platform identifier``
99

10-
**Scope**: PLATFORM.WOS
10+
**Scope**: all
1111

12-
**Description**: Query starts with platform identifier
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
# PLATFORM.WOS
17+
WOS: eHealth[ti]
18+
19+
**Recommended query**:
20+
21+
.. code-block:: text
22+
23+
# PLATFORM.WOS
24+
eHealth[ti]
1325
1426
**Back to**: :ref:`lint`

docs/source/lint/E0008.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,20 @@ E0008 — query-in-quotes
77

88
**Message**: ``The whole Search string is in quotes.``
99

10-
**Scope**: PLATFORM.WOS
10+
**Scope**: all
1111

12-
**Description**: The whole Search string is in quotes.
12+
**Problematic query**:
13+
14+
.. code-block:: text
15+
16+
# PLATFORM.WOS
17+
"eHealth[ti] AND digital health[ti]"
18+
19+
**Recommended query**:
20+
21+
.. code-block:: text
22+
23+
# PLATFORM.WOS
24+
eHealth[ti] AND digital health[ti]
1325
1426
**Back to**: :ref:`lint`

docs/source/lint/F0001.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ F0001 — tokenizing-failed
99

1010
**Scope**: all
1111

12-
**Description**: Fatal error during tokenization
12+
**Typical fix**: Check the query syntax and ensure it is correctly formatted.
1313

1414
**Back to**: :ref:`lint`

docs/source/lint/F1001.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ F1001 — unbalanced-parentheses
99

1010
**Scope**: all
1111

12-
**Typical fix**: Check the parentheses in the query
13-
1412
**Problematic query**:
1513

16-
.. code-block:: python
14+
.. code-block:: text
1715
1816
(a AND b OR c
1917
20-
**Correct query**:
18+
**Recommended query**:
2119

22-
.. code-block:: python
20+
.. code-block:: text
2321
2422
(a AND b) OR c
2523
24+
**Typical fix**: Check the parentheses in the query
25+
2626
**Back to**: :ref:`lint`

0 commit comments

Comments
 (0)