Skip to content

Commit 7d03287

Browse files
author
Gerit Wagner
committed
revise docs
closes #53
1 parent d7a5a29 commit 7d03287

20 files changed

+106
-113
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Change Log
2+
# Changelog
33
All notable changes to this project will be documented in this file.
44

55
## Unreleased

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ The translated query can be saved as follows:
7575
from search_query import SearchFile
7676

7777
search_file = SearchFile(
78-
filename="search-file.json",
79-
query_str=wos_query.to_string(platform="wos"),
78+
filepath="search-file.json",
79+
search_string=wos_query.to_string(),
8080
platform="wos",
8181
version="1",
8282
authors=[{"name": "Tom Brady"}],

docs/source/dev_docs/linter_development.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ They analyze token sequences, syntax, search fields, and operator use to identif
66
errors or ambiguities and print meaningful messages (documented in the `messages <../messages/errors_index.html>`_ section).
77
Each platform implements its own linter, which interhits from the base class `linter_base.py`. Linters are used in the parser methods.
88

9-
Base Classes
9+
Base classes
1010
------------
1111
Use the appropriate base class when developing a new linter:
1212

@@ -16,7 +16,7 @@ Use the appropriate base class when developing a new linter:
1616
Each linter must override the `validate_tokens()` method and the `validate_query_tree()`.
1717
`validate_tokens()` is called when the query is parsed, and `validate_query_tree()` is called when the query tree is built (i.e., at the end of the parsing process **and** when the query is constructed programmatically).
1818

19-
Best Practices
19+
Best practices
2020
--------------
2121
- **Use standardized linter messages** defined in `constants.QueryErrorCode`.
2222
- **Add details** in messages for guidance (e.g., invalid format, missing logic).

docs/source/dev_docs/parser_development.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When introducing a new parser version, copy the previous versioned
1818
directory, adjust the implementation, and register the version in the
1919
``PARSERS`` dictionary.
2020

21-
1. Inherit from Base Classes
21+
1. Inherit from base classes
2222
-----------------------------------
2323

2424
Use the provided base classes, which provide a number of utility methods:
@@ -107,8 +107,8 @@ Check whether ``SearchFields`` can be created for nested queries (e.g., ``TI=(eH
107107
:language: python
108108

109109

110-
List Format Support
111-
-----------------------------------
110+
List format support
111+
----------------------------------
112112

113113
Implement ``QueryListParser`` to handle numbered sub-queries and references like ``#1 AND #2``.
114114

docs/source/dev_docs/tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To run all tests:
1010

1111
pytest test
1212

13-
Test Types
13+
Test types
1414
----------
1515

1616
1. **Tokenization Tests**

docs/source/dev_docs/translator_development.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Translators convert between:
88

99
Each translator implements `QueryTranslator`, the abstract base class from ``translator_base.py``.
1010

11-
Translator Responsibilities
12-
---------------------------
11+
Translator responsibilities
12+
--------------------------
1313

1414
A translator must implement the following two class methods:
1515

@@ -35,8 +35,8 @@ specified platform.
3535
To introduce a new translator version, duplicate the previous versioned directory,
3636
update the implementation as needed, and register the new version in the ``TRANSLATORS`` dictionary.
3737

38-
Utility Methods Provided
39-
------------------------
38+
Utility methods provided
39+
-----------------------
4040

4141
The base class (`QueryTranslator`) provides the following utilities:
4242

@@ -47,8 +47,8 @@ The base class (`QueryTranslator`) provides the following utilities:
4747
- ``move_fields_to_operator(query)``:
4848
If all children have the same field, moves it to the parent node.
4949

50-
Search Field Mapping
51-
--------------------
50+
Search field mapping
51+
-------------------
5252

5353
Field mapping is expected to be defined in a `constants_<source>.py` file and typically includes:
5454

@@ -61,15 +61,15 @@ Each translator should:
6161
2. Handle combined fields (e.g., `[tiab]` in PubMed)
6262
3. Optionally restructure the query for consistency
6363

64-
Code Skeleton
65-
-------------
64+
Code skeleton
65+
------------
6666

6767
.. literalinclude:: translator_skeleton.py
6868
:language: python
6969

7070

71-
Advanced Features
72-
-----------------
71+
Advanced features
72+
----------------
7373

7474
Some translators include advanced restructuring logic:
7575

docs/source/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ The translated query can be saved as follows:
9494
from search_query import SearchFile
9595
9696
search_file = SearchFile(
97-
filename="search-file.json",
98-
query_str=wos_query.to_string(platform="wos"),
97+
filepath="search-file.json",
98+
search_string=wos_query.to_string(),
9999
platform="wos",
100100
version="1",
101101
authors=[{"name": "Tom Brady"}],
@@ -113,8 +113,8 @@ A Jupyter Notebook demo (hosted on Binder) is available here:
113113
.. image:: https://mybinder.org/badge_logo.svg
114114
:target: https://mybinder.org/v2/gh/CoLRev-Environment/search-query/HEAD?labpath=docs%2Fsource%2Fdemo.ipynb
115115

116-
Functional Overview
117-
=======================
116+
Functional overview
117+
======================
118118

119119
The search-query package supports the entire lifecycle of academic search query management.
120120
Below is a high-level overview of the core functionalities:

docs/source/lint/errors_index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Database errors: Web of Science
9898

9999
WOS_0012
100100

101-
Database errors: EBSCOHost
101+
Database errors: EBSCOhost
102102
--------------------------
103103

104104
.. toctree::

docs/source/load.rst

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Load
55

66
Queries can be loaded from strings/files, defined as objects, or retrieved from the internal database.
77

8-
String/File
8+
String/file
99
-------------------------
1010

1111
Search-query can parse queries from strings and JSON query files.
@@ -59,30 +59,13 @@ Queries can be loaded from the internal database directly:
5959
from search_query.database_queries import AIS_8
6060
6161
print(AIS_8.to_string())
62-
# Output:
63-
# (SO=("European Journal of Information Systems" OR
64-
# "Information Systems Journal" OR
65-
# "Information Systems Research" OR
66-
# "Journal of the Association for Information Systems" OR
67-
# "Journal of Information Technology" OR
68-
# "Journal of Management Information Systems" OR
69-
# "Journal of Strategic Information Systems" OR
70-
# "MIS Quarterly") OR
71-
# IS=(0960-085X OR
72-
# 1476-9344 OR
73-
# 1350-1917 OR
74-
# 1365-2575 OR
75-
# 1047-7047 OR
76-
# 1526-5536 OR
77-
# 1536-9323 OR
78-
# 0268-3962 OR
79-
# 1466-4437 OR
80-
# 0742-1222 OR
81-
# 1557-928X OR
82-
# 0963-8687 OR
83-
# 1873-1198 OR
84-
# 0276-7783 OR
85-
# 2162-9730))
62+
# SO=("European Journal of Information Systems" OR "Information Systems Journal"
63+
# OR "Information Systems Research" OR "Journal of the Association for Information Systems"
64+
# OR "Journal of Information Technology" OR "Journal of Management Information Systems"
65+
# OR "Journal of Strategic Information Systems" OR "MIS Quarterly")
66+
# OR IS=(0960-085X OR 1476-9344 OR 1350-1917 OR 1365-2575 OR 1047-7047 OR 1526-5536
67+
# OR 1536-9323 OR 0268-3962 OR 1466-4437 OR 0742-1222 OR 1557-928X OR 0963-8687
68+
# OR 1873-1198 OR 0276-7783 OR 2162-9730)
8669
8770
8871
It is also possible to load queries from the database using the `database` module:

docs/source/platforms/ebsco.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
.. _ebsco:
22

3-
EBSCOHost
3+
EBSCOhost
44
=========
55

6-
EBSCOHost provides access to a wide range of academic databases across disciplines, including business, education, psychology, and health sciences.
6+
EBSCOhost provides access to a wide range of academic databases across disciplines, including business, education, psychology, and health sciences.
77

8-
Run a Query
8+
Run a query
99
-----------
1010

11-
EBSCOHost queries can be constructed using the standard `EBSCOHost advanced search interface <https://search.ebscohost.com/>`_ (requires institutional access).
11+
EBSCOhost queries can be constructed using the standard `EBSCOhost advanced search interface <https://search.ebscohost.com/>`_ (requires institutional access).
1212

1313
When working with `search-query`, extract the **Search terms** from the **Search History** panel or persistent URL for use as the `search_string`.
1414

15-
EBSCOHost query syntax includes field tags such as `AB`, `TI`, `SU`, etc. These should be included directly in the `search_string`.
15+
EBSCOhost query syntax includes field tags such as `AB`, `TI`, `SU`, etc. These should be included directly in the `search_string`.
1616

17-
Store a Query
17+
Store a query
1818
-------------
1919

20-
When storing an EBSCOHost query in a `.json` file or as a string:
20+
When storing an EBSCOhost query in a `.json` file or as a string:
2121

2222
- Use the **Search History** or the **Search Terms** as the `search_string`.
2323

2424
.. tip::
2525

2626
To ensure reproducibility, report the EBSCO database used (e.g., Business Source Complete) in the `database` field.
2727

28-
Avoid setting a `general_field` (available in `Advanced Search`) unless the entire query targets the same field (e.g., all terms limited to `AB` for Abstract). Mixed fields should keep `general_field` empty.
28+
Avoid setting a general `field` (available in `Advanced Search`) unless the entire query targets the same field (e.g., all terms limited to `AB` for Abstract). Mixed fields should keep general `field` empty.
2929

3030
Do not use the **persistent link feature**.
3131

32-
List Query Format
33-
--------------------
32+
List query format
33+
-----------------
3434

3535
EBSCOhost supports building **multi-line queries** where individual components are defined as numbered search lines and later combined using references like ``S1 AND S2``. This method is often used in advanced or expert search modes.
3636

@@ -40,13 +40,13 @@ List queries should be formatted as follows:
4040
4141
{
4242
"search_string": "1. TI (digital health OR telemedicine)\n2. AB (physical activity OR exercise)\n3. S1 AND S2",
43-
"general_field": ""
43+
"field": ""
4444
}
4545
4646
Each numbered item defines a part of the query using EBSCOhost's field syntax. Later lines can combine them using boolean operators like ``AND``, ``OR``, or ``NOT``, allowing for structured, transparent query design.
4747

4848

49-
Best Practices and Recommendations
49+
Best practices and recommendations
5050
----------------------------------
5151

5252
- **Use field tags** (e.g., `AB`, `TI`) explicitly in the query string.

0 commit comments

Comments
 (0)