diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1cb31f57..b2de2034 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: server: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 defaults: run: @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.10' - run: | sudo apt-get update @@ -43,7 +43,7 @@ jobs: client: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 defaults: run: diff --git a/server/data/content_types.json b/server/data/content_types.json index 6fe23172..82772f91 100644 --- a/server/data/content_types.json +++ b/server/data/content_types.json @@ -312,7 +312,7 @@ "priority": 0, "enabled": false, "is_used": true, - "init_version": 2, + "init_version": 3, "schema": { "subject": { "required": false, @@ -393,6 +393,12 @@ "enabled": true, "type": "text" }, + "filename": { + "required": false, + "nullable": true, + "enabled": true, + "type": "text" + }, "urgency": { "required": false, "nullable": true, @@ -473,6 +479,11 @@ "required": false, "order": 8, "section": "content" + }, + "filename": { + "required": false, + "order": 14, + "section": "content" } } }, { diff --git a/server/data/vocabularies.json b/server/data/vocabularies.json index 2027464e..d4052bac 100644 --- a/server/data/vocabularies.json +++ b/server/data/vocabularies.json @@ -22765,7 +22765,7 @@ } }, { - "_id": "Filename", + "_id": "filename", "display_name": "Trans Ref", "field_type": "text", "items": [], diff --git a/server/dev-requirements.txt b/server/dev-requirements.txt index ff978c24..ad6f95c7 100644 --- a/server/dev-requirements.txt +++ b/server/dev-requirements.txt @@ -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 diff --git a/server/requirements.in b/server/requirements.in index 2ff92b27..89a21c7a 100644 --- a/server/requirements.in +++ b/server/requirements.in @@ -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/superdesk-analytics.git@v2.6.0#egg=superdesk-analytics diff --git a/server/requirements.txt b/server/requirements.txt index 56b1907f..e68c5531 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -6,7 +6,7 @@ # amqp==5.2.0 # via kombu -arrow==0.13.0 +arrow==1.3.0 # via # eve-elastic # superdesk-core @@ -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 @@ -40,7 +40,7 @@ cerberus==1.3.5 # via # eve # superdesk-core -certifi==2024.2.2 +certifi==2024.6.2 # via # elastic-apm # elasticsearch @@ -69,7 +69,7 @@ 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 @@ -77,11 +77,11 @@ 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 @@ -106,9 +106,9 @@ 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 @@ -116,7 +116,7 @@ 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -265,11 +270,15 @@ six==1.16.0 # python-dateutil superdesk-analytics @ git+https://github.com/superdesk/superdesk-analytics.git@v2.6.0 # 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 @@ -277,7 +286,7 @@ 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 @@ -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 diff --git a/server/settings.py b/server/settings.py index 20aa63d6..d96a9880 100644 --- a/server/settings.py +++ b/server/settings.py @@ -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", +}