Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/uat' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Sep 26, 2024
2 parents 070572b + 8107d92 commit 23dc2ef
Show file tree
Hide file tree
Showing 7 changed files with 1,323 additions and 1,724 deletions.
2,930 changes: 1,260 additions & 1,670 deletions client/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"superdesk-planning": "github:superdesk/superdesk-planning#release/2.7"
},
"scripts": {
"build": "npx @superdesk/build-tools build-root-repo ./"
"build": "npx @superdesk/build-tools build-root-repo ./",
"start": "npx grunt server"
},
"devDependencies": {
"@superdesk/build-tools": "^1.0.14"
Expand Down
2 changes: 1 addition & 1 deletion server/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ slackclient==1.0.9
WTForms>=3.1,<3.2
Flask-WTF>=0.14.2,<1.3

git+https://github.com/superdesk/superdesk-core.git@release/2.7#egg=superdesk-core
git+https://github.com/superdesk/superdesk-core.git@v2.7.3#egg=superdesk-core
git+https://github.com/superdesk/superdesk-planning.git@release/2.7#egg=superdesk-planning
git+https://github.com/superdesk/[email protected]#egg=superdesk-analytics
41 changes: 21 additions & 20 deletions server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile requirements.in
Expand All @@ -14,9 +14,9 @@ async-timeout==4.0.3
# via redis
authlib==0.14.3
# via superdesk-core
babel==2.14.0
babel==2.16.0
# via flask-babel
bcrypt==4.1.2
bcrypt==4.1.3
# via superdesk-core
billiard==3.6.4.0
# via celery
Expand All @@ -26,13 +26,13 @@ blinker==1.7.0
# flask-mail
# raven
# superdesk-core
boto3==1.34.84
boto3==1.35.3
# via superdesk-core
botocore==1.34.84
botocore==1.35.3
# via
# boto3
# s3transfer
cachetools==5.3.3
cachetools==5.5.0
# via flask-oidc-ex
celery[redis]==5.2.7
# via superdesk-core
Expand All @@ -45,7 +45,7 @@ certifi==2024.7.4
# elastic-apm
# elasticsearch
# requests
cffi==1.16.0
cffi==1.17.0
# via cryptography
chardet==5.2.0
# via superdesk-core
Expand All @@ -67,7 +67,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
croniter==2.0.3
croniter==2.0.7
# via superdesk-core
cryptography==43.0.1
# via
Expand All @@ -77,9 +77,9 @@ deepdiff==7.0.1
# via superdesk-planning
draftjs-exporter[lxml]==2.1.7
# via superdesk-core
ecs-logging==2.1.0
ecs-logging==2.2.0
# via elastic-apm
elastic-apm[flask]==6.22.0
elastic-apm[flask]==6.23.0
# via superdesk-core
elasticsearch==7.13.4
# via
Expand Down Expand Up @@ -172,13 +172,13 @@ oauthlib==3.2.2
# via requests-oauthlib
ordered-set==4.1.0
# via deepdiff
packaging==24.0
packaging==24.1
# via gunicorn
pillow==9.2.0
# via
# reportlab
# superdesk-core
prompt-toolkit==3.0.43
prompt-toolkit==3.0.47
# via click-repl
pyasn1==0.6.0
# via
Expand Down Expand Up @@ -216,26 +216,27 @@ python-twitter==3.5
# via superdesk-core
pytz==2024.1
# via
# babel
# celery
# croniter
# eve-elastic
# flask-babel
# icalendar
# superdesk-core
# tzlocal
pyyaml==6.0.1
pyyaml==6.0.2
# via superdesk-core
raven[flask]==6.10.0
# via superdesk-core
redis==5.0.3
redis==5.0.8
# via
# celery
# superdesk-core
regex==2020.7.14
# via superdesk-core
reportlab==3.6.13
# via superdesk-core
requests==2.32.0
requests==2.32.3
# via
# python-twitter
# requests-oauthlib
Expand All @@ -245,11 +246,11 @@ requests-oauthlib==2.0.0
# via python-twitter
rsa==4.9
# via oauth2client
s3transfer==0.10.1
s3transfer==0.10.2
# via boto3
sgmllib3k==1.0.0
# via feedparser
simplejson==3.19.2
simplejson==3.19.3
# via eve
six==1.16.0
# via
Expand All @@ -262,11 +263,11 @@ slackclient==1.0.9
# via -r requirements.in
superdesk-analytics @ git+https://github.com/superdesk/[email protected]
# via -r requirements.in
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@release/2.7
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@v2.7.3
# via -r requirements.in
superdesk-planning @ git+https://github.com/superdesk/superdesk-planning.git@release/2.7
# via -r requirements.in
typing-extensions==4.11.0
typing-extensions==4.12.2
# via
# jwcrypto
# superdesk-core
Expand Down Expand Up @@ -296,7 +297,7 @@ werkzeug==1.0.1
# via
# flask
# superdesk-core
wrapt==1.14.1
wrapt==1.16.0
# via elastic-apm
wtforms==3.1.2
# via
Expand Down
67 changes: 36 additions & 31 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,40 +214,45 @@
},
}

SCHEMA_UPDATE = {
"archive": {
"extra": {
"type": "dict",
"schema": {},
"mapping": {
"type": "object",
"dynamic": False,
"properties": {
"profile_id": not_analyzed,
"profile_first_name": es_text,
"profile_last_name": es_text,
"profile_title": cv_item,
"profile_job_title": cv_item,
"profile_email": es_text,
"profile_university": cv_item,
"profile_project": cv_item,
"profile_country": {
"type": "object",
"properties": {
"name": text_with_keyword,
"qcode": not_analyzed,
"region": text_with_keyword,
},
extra_schema = {
"extra": {
"type": "dict",
"schema": {},
"mapping": {
"type": "object",
"dynamic": False,
"properties": {
"profile_id": not_analyzed,
"profile_first_name": es_text,
"profile_last_name": es_text,
"profile_title": cv_item,
"profile_job_title": cv_item,
"profile_email": es_text,
"profile_university": cv_item,
"profile_project": cv_item,
"profile_country": {
"type": "object",
"properties": {
"name": text_with_keyword,
"qcode": not_analyzed,
"region": text_with_keyword,
},
"profile_biography": string_with_analyzer,
"profile_gender": cv_item,
"profile_age_group": cv_item,
"profile_orcid_id": es_text,
"profile_sdg": cv_item,
"profile_sdgs": cv_item,
},
"profile_biography": string_with_analyzer,
"profile_gender": cv_item,
"profile_age_group": cv_item,
"profile_orcid_id": es_text,
"profile_sdg": cv_item,
"profile_sdgs": cv_item,
},
"allow_unknown": True,
},
"allow_unknown": True,
},
}

SCHEMA_UPDATE = {
"archive": extra_schema,
"archived": extra_schema,
"published": extra_schema,
"items": extra_schema, # ContentAPI
}
2 changes: 2 additions & 0 deletions server/tests/fixtures/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
"enabled": True,
"required": True,
},
"profile_id": None,
},
"schema": {
"slugline": {
Expand All @@ -200,6 +201,7 @@
"maxlength": 24,
"nullable": False,
},
"profile_id": None,
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion server/tga/author_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _get_content_profile_custom_fields(original: Dict[str, Any]) -> List[Dict[st
return [
field
for field in get_resource_service("vocabularies").get_extra_fields()
if field["_id"] in content_profile["schema"].keys()
if (content_profile["editor"].get(field["_id"]) or {}).get("enabled")
]


Expand Down

0 comments on commit 23dc2ef

Please sign in to comment.