Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* gn3/api/llm.py (delete_records): Using format-strings causes pylint
to error out.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
Chores/merge gnqa api
|
|
* gn3/api/metadata_api/wiki.py: Remove FIXME comment.
* gn3/db/wiki.py: Fix type error.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
In HTTP, we use content negotiation to server different
representations of a resource to the same URI to help the user agent
specify which representation is best suited for the user:
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation>
The "Accept" requet HTTP indicates which content types the user is
supposed to understand:
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept>
* gn3/api/metadata_api/wiki.py (get_wiki_entries): Use the "Accept"
header.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata_api/wiki.py: Import get_comment_history.
(get_history): New end-point.
* gn3/db/rdf/wiki.py: (get_comment_history): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import constants from gn3.db.rdf
* gn3/api/metadata_api/wiki.py: Ditto. Import
"get_wiki_entries_by_symbol" from gn3.db.rdf.wiki.
* gn3/db/constants.py: Delete file and move all constants ...
* gn3/db/rdf.py: ... and functions ...
* gn3/db/rdf/__init__.py: ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py (get_wiki_entries): Move this...
* gn3/api/metadata_api/wiki.py (edit_wiki): ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata_api/wiki.py (edit_wiki): Ignore type-check for
payload.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Remove duplicate imports.
* gn3/db/constants.py: Add docstring.
* gn3/db/rdf.py (get_wiki_entries_by_symbol): Remove duplicate
dictionary key.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py (get_wiki_entries): Return an empty {} when
there's no data.
* gn3/db/rdf.py (query_frame_and_compact): Delete check for empty
results. Instead just return the context as is.
(query_and_compact): Ditto.
(query_and_frame): Ditto.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import jsonify, make_response.
(get_wiki_entries): Set a 404 status code when a response is empty.
Set correct Content-Type header for ld+json.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Import "get_wiki_entries_by_symbol".
(get_gn_genewiki_entries): Rename this to...
(get_wiki_entries): this; and update the URL endpoint.
* gn3/db/rdf.py: Import constants.BASE_CONTEXT.
(get_wiki_entries_by_symbol): New function.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/metadata.py: Move constants from here...
* gn3/db/rdf.py: ... and here, to...
* gn3/db/constants.py: ... here.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
|
|
|
|
* Add better error messages
* Create more modular functions
|
|
|
|
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
|
|
* gn3/api/search.py (parse_boolean_prefixed_field): New function.
(parse_query): Use parse_boolean_prefixed_field for the group field.
|
|
With the STEM_SOME, xapian does not stem query words that start with a
capital letter. Hence, we switch to the STEM_ALL strategy.
* gn3/api/search.py (parse_query): Set stemming strategy to STEM_ALL.
|