Encode-utils

Latest version: v2.11.0

Safety actively analyzes 682532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

2.11.0

What's Changed
* EU-7 handle DCC urls with or without https schemes by paul-sud in https://github.com/StanfordBioinformatics/encode_utils/pull/25
* EU-23 Fix bugs affecting prop removal by jenjou in https://github.com/StanfordBioinformatics/encode_utils/pull/38
* EU-24-gc-upload by jenjou in https://github.com/StanfordBioinformatics/encode_utils/pull/39
* EU-25-update-remove-duplicate-associations-call by yunhailuo in https://github.com/StanfordBioinformatics/encode_utils/pull/40
* EU-27-eu-register-file-upload by paul-sud in https://github.com/StanfordBioinformatics/encode_utils/pull/43
* Pass 'dry_run' cli argument value on Connection init when 'dcc_mode' … by emi80 in https://github.com/StanfordBioinformatics/encode_utils/pull/45
* EU-28-add-more-attachment-props by jenjou in https://github.com/StanfordBioinformatics/encode_utils/pull/46

New Contributors
* emi80 made their first contribution in https://github.com/StanfordBioinformatics/encode_utils/pull/45

**Full Changelog**: https://github.com/StanfordBioinformatics/encode_utils/compare/2.10.0...2.11.0

2.10.0

Updates
* Default `requests` timeout has been increased to 60s
* `autoSql` attachments are now supported

Novelties
* Added an option to disable file logging
* Added an option to truncate long request payloads

Bugfixes
* Fixed incorrect singularization of `publication_data` to match portal

2.9.0

Updates
1. Posted aliases are now deduplicated
2. `profiles.Profile` has been removed and the rest of the `profiles` module has been refactored to allow for `connection.Connection` to pull schemas from URLs other than encodeproject.org

Novelties
1. `eu_register.py` now exposes `connection.Connection.remove_and_patch()` to allow for removing and patching properties in one request using the `--rm-patch` flag
2. File upload is now optional when posting file objects with `connection.Connetion.post` when specifying `upload_file=False`.
3. `connection.Connection.post` can now optionally return the original response code of the POST in addition to the usual JSON by specifying `return_original_status_code=True`.

Bugfixes
1. Fixed a bug in `connection.Connection.extend_array_values` that would cause spurious failures when extending with empty arrays
2. Fixed a typo in the documentation

2.8.0

Updates
1. Updated `connection.Connection.patch()` such that when the extend_array_values parameter is set to `True`, arrays with string or dictionary elements are extended and duplicates are removed.

Novelties
1. Added a new method `connection.Connection.remove_and_patch()` that allows for removing and patching properties in one request. Please see the [documentation](https://encode-utils.readthedocs.io/en/latest/connection.html#encode_utils.connection.Connection.remove_and_patch) for more details.

Bugfixes
1. Fixed a bug in `eu_register.check_valid_json()` that would allow attempted submission of JSON arrays of mixed types.

2.7.0

Updates:

* Updated `connection.Connection.before_post_file()` such that it will calculate file_size now (in addition to md5sum), and that whenever the md5sum needs to be set, the file_size will also be set.

Novelties:

* Added [connection.Connection.get_biosample_type()](https://encode-utils.readthedocs.io/en/latest/connection.html#encode_utils.connection.Connection.get_biosample_type) to aid in searching for a *BiosampleType* with a given classification and term_id or term_name.
* Added function [utils.orient_jpg()](https://encode-utils.readthedocs.io/en/latest/utils.html#encode_utils.utils.orient_jpg) which fixes misoriented images, rotating them as necessary. [connection.Connection.set_attachment()](https://encode-utils.readthedocs.io/en/latest/connection.html#encode_utils.connection.Connection.set_attachment) now calls this if the input file is a JPEG or TIFF.
* Added `aws_storage.py` that includes two classes: [S3Upload](https://encode-utils.readthedocs.io/en/latest/aws_storage.html#encode_utils.aws_storage.S3Upload) that simplifies the process of uploading files to a bucket in a specific location with the specified acl, and [S3Object](https://encode-utils.readthedocs.io/en/latest/aws_storage.html#encode_utils.aws_storage.S3Object) which represents an object in a S3 bucket and is internally used for calculating the md5sum and file size when submitting S3 objects to the ENCODE Portal.
* Added [utils.url_join()](https://encode-utils.readthedocs.io/en/latest/utils.html#encode_utils.utils.url_join) which is now used for property joining URL paths, rather than incorrectly with os.path.join since that doesn't construct the right paths on Windows systems.
* Added new function in `profiles.py` called [remove_duplicate_associations()](https://encode-utils.readthedocs.io/en/latest/profiles.html#encode_utils.profiles.Profile). This is called when patching a record so that EU can detect and remove duplicates in array values (when extending arrays).

Bug fixes
* Added patch to `profiles.Profile._set_profile_id()` to include exceptional cases, such as antibody_lot records using id values like '/antibodies/ENCAB719MQZ' instead of the expected '/antibody_lots/ENCAB719MQZ'.

2.6.0

Updates:

1. Updated documentation in `transfer_to_gcp.py` module.
1. Updated `utils.calculate_md5sum()` such that it works with an S3 URI in addition to a local file path.
1. Updated `utils.calculate_md5sum()` so that it is more memory efficient with large files by breaking it up into chunks.

Novelties:

1. Added new script `eu_patch_property.py`, which is useful for patching a given property with the same value across multiple records, potentially records of different profiles. For example, I once used this to patch the award property of many different object types, as I had originally used the wrong award when submitting the records.
1. New module `replicate.py` that makes working with replicates a whole lot easier. For example, you can search for a replicate by providing the biosample accession and the library accession. You can also let the module suggest what `biosample_replicate_number` and `technical_replicate_number` for you to use when submitting a new replicate object. Please see the well-documented source code for more details on how this works.
1. Added method `connection.Connection.get_experiments_with_biosample()`.
1. Added class method `profiles.Profile.profiles_with_property()`, which returns a list of all profiles containing the given property name.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.