diff --git a/config/default.py b/config/default.py index 25cb58188..e45d68ab5 100644 --- a/config/default.py +++ b/config/default.py @@ -3,7 +3,7 @@ from config.database_versions import DATABASE_VERSIONS -VERSION = '7.17.0' +VERSION = '7.18.0' DATABASE_VERSION = DATABASE_VERSIONS[0] DEMO_MODE = False # If activated some options are disabled, login is prefilled DEBUG = False diff --git a/install.md b/install.md index 94ebf6028..2379a89ea 100644 --- a/install.md +++ b/install.md @@ -130,7 +130,7 @@ high-quality, attributed digital objects online at scale. Be aware that: * IIIF is **optional** for an OpenAtlas installation * Although already working and in use we still consider it **experimental** -* Enabling it can expose used files to the public (without login) +* Enabling IIIF can expose files to the public (without login) ### Installation @@ -185,7 +185,7 @@ To run OpenAtlas as a Docker container clone the repository git clone https://github.com/craws/OpenAtlas.git Open an CLI in the directory where you cloned OpenAtlas and run - + docker compose up --detach After the containers are build an OpenAtlas instance is available under diff --git a/install/upgrade/upgrade.md b/install/upgrade/upgrade.md index 88c55fc3e..2c022bba0 100644 --- a/install/upgrade/upgrade.md +++ b/install/upgrade/upgrade.md @@ -24,8 +24,8 @@ then run the database upgrade script, then restart Apache: #### Configuration The configuration was refactored, especially path parameters. You should compare your **instance/production.py** with **config/default.py** in case you -made adaptions to these. The same goes for **instance/tests.py** in case you -are also using tests. +made adaptions there. The same goes for **instance/tests.py** in case you are +running tests. #### NPM - additional packages @@ -37,6 +37,19 @@ are also using tests. #### IIIF If you want to use IIIF, please refer to the relevant section at **install.md** +#### Deprecation warnings +Because of the new API version 0.4.0 following functionality is now deprecated. +It will be removed with the next OpenAtlas major version **8.0.0**, probably +around New Year 2024. + +**API version 0.4 breaking changes** +* **API:** Remove of /content endpoint +* **API:** Rename name to label in first layer of /type_by_view_class/ and + /type_overview/ +* **API:** Incorporate /classes into /backend_details +* **Backend:** Deprecation of the content section in the admin area which was + used by former presentation sites + ### 7.15.0 to 7.16.0 7.16.0.sql is needed but will be taken care of by the database upgrade script. diff --git a/openatlas/api/endpoints/special.py b/openatlas/api/endpoints/special.py index dbda4145b..f265b7c5e 100644 --- a/openatlas/api/endpoints/special.py +++ b/openatlas/api/endpoints/special.py @@ -54,7 +54,7 @@ def get(format_: str) -> Union[tuple[Resource, int], Response]: if format_ == 'xml': return export_database_xml(tables, filename) return Response( - json.dumps({key: value for key, value in tables.items()}), + json.dumps(tables), mimetype='application/json', headers={ 'Content-Disposition': f'attachment;filename={filename}.json'}) diff --git a/openatlas/api/formats/loud.py b/openatlas/api/formats/loud.py index 639cdfd24..8f5099995 100644 --- a/openatlas/api/formats/loud.py +++ b/openatlas/api/formats/loud.py @@ -14,7 +14,6 @@ def get_loud_entities(data: dict[str, Any], loud: dict[str, str]) -> Any: - properties_set = defaultdict(list) def base_entity_dict() -> dict[str, Any]: return { @@ -43,6 +42,7 @@ def get_domain_links() -> dict[str, Any]: property_['classified_as'] = get_type_property(standard_type) return property_ + properties_set = defaultdict(list) for link_ in data['links']: if link_.property.code in ['OA7', 'OA8', 'OA9']: continue @@ -81,24 +81,26 @@ def get_domain_links() -> dict[str, Any]: if image_links: profile_image = Entity.get_profile_image_id(data['entity']) - representation = {"type": "VisualItem", "digitally_shown_by": []} + representation: dict[str, Any] = { + 'type': 'VisualItem', + 'digitally_shown_by': []} for link_ in image_links: id_ = link_.domain.id mime_type, _ = mimetypes.guess_type(g.files[id_]) if not mime_type: continue # pragma: no cover image = { - "id": url_for('api.entity', id_=id_, _external=True), - "_label": link_.domain.name, - "type": "DigitalObject", - "format": mime_type, - "access_point": [{ - "id": url_for( + 'id': url_for('api.entity', id_=id_, _external=True), + '_label': link_.domain.name, + 'type': 'DigitalObject', + 'format': mime_type, + 'access_point': [{ + 'id': url_for( 'api.display', - filename=get_file_path(id_).stem, + filename=get_file_path(id_).stem, # type: ignore _external=True), - "type": "DigitalObject", - "_label": "ProfileImage" if id_ == profile_image else ''}]} + 'type': 'DigitalObject', + '_label': 'ProfileImage' if id_ == profile_image else ''}]} if type_ := get_standard_type_loud(link_.domain.types): image['classified_as'] = get_type_property(type_) representation['digitally_shown_by'].append(image) diff --git a/openatlas/forms/setting.py b/openatlas/forms/setting.py index 45de285d1..412f7a797 100644 --- a/openatlas/forms/setting.py +++ b/openatlas/forms/setting.py @@ -61,13 +61,18 @@ class MailForm(FlaskForm): class IiifForm(FlaskForm): - iiif = BooleanField('IIIF') - iiif_url = StringField(_('URL')) - iiif_version = SelectField(_('version'), choices=((2, 2),), coerce=int) + iiif = BooleanField('IIIF', description=_('tooltip IIIF enabled')) + iiif_url = StringField(_('URL'), description=_('tooltip IIIF URL')) + iiif_version = SelectField( + _('version'), + choices=((2, 2),), + coerce=int, + description=_('tooltip IIIF version')) iiif_conversion = SelectField( _('conversion'), - choices=(('', 'none'), ('deflate', 'deflate'), ('jpeg', 'jpeg'))) - iiif_path = StringField(_('path')) + choices=(('', 'none'), ('deflate', 'deflate'), ('jpeg', 'jpeg')), + description=_('tooltip IIIF conversion')) + iiif_path = StringField(_('path'), description=_('tooltip IIIF path')) save = SubmitField(_('apply')) diff --git a/openatlas/static/images/model/openatlas_schema.odg b/openatlas/static/images/model/openatlas_schema.odg index 72ef8799e..16eb0c3a3 100644 Binary files a/openatlas/static/images/model/openatlas_schema.odg and b/openatlas/static/images/model/openatlas_schema.odg differ diff --git a/openatlas/static/images/model/openatlas_schema.png b/openatlas/static/images/model/openatlas_schema.png index 84a17a400..01bb9bff3 100644 Binary files a/openatlas/static/images/model/openatlas_schema.png and b/openatlas/static/images/model/openatlas_schema.png differ diff --git a/openatlas/static/images/model/openatlas_schema2.png b/openatlas/static/images/model/openatlas_schema2.png index c5b55c2d2..ac68c53e2 100644 Binary files a/openatlas/static/images/model/openatlas_schema2.png and b/openatlas/static/images/model/openatlas_schema2.png differ diff --git a/openatlas/static/manual/.doctrees/admin/iiif.doctree b/openatlas/static/manual/.doctrees/admin/iiif.doctree index ee7b40800..23295ad13 100644 Binary files a/openatlas/static/manual/.doctrees/admin/iiif.doctree and b/openatlas/static/manual/.doctrees/admin/iiif.doctree differ diff --git a/openatlas/static/manual/.doctrees/environment.pickle b/openatlas/static/manual/.doctrees/environment.pickle index 25b8088e7..beb8b35d3 100644 Binary files a/openatlas/static/manual/.doctrees/environment.pickle and b/openatlas/static/manual/.doctrees/environment.pickle differ diff --git a/openatlas/static/manual/.doctrees/features.doctree b/openatlas/static/manual/.doctrees/features.doctree index 784dd95ff..888de96e8 100644 Binary files a/openatlas/static/manual/.doctrees/features.doctree and b/openatlas/static/manual/.doctrees/features.doctree differ diff --git a/openatlas/static/manual/_images/openatlas_schema.png b/openatlas/static/manual/_images/openatlas_schema.png index 84a17a400..01bb9bff3 100644 Binary files a/openatlas/static/manual/_images/openatlas_schema.png and b/openatlas/static/manual/_images/openatlas_schema.png differ diff --git a/openatlas/static/manual/_images/openatlas_schema2.png b/openatlas/static/manual/_images/openatlas_schema2.png index c5b55c2d2..ac68c53e2 100644 Binary files a/openatlas/static/manual/_images/openatlas_schema2.png and b/openatlas/static/manual/_images/openatlas_schema2.png differ diff --git a/openatlas/static/manual/admin/iiif.html b/openatlas/static/manual/admin/iiif.html index a91fad0fd..787b03bb9 100644 --- a/openatlas/static/manual/admin/iiif.html +++ b/openatlas/static/manual/admin/iiif.html @@ -201,9 +201,16 @@

IIIF¶ high-quality, attributed digital objects online at scale. Once installed (see installations notes) it can be configured in the admin area at the IIIF tab.

+

Be aware that

+ +

Configuration

+

In case you are running multiple OpenAtlas instances you should create a sub +directory for every instance at /var/www/iipsrv/ and also add these to +URL and Path accordingly.

These formats have been successfully tested with OpenAtlas: