Skip to content

Commit

Permalink
setup picture metadata mapping (#249)
Browse files Browse the repository at this point in the history
* setup picture metadata mapping

SDCP-737

* use extras

* fix filename setup

* update test os

* fix os name

* lock types requirement
  • Loading branch information
petrjasek authored Jun 10, 2024
1 parent 079c2d2 commit a2df4e4
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:

server:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

defaults:
run:
Expand All @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'

- run: |
sudo apt-get update
Expand All @@ -43,7 +43,7 @@ jobs:

client:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

defaults:
run:
Expand Down
13 changes: 12 additions & 1 deletion server/data/content_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"priority": 0,
"enabled": false,
"is_used": true,
"init_version": 2,
"init_version": 3,
"schema": {
"subject": {
"required": false,
Expand Down Expand Up @@ -393,6 +393,12 @@
"enabled": true,
"type": "text"
},
"filename": {
"required": false,
"nullable": true,
"enabled": true,
"type": "text"
},
"urgency": {
"required": false,
"nullable": true,
Expand Down Expand Up @@ -473,6 +479,11 @@
"required": false,
"order": 8,
"section": "content"
},
"filename": {
"required": false,
"order": 14,
"section": "content"
}
}
}, {
Expand Down
2 changes: 1 addition & 1 deletion server/data/vocabularies.json
Original file line number Diff line number Diff line change
Expand Up @@ -22765,7 +22765,7 @@
}
},
{
"_id": "Filename",
"_id": "filename",
"display_name": "Trans Ref",
"field_type": "text",
"items": [],
Expand Down
2 changes: 1 addition & 1 deletion server/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ black~=24.0

types-python-dateutil
types-pytz
types-requests
types-requests<2.31.0.7 # https://github.com/python/typeshed/issues/10825
types-six
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 @@ python3-saml>=1.9,<1.17
python-xmp-toolkit>=2.0.1,<2.1
num2words==0.5.13

git+https://github.com/superdesk/superdesk-core.git@release/2.7#egg=superdesk-core
Superdesk-Core[exiv2] @ git+https://github.com/superdesk/superdesk-core.git@develop#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
53 changes: 31 additions & 22 deletions server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
amqp==5.2.0
# via kombu
arrow==0.13.0
arrow==1.3.0
# via
# eve-elastic
# superdesk-core
Expand All @@ -26,9 +26,9 @@ blinker==1.7.0
# flask-mail
# raven
# superdesk-core
boto3==1.34.103
boto3==1.34.120
# via superdesk-core
botocore==1.34.103
botocore==1.34.120
# via
# boto3
# s3transfer
Expand All @@ -40,7 +40,7 @@ cerberus==1.3.5
# via
# eve
# superdesk-core
certifi==2024.2.2
certifi==2024.6.2
# via
# elastic-apm
# elasticsearch
Expand Down Expand Up @@ -69,19 +69,19 @@ click-repl==0.3.0
# via celery
croniter==2.0.5
# via superdesk-core
cryptography==42.0.7
cryptography==42.0.8
# via
# authlib
# jwcrypto
deepdiff==7.0.1
# via superdesk-planning
docopt==0.6.2
# via num2words
draftjs-exporter[lxml]==2.1.7
draftjs-exporter[lxml]==2.1.0
# via superdesk-core
ecs-logging==2.1.0
# via elastic-apm
elastic-apm[flask]==6.22.0
elastic-apm[flask]==6.22.2
# via superdesk-core
elasticsearch==7.13.4
# via
Expand All @@ -106,17 +106,17 @@ flask==1.1.2
# superdesk-core
flask-babel==2.0.0
# via superdesk-core
flask-mail==0.9.1
flask-mail==0.10.0
# via superdesk-core
flask-oidc-ex==0.5.5
flask-oidc-ex==0.5.8
# via superdesk-core
flask-script==2.0.6
# via superdesk-core
future==1.0.0
# via python-twitter
gunicorn==22.0.0
# via -r requirements.in
hachoir==3.0a3
hachoir==3.3.0
# via superdesk-core
hermescache==0.10.0
# via superdesk-core
Expand Down Expand Up @@ -152,14 +152,17 @@ kombu==5.2.4
# via
# celery
# superdesk-core
ldap3==2.5.2
ldap3==2.9.1
# via superdesk-core
lxml==4.6.5
lxml==5.2.2
# via
# draftjs-exporter
# lxml-html-clean
# python3-saml
# superdesk-core
# xmlsec
lxml-html-clean==0.1.1
# via superdesk-core
markupsafe==2.0.1
# via
# jinja2
Expand All @@ -176,11 +179,11 @@ ordered-set==4.1.0
# via deepdiff
packaging==24.0
# via gunicorn
pillow==9.2.0
pillow==10.3.0
# via
# reportlab
# superdesk-core
prompt-toolkit==3.0.43
prompt-toolkit==3.0.46
# via click-repl
pyasn1==0.6.0
# via
Expand All @@ -192,6 +195,8 @@ pyasn1-modules==0.4.0
# via oauth2client
pycparser==2.22
# via cffi
pyexiv2==2.12.0
# via superdesk-core
pyjwt==2.4.0
# via superdesk-core
pymemcache==4.0.0
Expand Down Expand Up @@ -238,11 +243,11 @@ redis==5.0.4
# via
# celery
# superdesk-core
regex==2020.7.14
regex==2024.4.28
# 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 @@ -265,19 +270,23 @@ six==1.16.0
# python-dateutil
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
# via -r requirements.in
superdesk-core[exiv2] @ git+https://github.com/superdesk/superdesk-core.git@develop
# via
# -r requirements.in
# superdesk-core
superdesk-planning @ git+https://github.com/superdesk/superdesk-planning.git@release/2.7
# via -r requirements.in
typing-extensions==4.11.0
types-python-dateutil==2.9.0.20240316
# via arrow
typing-extensions==4.12.1
# via
# jwcrypto
# superdesk-core
tzlocal==2.1
# via superdesk-core
unidecode==1.3.8
# via superdesk-core
urllib3==1.25.11
urllib3==1.26.18
# via
# botocore
# elastic-apm
Expand All @@ -297,9 +306,9 @@ werkzeug==1.0.1
# via
# flask
# superdesk-core
wrapt==1.14.1
wrapt==1.16.0
# via elastic-apm
xmlsec==1.3.13
xmlsec==1.3.14
# via
# python3-saml
# superdesk-core
6 changes: 6 additions & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,9 @@
SEMAPHORE_CREATE_TAG_URL = os.getenv("SEMAPHORE_CREATE_TAG_URL")
SEMAPHORE_CREATE_TAG_TASK = os.getenv("SEMAPHORE_CREATE_TAG_TASK")
SEMAPHORE_CREATE_TAG_QUERY = os.getenv("SEMAPHORE_CREATE_TAG_QUERY")

PICTURE_METADATA_MAPPING = {
"slugline": "Title",
"extra.filename": "JobId",
"description_text": "Description",
}

0 comments on commit a2df4e4

Please sign in to comment.