-
Notifications
You must be signed in to change notification settings - Fork 6
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
0.14.0 #131
0.14.0 #131
Conversation
WalkthroughThe update introduces a new method for determining document format and conversion formats in the Uploadcare REST API, with both synchronous and asynchronous usage options. It also updates the library version, adds privacy information files, and includes new test cases and dependency updates. The changes ensure the codebase is up-to-date and enhances functionality with robust document handling capabilities. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Outside diff range and nitpick comments (1)
Documentation/REST API.md (1)
571-588
: The documentation for thedocumentInfo
method is clear and provides examples for both asynchronous and callback-based usage. This will be very helpful for developers integrating this API. Ensure that the example UUIDs like "fileUUID" are clearly marked as placeholders to avoid confusion.Consider adding a note that "fileUUID" is a placeholder and should be replaced with an actual file UUID in production code.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- Documentation/REST API.md (1 hunks)
- Sources/Uploadcare/Constants.swift (1 hunks)
- Sources/Uploadcare/PrivacyInfo.xcprivacy (1 hunks)
- Sources/Uploadcare/Uploadcare.swift (1 hunks)
- Sources/Uploadcare/models/REST/DocumentInfo.swift (1 hunks)
- Tests/UploadcareTests/RESTAPIIntegrationAsyncTests.swift (1 hunks)
- Tests/UploadcareTests/RESTAPIIntegrationTests.swift (1 hunks)
- Uploadcare.podspec (1 hunks)
- Uploadcare.xcodeproj/project.pbxproj (10 hunks)
Files skipped from review due to trivial changes (3)
- Sources/Uploadcare/Constants.swift
- Sources/Uploadcare/PrivacyInfo.xcprivacy
- Uploadcare.podspec
Additional Context Used
LanguageTool (4)
Documentation/REST API.md (4)
Near line 20: Possible typo: you repeated a word
Context: ...elete-webhook-api-reference) * Convert document * [Document conversion job status](#document-conver...
Near line 22: Possible typo: you repeated a word
Context: ...on-job-status-api-reference) * Convert video * [Video conversion job status](#video-conversio...
Near line 62: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ..., for example) to your Uploadcare object or it will get deallocated. ## List of fi...
Near line 471: The usual collocation for “returned” is “to”, not “in”.
Context: ...RL. A redirected URL will be caught and returned in the completion handler of that method. ...
Markdownlint (60)
Documentation/REST API.md (60)
64: Expected: atx; Actual: atx_closed
Heading style
131: Expected: atx; Actual: atx_closed
Heading style
166: Expected: atx; Actual: atx_closed
Heading style
239: Expected: atx; Actual: atx_closed
Heading style
277: Expected: atx; Actual: atx_closed
Heading style
315: Expected: atx; Actual: atx_closed
Heading style
332: Expected: atx; Actual: atx_closed
Heading style
351: Expected: atx; Actual: atx_closed
Heading style
421: Expected: atx; Actual: atx_closed
Heading style
438: Expected: atx; Actual: atx_closed
Heading style
451: Expected: atx; Actual: atx_closed
Heading style
468: Expected: atx; Actual: atx_closed
Heading style
493: Expected: atx; Actual: atx_closed
Heading style
510: Expected: atx; Actual: atx_closed
Heading style
531: Expected: atx; Actual: atx_closed
Heading style
553: Expected: atx; Actual: atx_closed
Heading style
571: Expected: atx; Actual: atx_closed
Heading style
590: Expected: atx; Actual: atx_closed
Heading style
631: Expected: atx; Actual: atx_closed
Heading style
660: Expected: atx; Actual: atx_closed
Heading style
708: Expected: atx; Actual: atx_closed
Heading style
12: Expected: 0 or 2; Actual: 1
Trailing spaces
838: Expected: 0 or 2; Actual: 16
Trailing spaces
884: Expected: 0 or 2; Actual: 16
Trailing spaces
189: Column: 1
Hard tabs
411: Column: 36
Hard tabs
567: Column: 6
Hard tabs
639: Column: 1
Hard tabs
641: Column: 1
Hard tabs
860: Column: 1
Hard tabs
28: Expected: 1; Actual: 2
Multiple consecutive blank lines
738: Expected: 1; Actual: 2
Multiple consecutive blank lines
438: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
739: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
742: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
781: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
820: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
865: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
149: null
Fenced code blocks should be surrounded by blank lines
169: null
Fenced code blocks should be surrounded by blank lines
185: null
Fenced code blocks should be surrounded by blank lines
204: null
Fenced code blocks should be surrounded by blank lines
224: null
Fenced code blocks should be surrounded by blank lines
390: null
Fenced code blocks should be surrounded by blank lines
406: null
Fenced code blocks should be surrounded by blank lines
439: null
Fenced code blocks should be surrounded by blank lines
744: null
Fenced code blocks should be surrounded by blank lines
760: null
Fenced code blocks should be surrounded by blank lines
776: null
Fenced code blocks should be surrounded by blank lines
783: null
Fenced code blocks should be surrounded by blank lines
799: null
Fenced code blocks should be surrounded by blank lines
815: null
Fenced code blocks should be surrounded by blank lines
822: null
Fenced code blocks should be surrounded by blank lines
840: null
Fenced code blocks should be surrounded by blank lines
856: null
Fenced code blocks should be surrounded by blank lines
867: null
Fenced code blocks should be surrounded by blank lines
886: null
Fenced code blocks should be surrounded by blank lines
902: null
Fenced code blocks should be surrounded by blank lines
473: null
Bare URL used
473: null
Bare URL used
Additional comments not posted (5)
Sources/Uploadcare/models/REST/DocumentInfo.swift (3)
11-24
: TheConversionFormat
struct is well-defined and adheres to the Codable protocol for easy serialization. The use ofdecodeIfPresent
in the initializer ensures that thename
property can default to an empty string if not present, which is a safe approach to handle potential missing data in JSON.
26-49
: TheDocumentFormat
struct is correctly implemented with properties and a custom initializer. The use ofdecodeIfPresent
for bothname
andconversionFormats
with sensible defaults (empty string and empty array) is commendable as it prevents runtime errors due to missing data.
51-74
: TheDocumentInfo
struct is well implemented. The optionalerror
property allows for error handling without throwing exceptions, which is a good practice in robust API design. The use ofdecodeIfPresent
with defaults ensures that the object can always be instantiated, even if some data is missing in the JSON response.Tests/UploadcareTests/RESTAPIIntegrationTests.swift (1)
1035-1037
: Ensure comprehensive validation ofdocumentInfo
properties.The assertions correctly validate that no error occurred and that the document format and conversion formats are as expected. This aligns well with the functionality described in the PR summary.
Uploadcare.xcodeproj/project.pbxproj (1)
241-248
: Added references toDocumentInfo.swift
andPrivacyInfo.xcprivacy
in the project file.This ensures that the new files are recognized by the Xcode project and are included in the build phases appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- .github/workflows/test.yml (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/test.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coderabbitai review |
Actions PerformedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- .github/workflows/test.yml (1 hunks)
- Package.resolved (1 hunks)
- Package.swift (1 hunks)
- Sources/Uploadcare/Utils.swift (1 hunks)
- Sources/UploadcareWidget/PrivacyInfo.xcprivacy (1 hunks)
- Tests/UploadcareTests/RESTAPIIntegrationAsyncTests.swift (1 hunks)
- Tests/UploadcareTests/RESTAPIIntegrationTests.swift (1 hunks)
- Uploadcare.podspec (2 hunks)
Files skipped from review due to trivial changes (1)
- Sources/UploadcareWidget/PrivacyInfo.xcprivacy
Files skipped from review as they are similar to previous changes (3)
- Tests/UploadcareTests/RESTAPIIntegrationAsyncTests.swift
- Tests/UploadcareTests/RESTAPIIntegrationTests.swift
- Uploadcare.podspec
Additional comments not posted (6)
.github/workflows/test.yml (2)
12-24
: The updates to the macOS build and test job are correctly configured.
32-32
: The Swift version matrix for Ubuntu testing is well-defined, ensuring compatibility across different Swift versions.Package.swift (2)
42-45
: The inclusion ofPrivacyInfo.xcprivacy
in theUploadcare
target is aligned with the PR's privacy enhancement objectives.Verification successful
The
PrivacyInfo.xcprivacy
files are present in theSources/UploadcareWidget
andSources/Uploadcare
directories. We need to verify if these files are correctly referenced in thePackage.swift
file and included in the build process.
The
PrivacyInfo.xcprivacy
file is referenced twice in thePackage.swift
file. This could be due to multiple targets or an error. We need to review the context of these references to determine if this is intentional or a potential issue.
The
PrivacyInfo.xcprivacy
file is correctly referenced in both theUploadcare
andUploadcareWidget
targets in thePackage.swift
file. This inclusion aligns with the PR's objective to handle privacy-related information.
Uploadcare
target:PrivacyInfo.xcprivacy
is included as a resource.UploadcareWidget
target:PrivacyInfo.xcprivacy
is included as a resource.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `PrivacyInfo.xcprivacy` is included in the build artifacts. # Test: Search for the resource in the build output. Expect: Resource should be present. fd --type file "PrivacyInfo.xcprivacy" --exec ls -l {}Length of output: 244
Script:
#!/bin/bash # Description: Verify that `PrivacyInfo.xcprivacy` is correctly referenced in the `Package.swift` file. # Search for the inclusion of `PrivacyInfo.xcprivacy` in the `Package.swift` file. rg 'PrivacyInfo.xcprivacy' Package.swiftLength of output: 116
Script:
#!/bin/bash # Description: Review the context of `PrivacyInfo.xcprivacy` references in the `Package.swift` file. # Display the lines around the references to `PrivacyInfo.xcprivacy` in the `Package.swift` file. rg -C 5 'PrivacyInfo.xcprivacy' Package.swiftLength of output: 509
49-52
: Consistent application of privacy considerations with the inclusion ofPrivacyInfo.xcprivacy
in theUploadcareWidget
target.Package.resolved (2)
2-9
: Updatedasync-http-client
to version1.21.1
correctly reflects the latest stable release, ensuring the project benefits from the latest improvements and bug fixes.
40-45
: The update toswift-crypto
version3.4.0
ensures the project uses a secure and up-to-date cryptography library.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Sources/Uploadcare/Utils.swift (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- Sources/Uploadcare/Utils.swift
Summary by CodeRabbit
New Features
documentInfo
method to determine document format and conversion formats, available for both synchronous and asynchronous usage.PrivacyInfo.xcprivacy
for managing privacy-related information.Bug Fixes
Documentation
documentInfo
method.Chores
0.14.0
.