Contents
New features
- [x] Support `setup.py` and `requirements-dev.txt` in Cloud Run Dockerfile
- [x] Retrieve credentials from Google Cloud Secret Manager and inject into environment in `Runner.run`
- [x] Add ability to retrieve and update cloud files via the `Datafile.download` or `Datafile.open` methods
- [x] Allow cloud file attributes to be updated via `Datafile.to_cloud` method
- [x] Allow instantiation of `TagSet`s from JSON-encoded lists
Breaking changes
- [x] Raise error if the datasets of the input manifest passed to `Service.ask` aren't all cloud-based
Fixes
- [x] Fix `Dataset` construction from serialised form in `Manifest`
- [x] Fix `Datafile` construction from serialised form in `Dataset`
- [x] Fix `Datafile.deserialise`
- [x] Adjust usages of `tempfile.NamedTemporaryFile` to also work on Windows
- [x] Add timeout and retry to `Service.answer`
- [x] Add retry to `Service.wait_for_answer`
- [x] Add 60 second timeout for answering question in Cloud Run deployment
- [x] Use correct environment variable for service ID in Cloud Run Dockerfile
- [x] Set `_last_modified`, `size_bytes`, and `_hash_value` to null values if a `Datafile` representing a cloud file is instantiated for a hypothetical cloud location (i.e. not synced to a cloud file at that point in time)
- [x] Allow `Dataset.get_file_sequence` use with no filter
Dependencies
- [x] Use new `twined` version that supports validation of `credentials` strand
- [x] Use newest version of `gcp-storage-emulator`
Minor improvements
- [x] Make `path` a positional argument of `Datafile`
- [x] Move `gunicorn` requirement into `octue` requirements
- [x] Raise warning instead of error if Google Cloud credentials environment variable is not found and return `None` as credentials
- [x] Move cloud code into new `cloud` subpackage
- [x] Raise `TimeoutError` in `Service.wait_for_answer` if no response is received by end of retries
- [x] Only look for `deployment_configuration.json` file in docker container `/app` directory
- [x] Ensure `deployment_configuration.json` file is always loaded correctly in docker container
- [x] Pass credentials strand into `Runner` instance in Cloud Run deployment
- [x] Add `name` attribute to `Identifiable` mixin
- [x] Add Google Cloud metadata to `Datafile` serialisation
- [x] Add `deserialise` method to `Datafile`
- [x] Add ability to add metadata to a `Datafile` instantiated from a regular cloud file
- [x] Use CRC32C hash value from Google Cloud when instantiating a `Datafile` from the cloud
- [x] Add ability to name `Datafile`s
- [x] Add ability to check whether a `Datafile`, all `Datafile`s in a `Dataset`, or all `Dataset`s in a `Manifest` are located in Google Cloud
- [x] Use `Datafile.deserialise` when instantiating a `Dataset` from a dictionary
- [x] Add representation to `GCPPubSubBackend`
- [x] Load credentials strand JSON in `Runner` initialisation
- [x] Add location searched to message of error raised when `app` module can't be found in `Runner.run`
- [x] Ignore `E203` flake8 warning
Testing
- [x] Remove subjective `Service` test `test_serve_with_timeout`
- [x] Use temporary file rather than temporary directory for tests where possible
- [x] Test `Dataset.deserialise`
Quality Checklist
- [x] New features are fully tested (No matter how much Coverage Karma you have)
Coverage Karma
- [x] If your PR decreases test coverage, do you feel you have built enough `Coverage Karma`* to justify it?