Releases: octue/octue-sdk-python
Releases · octue/octue-sdk-python
Release/0.1.15
Contents
Fixes
- Add
from_stringoption toSerialisable.deserialise
Testing
- Mock Google Pub/Sub
Service,Topic,Subscription,PublisherandSubscriberin tests - Remove unneeded cleanup code from
Servicetests
Release/0.1.14
Contents
Breaking changes
- Remove
TagSet.__str__
Fixes
- Use TagSet to deserialise tags in
Datafile.from_cloud - Add custom (de)serialise methods to
TagSet - Return subtags of a
Tagin order using aFilterList - Remove separate dependencies copy/cache steps in Google Cloud Run Dockerfile so that it works for older versions of
docker
Minor improvements
- Remove absolute path from
DatasetandManifestserialisation - Add
Serialisable.deserialisemethod - Add
filtermethod toTagSetto avoid e.g.taggable.tags.tags.filter
Operations
- Improve description of release workflow
Release/0.1.13
Contents
New features
- Support
setup.pyandrequirements-dev.txtin Cloud Run Dockerfile - Retrieve credentials from Google Cloud Secret Manager and inject into environment in
Runner.run - Add ability to retrieve and update cloud files via the
Datafile.downloadorDatafile.openmethods - Allow cloud file attributes to be updated via
Datafile.to_cloudmethod - Allow instantiation of
TagSets from JSON-encoded lists
Breaking changes
- Raise error if the datasets of the input manifest passed to
Service.askaren't all cloud-based
Fixes
- Fix
Datasetconstruction from serialised form inManifest - Fix
Datafileconstruction from serialised form inDataset - Fix
Datafile.deserialise - Adjust usages of
tempfile.NamedTemporaryFileto also work on Windows - Add timeout and retry to
Service.answer - Add retry to
Service.wait_for_answer - Add 60 second timeout for answering question in Cloud Run deployment
- Use correct environment variable for service ID in Cloud Run Dockerfile
- Set
_last_modified,size_bytes, and_hash_valueto null values if aDatafilerepresenting a cloud file is instantiated for a hypothetical cloud location (i.e. not synced to a cloud file at that point in time) - Allow
Dataset.get_file_sequenceuse with no filter
Dependencies
- Use new
twinedversion that supports validation ofcredentialsstrand - Use newest version of
gcp-storage-emulator
Minor improvements
- Make
patha positional argument ofDatafile - Move
gunicornrequirement intooctuerequirements - Raise warning instead of error if Google Cloud credentials environment variable is not found and return
Noneas credentials - Move cloud code into new
cloudsubpackage - Raise
TimeoutErrorinService.wait_for_answerif no response is received by end of retries - Only look for
deployment_configuration.jsonfile in docker container/appdirectory - Ensure
deployment_configuration.jsonfile is always loaded correctly in docker container - Pass credentials strand into
Runnerinstance in Cloud Run deployment - Add
nameattribute toIdentifiablemixin - Add Google Cloud metadata to
Datafileserialisation - Add
deserialisemethod toDatafile - Add ability to add metadata to a
Datafileinstantiated from a regular cloud file - Use CRC32C hash value from Google Cloud when instantiating a
Datafilefrom the cloud - Add ability to name
Datafiles - Add ability to check whether a
Datafile, allDatafiles in aDataset, or allDatasets in aManifestare located in Google Cloud - Use
Datafile.deserialisewhen instantiating aDatasetfrom a dictionary - Add representation to
GCPPubSubBackend - Load credentials strand JSON in
Runnerinitialisation - Add location searched to message of error raised when
appmodule can't be found inRunner.run - Ignore
E203flake8 warning
Testing
- Remove subjective
Servicetesttest_serve_with_timeout - Use temporary file rather than temporary directory for tests where possible
- Test
Dataset.deserialise
Quality Checklist
- New features are fully tested (No matter how much Coverage Karma you have)
Coverage Karma
- If your PR decreases test coverage, do you feel you have built enough
Coverage Karma* to justify it?
Release/0.1.12
Contents
New Features
- Add Google Cloud Run deployment for services
Breaking changes
- Move most parameters from
Runner.runtoRunner.__init__(this avoids the need for partial functions) - Split
Service.answerinto two methods - Return question UUID from
Service.ask
Minor fixes and improvements
- Use CRC32C hash function instead of Blake3 (due to extra requirements of Blake3 and the fact that Google Cloud uses CRC32C)
- Use default Google credentials in Pub/Sub service if
GCPPubSubBackend.credentials_environment_variableisNone - Add representations to
TopicandSubscription - Ensure all topic/subscription names start with their provided namespace (and ensure the namespace appears only once)
- Give
Services a random UUID as an ID if none is provided - Give
GCPPubSubBackenda default value for the credentials environment variable - Ensure GCP Storage paths always have the correct path separator
- Fix other Windows path issues
- Remove unused
copy_templatefunction
Testing
- Add automated testing for Windows and MacOS (in addition to Ubuntu)
- Use
toxfor cross-platform testing - Use
sys.executableinstead ofpythoninsubprocess.Popencalls to ensure the virtual environment's python executable is used - Ensure test paths are agnostic of operating system
Quality Checklist
- New features are fully tested (No matter how much Coverage Karma you have)
Coverage Karma
- If your PR decreases test coverage, do you feel you have built enough
Coverage Karma* to justify it?
Release/0.1.11
Contents
Minor fixes and improvements
- Remove test bucket environment variable
- Remove environment variable default argument from
GoogleCloudStorageEmulator - Add installation, usage, and testing instructions to README
Testing
- Test ability to start more than one Google Cloud Storage emulator at once
Release: 0.1.10
Contents
New Features
- Move Google Cloud Storage emulator into octue package, making it importable
Minor fixes and improvements
- Allow storage emulator to find and use a free port
- Remove need for
STORAGE_EMULATOR_HOSTenvironment variable for tests - Avoid assuming custom metadata is set in storage client
- Move
unittest.TestResultmethod replacements into Google Cloud emulators module - Remove
toxfrom CI tests, using just GitHub actions instead
Add Google Cloud Storage support; deprecate python < 3.8
Contents
New Features
- Add
GoogleCloudStorageClient - Write manifest, its datasets, and its datafiles to cloud in
Analysis.finalise(#96) - Closes #84 - add auto tag and release workflow
- Allow Google Cloud storage blobs to be represented by
Pathable - Add
Datafile,Dataset, andManifestto_cloudandfrom_cloudmethods - Allow regular GCP files to be represented as
Datafiles
Minor fixes and improvements
- Add cloud storage emulator once for all tests
- Add disk usage and file age utilities
- Allow
Datasets to have custom names - Add
storage.pathmodule akin toos.pathbut for Google Cloud Storage paths - Allow
Hashables' hash values to be set - Pass GCP project and bucket names to tests from environment (#93)
- Add ability to delete topic and subscription when a
Servicehas finished serving - Facilitate graceful exit for serving
Services onKeyboardInterrupt - Use latest versions of flake8, isort, and black in pre-commit and across all files (#87)
- Fix CI test skipping flag
- Fix documentation links (#92)
Breaking changes
- Remove testing and explicit support for
python3.6andpython3.7 - Remove
base_fromfrom Pathable and replace with more transparent method - Rename
Datafile.posix_timestamptoDatafile.timestampand remove default value - Make
Datafile.last_modifiedprivate - Rename
persistencesubpackage tostorage
Testing
- Test that children can question their own children as part of answering a question
- Close #94 - delete topics and subscriptions at the end of each test
- Remove timeouts from tests and replace with thread executor shutdown upon test pass, meaning that tests that connect to Google Pub/Sub won't fail because the connection is slower than expected
Child services, documentation, easier logging, and CI
Contents
New Features
- Enable use of child services - solving #46.
- To solve #57 we need to be able to define and run local children as well as remote ones.
- This means we must allow multiple services to run locally and independently...
- Which probably means we can also solve octue/twined-server#2 at the same time
- Enable Documentation Build and Serve, Update README #70
- Ultimately we wish to unify documentation between twined and octue-sdk-python, but this is best done at the time of refactoring large chunks of octue-sdk-python into twined ( See #69 ) but at the moment we wish to just serve what we've got so we can at least link to it.
- Add option to handle developer logs separately from Scientist logs (#78)
- Allow skipping of CI tests if #skip_ci_tests is in the commit body - the use case is to reduce unnecessary computation when knowing the tests will fail for a commit but still wanting to commit.
Minor fixes and improvements
- Implement a proper issue template, either derived from
.githubrepo or applied directly (c.f. octue/twined#60 ) - Close #32 - stop CLI tests leaving output files in working area.
Patch release: Add filtering capability and data input hashing
New Features
- Add
Hashablemixin to create data hashes ofDatafiles and their containers, including metadata - Add
Filterablemixin to makeDatafilesin aDatasetandTags in aTagSetfilterable - Add
FilterSetclass for storing and facilitating filtering ofDatafilesinDatasetandTags inTagSet - Add
FilterListfor the output of orderingFilterSets - Add a plethora of type- and interface-based filters for use on
FilterSets andFilterLists
Breaking changes
- Any
sha256properties have been replaced withblake3_hashproperties - Replace
TagSet.has_tagwith native `contains method - Rename
TagSet.starts_withtoTagSet.any_tag_starts_with - Rename
TagSet.ends_withtoTagSet.any_tag_ends_with
Minor fixes and improvements
- Replace SHA256 hashing with BLAKE3 hashing - this is reportedly around 10 times as fast!
- Neaten up #40/#42 by combining the two workflow files while still keeping separate checks on GitHub. This also makes the version check display less verbosely on GitHub
- Add
Tagclass, neatening up the retrieval and filtering of subtags - Rename
TagGrouptoTagSetto reflect that it's set-based