Summary
Addresses 10 by setting event handlers up to listen to service responses, as well as introducing a range of improvements such as using django-gcp for storage in the example, and improving the 'duplicate' feature to allow full control of duplicated fields via the Question subclass.
Contents
From ([13](https://github.com/octue/django-twined/pull/13)), ([#28](https://github.com/octue/django-twined/pull/28)) and ([#26](https://github.com/octue/django-twined/pull/26))
**IMPORTANT:** There are 2 breaking changes.
New features
- Add quick dataset instantiation from queryset
- 💥 **BREAKING CHANGE:** Update octue terminology and re-engineer as event stream handler
- Improve admin for ServiceRevision editability
- 💥 **BREAKING CHANGE:** Add to_datafile method
- Add signals from ServiceUsageEvents
- Replace duplication feature for more control
Enhancements
- Optimise performance of admin by prefetching related models
- Use name-based service IDs in ServiceRevision
- Make service revisions compatible with named topics
- Use django-gcp message decoder for answers
- Allow quick override of question ask method in admin form
- Add is_default field to allow switch of default service revisions
- Add helper to get the default service revision
Fixes
- Prevent https://github.com/psf/black/issues/2964 from occurring
- Update to latest usages of octue library
- Update Runner usage
- Allow older versions of django to use the default app config
- Only decode messages on events endpoint if kind matches
- Call label getter correctly
- Use a partial topic field as service ID
- Typo in signal name
- Ensure all signals are exported
- Make change form render during cloning
- Allow uuid objects as well as str uuids
- Correct logic in show_save_and_ask
- Prevent edit of the events
- Make question deletion cascade correctly
Operations
- Update to new checkout action
- Make barebone tests run with the integration test project
- Apply updated black version
- Make esbonio lint rst docs
- Prevent prettier from mangling html template files
- Make devcontainer pytest play nice with django
- Update to latest conventional commit checker
- Update to latest dev stack
- Make the devcontainer work with pytest
- Add security policy
- Update octue past manifest serialisation patch
- Enhance log on signal sending
- Add a save_as option instead of using modelclone
- Update test matrix and make ci names consistent with django-gcp
- Remove python 3.11 as its still in rc on GHA
- Update publisher stack
- Completely remove postgres from tox matrix
Dependencies
- Add dependencies for release
- Use octue=^0.27.0
- Update octue and django-gcp dependencies
- Update to latest django-gcp
- Update octue and django-gcp to ensure files arguments work
- Update django-gcp past error in static files collection
- Resolve psycopg2 to binary version
Testing
- Implement test and example apps
- Remove sqlite tests due to incompatibility per 24
- Add factory_boy for text fixtures
- Skip an integration test for which we have no infrastructure
Reversions
- Revert "OPS: Add a save_as option instead of using modelclone"
Chores
- Update setting for restructuredText source location
- Disable pylint warnings for migrations files
- Make test application usable
- Tidy up docstring typos
- Improve logger rendering
- Move factory-boy to dev dependencies
- Remove deprecation warning from django 40
Other
- General update of docs and add settings for events use
- Update license section
- Fix typo
- Add qualifying instrucitons to param description
- Bump protobuf from 3.20.0 to 3.20.2
- Merge pull request 25 from octue/dependabot/pip/protobuf-3.20.2
---
Upgrade instructions
<details>
<summary>💥 <b>Update octue terminology and re-engineer as event stream handler</b></summary>
The `RegisteredService` model is removed in favour of new `ServiceRevision` based octue terminology (this supports the move to octue named services).
- Users should first update django settings according to the docs and remove any existing `TWINED_SERVICES` entry (contents is now stored in the database, not hard coded).
- Users should remove any use of the `register_services` management command in release scripts
- Post-migration, users should check the ServiceRevisions table and update the service namespaces if required (a data migration is done, but the namespace of the newly-created service revisions uses the default namespace is assumed, since legacy `RegisteredService`s did not contain one).
- Users should update any direct usage of the removed `RegisteredService` model to use `ServiceRevision` instead.
- Storage is now managed by [`django-gcp`](https://django-gcp.readthedocs.io/). Whilst this *should* work OK with `django-storages`, we strongly encourage the use of `django-gcp` to also manage static and media stores, to prevent the requirement of two overlapping packages.
</details>
<details>
<summary>💥 <b>Add to_datafile method</b></summary>
The property is now a shortcut to the method which by default will NOT sync metadata from the store. This reduces the likelihood of pathologically slow behaviour occurring. To force update from the store, use the method directly.
</details>