Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/3490 apostrophes in titles #2360

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1c87041
added setting for mapping
RK206 Nov 29, 2023
5102c2b
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Jan 22, 2024
2e18716
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Jan 26, 2024
1eb8523
Updated Functional tests section for pull request template
RK206 Feb 15, 2024
f6a170d
Added seamless for article and ascii folded fix for article and journal
RK206 Mar 11, 2024
1c8546c
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Mar 11, 2024
478d97a
reverted changes
RK206 Mar 11, 2024
f1b8fff
added a testcase for searching with ascii folded characters
RK206 Mar 11, 2024
a8d5998
Added more unit tests and added ascii folding for abstract and author
RK206 Mar 13, 2024
b978483
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Mar 13, 2024
6ea21df
Revert "Updated Functional tests section for pull request template"
RK206 Apr 1, 2024
7f9f810
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Apr 1, 2024
23ab229
Done some minor fixes
RK206 Apr 1, 2024
9a3decc
Merge branch 'develop' into feature/3490_apostrophes_in_titles
Steven-Eardley Jul 4, 2024
5ce3957
Merge branch 'develop' into feature/3490_apostrophes_in_titles
Steven-Eardley Jul 4, 2024
e6e39ed
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Aug 12, 2024
2d4bb86
'additional_fields' handled in better way
RK206 Aug 14, 2024
40c4b2a
Merge remote-tracking branch 'origin/feature/3490_apostrophes_in_titl…
RK206 Aug 14, 2024
32bbb74
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Aug 21, 2024
d69fa08
Fixed merge conflicts
RK206 Aug 21, 2024
32eaa52
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Aug 26, 2024
b5ce460
Updated code for better implementation of ascii folding
RK206 Aug 26, 2024
7e29c3d
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Aug 26, 2024
d65640a
Roll back remaining 'additional_fields'
RK206 Aug 28, 2024
e04a3a4
Merge branch 'develop' into feature/3490_apostrophes_in_titles
Steven-Eardley Nov 5, 2024
f3b1106
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Nov 6, 2024
4a9162b
Added Application to ascii folding
RK206 Nov 7, 2024
a566381
Merge branch 'develop' into feature/3490_apostrophes_in_titles
Steven-Eardley Nov 14, 2024
5ddcd5b
Added alternative title for ascii folding
RK206 Dec 11, 2024
e858b71
Merge remote-tracking branch 'origin/feature/3490_apostrophes_in_titl…
RK206 Dec 11, 2024
15c50c3
Merge branch 'develop' of https://github.com/DOAJ/doaj into feature/3…
RK206 Dec 19, 2024
af0097e
Fixed a failing test
RK206 Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Roll back remaining 'additional_fields'
RK206 committed Aug 28, 2024
commit d65640ab448ff2dacb2a3204de6123a5c6af8827
2 changes: 1 addition & 1 deletion portality/lib/dataobj.py
Original file line number Diff line number Diff line change
@@ -759,7 +759,7 @@ def _get_list(self, path, coerce=None, by_reference=True, allow_coerce_failure=T
return deepcopy(val)

def _set_single(self, path, val, coerce=None, allow_coerce_failure=False, allowed_values=None, allowed_range=None,
allow_none=True, ignore_none=False, additional_fields = None):
allow_none=True, ignore_none=False):

if val is None and ignore_none:
return
8 changes: 1 addition & 7 deletions portality/lib/es_data_mapping.py
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@
# ~~->Seamless:Library~~
# ~~->DataObj:Library~~

from copy import deepcopy

from portality.lib import plugin


@@ -34,11 +32,7 @@ def apply_mapping_opts(field_name, path, spec, mapping_opts):
if dot_path in mapping_opts.get('exceptions', {}):
return mapping_opts['exceptions'][dot_path]
elif spec['coerce'] in mapping_opts['coerces']:
field_mapping = deepcopy(mapping_opts['coerces'][spec['coerce']])
if 'additional_fields' in spec:
field_mapping = {**field_mapping, **mapping_opts[spec['additional_fields']]}

return field_mapping
return mapping_opts['coerces'][spec['coerce']]
else:
# We have found a data type in the struct we don't have a map for to ES type.
raise Exception("Mapping error - no mapping found for {}".format(spec['coerce']))
2 changes: 1 addition & 1 deletion portality/lib/seamless.py
Original file line number Diff line number Diff line change
@@ -354,7 +354,7 @@ def get_single(self, path, coerce=None, default=None, allow_coerce_failure=True)
return val

def set_single(self, path, val, coerce=None, allow_coerce_failure=False, allowed_values=None, allowed_range=None,
allow_none=True, ignore_none=False, context="", additional_fields = None):
allow_none=True, ignore_none=False, context=""):

if val is None and ignore_none:
return