Skip to content

Album remote operations #1736

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Album remote operations #1736

wants to merge 6 commits into from

Conversation

surinder-tsys
Copy link
Collaborator

This PR contains the Remote operations for the Albums functionality.

Copy link
Contributor

github-actions bot commented Jun 2, 2025

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161162

SpotBugs increased!

Copy link
Contributor

github-actions bot commented Jun 2, 2025

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 352 lines in your changes missing coverage. Please review.

Project coverage is 41.33%. Comparing base (e3edf7a) to head (baedc13).
Report is 53 commits behind head on master.

Files with missing lines Patch % Lines
...resources/albums/CopyFileToAlbumRemoteOperation.kt 0.00% 54 Missing ⚠️
.../resources/albums/ReadAlbumItemsRemoteOperation.kt 0.00% 44 Missing ⚠️
...ud/android/lib/resources/albums/PhotoAlbumEntry.kt 0.00% 41 Missing ⚠️
...urces/albums/ToggleAlbumFavoriteRemoteOperation.kt 0.00% 37 Missing ⚠️
...lib/resources/albums/RenameAlbumRemoteOperation.kt 0.00% 35 Missing ⚠️
.../lib/resources/albums/ReadAlbumsRemoteOperation.kt 0.00% 33 Missing ⚠️
.../resources/albums/CreateNewAlbumRemoteOperation.kt 0.00% 30 Missing ⚠️
...lib/resources/albums/RemoveAlbumRemoteOperation.kt 0.00% 30 Missing ⚠️
...resources/albums/RemoveAlbumFileRemoteOperation.kt 0.00% 29 Missing ⚠️
...loud/android/lib/common/utils/WebDavFileUtils.java 0.00% 11 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1736      +/-   ##
============================================
- Coverage     43.01%   41.33%   -1.69%     
- Complexity      979      980       +1     
============================================
  Files           231      240       +9     
  Lines          8525     8877     +352     
  Branches       1115     1152      +37     
============================================
+ Hits           3667     3669       +2     
- Misses         4353     4704     +351     
+ Partials        505      504       -1     
Files with missing lines Coverage Δ
...owncloud/android/lib/common/network/WebdavEntry.kt 80.49% <ø> (ø)
...ncloud/android/lib/common/network/WebdavUtils.java 84.02% <0.00%> (-4.95%) ⬇️
...loud/android/lib/common/utils/WebDavFileUtils.java 40.00% <0.00%> (-31.43%) ⬇️
...resources/albums/RemoveAlbumFileRemoteOperation.kt 0.00% <0.00%> (ø)
.../resources/albums/CreateNewAlbumRemoteOperation.kt 0.00% <0.00%> (ø)
...lib/resources/albums/RemoveAlbumRemoteOperation.kt 0.00% <0.00%> (ø)
.../lib/resources/albums/ReadAlbumsRemoteOperation.kt 0.00% <0.00%> (ø)
...lib/resources/albums/RenameAlbumRemoteOperation.kt 0.00% <0.00%> (ø)
...urces/albums/ToggleAlbumFavoriteRemoteOperation.kt 0.00% <0.00%> (ø)
...ud/android/lib/resources/albums/PhotoAlbumEntry.kt 0.00% <0.00%> (ø)
... and 2 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented Jun 3, 2025

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3435
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161162

SpotBugs increased!

Copy link
Contributor

github-actions bot commented Jun 4, 2025

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

Copy link
Contributor

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the update. You can use the following command to fix spot bugs and formatting.

./gradlew detekt → it detects and gives HTML output, so that you can check it.
./gradlew :app:spotlessApply → reformats Kotlin code

Copy link
Contributor

github-actions bot commented Jun 5, 2025

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

Copy link
Contributor

@alperozturk96 alperozturk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following issues were found during analysis. Please fix them where possible. Thank you.

NestedBlockDepth (You can suppress with annotation if you are not able to extract the nested blocks) → ReadAlbumItemsRemoteOperation.kt:28:18

TooGenericExceptionCaught (You can suppress with annotation since error handling in remote operation is not well-designed in the current architecture) →
→ CopyFileToAlbumRemoteOperation.kt:88:18
→ CreateNewAlbumRemoteOperation.kt:57:18
→ ReadAlbumItemsRemoteOperation.kt:68:18
→ ReadAlbumsRemoteOperation.kt:57:18
→ RemoveAlbumFileRemoteOperation.kt:45:18
→ RemoveAlbumRemoteOperation.kt:53:18
→ RenameAlbumRemoteOperation.kt:55:18

MagicNumber (You can create constants in companion object and use them):
→ CopyFileToAlbumRemoteOperation.kt:131:76
→ PhotoAlbumEntry.kt:83:61

NewLineAtEndOfFile (You can add a new line at the end of the file):
→ PhotoAlbumEntry.kt:91:2
→ ToggleAlbumFavoriteRemoteOperation.kt:73:2
→ PhotoAlbumEntryTest.kt:57:2

ReturnCount (You can try to reduce return counts. If not possible, you can use annotation to suppress it):
→ CopyFileToAlbumRemoteOperation.kt:42:18

@surinder-tsys
Copy link
Collaborator Author

The following issues were found during analysis. Please fix them where possible. Thank you.

NestedBlockDepth (You can suppress with annotation if you are not able to extract the nested blocks) → ReadAlbumItemsRemoteOperation.kt:28:18

TooGenericExceptionCaught (You can suppress with annotation since error handling in remote operation is not well-designed in the current architecture) → → CopyFileToAlbumRemoteOperation.kt:88:18 → CreateNewAlbumRemoteOperation.kt:57:18 → ReadAlbumItemsRemoteOperation.kt:68:18 → ReadAlbumsRemoteOperation.kt:57:18 → RemoveAlbumFileRemoteOperation.kt:45:18 → RemoveAlbumRemoteOperation.kt:53:18 → RenameAlbumRemoteOperation.kt:55:18

MagicNumber (You can create constants in companion object and use them): → CopyFileToAlbumRemoteOperation.kt:131:76 → PhotoAlbumEntry.kt:83:61

NewLineAtEndOfFile (You can add a new line at the end of the file): → PhotoAlbumEntry.kt:91:2 → ToggleAlbumFavoriteRemoteOperation.kt:73:2 → PhotoAlbumEntryTest.kt:57:2

ReturnCount (You can try to reduce return counts. If not possible, you can use annotation to suppress it): → CopyFileToAlbumRemoteOperation.kt:42:18

Addressed all the issues. Can you please check?

Copy link
Contributor

github-actions bot commented Jun 6, 2025

SpotBugs

CategoryBaseNew
Bad practice3534
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance89
Total161161

@alperozturk96
Copy link
Contributor

Screenshot 2025-06-10 at 11 21 51

@tobiasKaminsky @AndyScherzinger Why REUSE Complicance Check is failing?

e.g.

/*
 * Nextcloud Android Library
 *
 * SPDX-FileCopyrightText: 2025 TSI-mc <surinder.kumar@t-systems.com>
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

It should be SPDX-License-Identifier: MIT instead of AGPL-3.0-or-later?

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Jun 10, 2025

It should be SPDX-License-Identifier: MIT instead of AGPL-3.0-or-later?

@alperozturk96 @surinder-tsys Correct, the lib is MIT hence any contribution to it has to be MIT

Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants