New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1361 create upload an download endpoint for storedfiles #1395
Merged
raduiordache
merged 18 commits into
main
from
1361-create-upload-an-download-endpoint-for-storedfiles
Mar 5, 2024
Merged
1361 create upload an download endpoint for storedfiles #1395
raduiordache
merged 18 commits into
main
from
1361-create-upload-an-download-endpoint-for-storedfiles
Mar 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The commit added two new methods to the StoredFilesReferencesProperty class. The 'clear' method allows clearing stored files from the property's value, minimizing the effect when converting from AttachmentProperty to StoredFileReferenceProperty. The 'filename' method provides the filename of the file stored in the property. Tests were updated accordingly.
Additional functionality added to StoredFile and StoredFilesReferencesProperty. The filename property has been added to StoredFile based on the basename of the file url. StoredFilesReferencesProperty received new filename, upload, and clear methods. Various functions and methods have been modified to utilize the new filename functionality, and corresponding tests have been updated or added to confirm correct functionality.
…storedfiles # Conflicts: # pykechain/utils.py
The test file 'TestDownloadStoredFiles.test_download_image_from_stored_file.json' has been removed. This is because the StoredFiles and StoredFilesReferencesProperty functionality has been updated, rendering this particular test case obsolete.
This commit introduces the ability to download, upload, and reference `StoredFiles`. It also includes functions for effectively managing `StoredFileReferenceProperty`. Subsequently, redundant test files related to downloading images from `StoredFiles` have been removed.
This commit removes the now redundant JSON test file for uploading plot files to `StoredFiles`. This change is in line with the recent implementation of new handling for `StoredFiles` which includes efficient management of `StoredFileReferenceProperty`.
This test file was removed because it is no longer needed after the implementation of improved handling for StoredFiles. The updates to StoredFiles now allow for more efficient management of StoredFileReferenceProperty, making this test file obsolete.
Docstrings in 'stored_file.py', 'utils.py', and 'property_reference.py' files have been modified to provide clearer explanations. Extra lines were removed to deliver information more concisely and periods were added where they were missing. The original intent of the docstrings is preserved while improving readability.
ke-works-bot
approved these changes
Mar 1, 2024
jberends
approved these changes
Mar 1, 2024
This modification introduces default matching options for requests in Betamax's setup in the tests/classes.py file. The newly added options include 'method' and 'uri', increasing precision on requests matching. In addition, the placeholder for "STORED_FILE_CDN_URL" was defined.
Configured test cassette options in Betamax setup for better test accuracy. The default matching options, 'method' and 'uri', have been included for more precise request matching. Additionally, a placeholder for "STORED_FILE_CDN_URL" was defined.
This update modifies the Betamax config in tests/classes.py to provide more clarity. Specifically, the default cassette options for 'method' and 'uri' have been reorganized for easier reading. Additionally, the placeholder for "STORED_FILE_CDN_URL" has been defined in the setup.
Refactored test cases by creating a base test case for StoredFiles. Specific test cases for Download and Upload now inherit from this base case. Some test cases have been marked to be skipped when running in continuous integration environments such as Travis or Github Actions due to access key restrictions on stored file download links.
raduiordache
deleted the
1361-create-upload-an-download-endpoint-for-storedfiles
branch
March 5, 2024 13:29
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #
Checklist:
tox
to check for dists and docs errorspep8
andflake8
linting checks and no warningsCode > Optimize Imports
in PyCharmblack
to format the new code