Skip to content
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

feat: Check if Include folders/files do exists (in case they are removed) #1718

Draft
wants to merge 21 commits into
base: dev
Choose a base branch
from

Conversation

rafaelhdr
Copy link
Contributor

Solution b) when start taking a snapshot the include list should be checked of existence first and warn about missings.

reference: #1586

Solution b) when start taking a snapshot the include list should be checked of existence first and warn about missings.

reference: bit-team#1586
@rafaelhdr
Copy link
Contributor Author

rafaelhdr commented May 9, 2024

This is not complete yet, but if possible I would like some feedback before finishing it.

Are the messages good? And I am wondering if the qt warning is ok (it is asking a confirmation before continuing instead of just warning).

And I didn't implement a) for no big reason. I am still getting familiar with the code and b) was something that was more clear for me. I could try a) in a future PR.

And how you normally do translations? I was planning to translate all other languages using some automated tool (Copilot) but I wanted to confirm how you guys do it normally...

CHANGES Outdated Show resolved Hide resolved
common/backintime.py Outdated Show resolved Hide resolved
common/backintime.py Outdated Show resolved Hide resolved
common/backintime.py Outdated Show resolved Hide resolved
common/po/pt_BR.po Outdated Show resolved Hide resolved
common/snapshots.py Outdated Show resolved Hide resolved
qt/app.py Show resolved Hide resolved
qt/app.py Outdated Show resolved Hide resolved
qt/app.py Outdated Show resolved Hide resolved
@buhtz
Copy link
Member

buhtz commented May 9, 2024

Dear Rafael,
Awesome! Thank you for this next contribution.

I added some comments and suggestions to the code. I am not sure about the whole solution. I would suggest to further discuss it in the related issue #1586.

I will set the PR into Draft mode to state the the solution is not finished.

Best,
Christian

rafaelhdr and others added 4 commits May 9, 2024 22:19
Co-authored-by: buhtz <[email protected]>
Co-authored-by: buhtz <[email protected]>
Co-authored-by: buhtz <[email protected]>
Co-authored-by: buhtz <[email protected]>
@rafaelhdr
Copy link
Contributor Author

I appreciate a lot for the review. It clarified a lot of questions and taught me some good lessons (I would never have thought about RTL issues on translations). And I am happy about not use the camel case :)

I will do the fixes from the review and wait for any suggestion in the original issue.

Thank you very much 🙏

@buhtz
Copy link
Member

buhtz commented May 10, 2024

Does anyone know how to trigger the systray-icon message-bubbles via BIT?

I tried with "Snapshot.setTakeSnapshotMessage(1, 'FOO BAR')" but without success. This message appears in the status bar of the main window.

@buhtz
Copy link
Member

buhtz commented May 12, 2024

I would never have thought about RTL issues on translations

Me neither. When I started to work on the translation task I thougt it is easy. I learned things like that from translators and the community around them while trying to attract translators to BIT.

@buhtz buhtz added Discussion decision or consensus needed PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. labels May 13, 2024
@aryoda
Copy link
Contributor

aryoda commented May 20, 2024

FYI: I am AFK for one week and will review this PR when I am back...

@buhtz buhtz added this to the 2nd release from now milestone Jun 27, 2024
@buhtz
Copy link
Member

buhtz commented Jun 28, 2024

Hello Rafael,
there where merge conflicts because of other PRs I merged. I solved that conflicts. So you need to update (fetch & pull) your local git repository before working further.

@rafaelhdr
Copy link
Contributor Author

@buhtz thank you

@aryoda could you review this Pull Request, pls 🙏 . I am very new to the project and your eyes on it would be appreciated.

@buhtz
Copy link
Member

buhtz commented Jul 8, 2024

Copy & Paste ...

Using @username to directly mention a user on GitHub should be avoided for several reasons.

Firstly, excessive @mentions can create unnecessary notifications, disturbing the users. Secondly, it can be seen as impolite to mention someone directly without prior communication or context. Thirdly, it's important to ensure that mentions are relevant and contribute to the discussion, such as when asking direct questions or involving someone in a specific part of the conversation. Microsoft GitHub recommends using mentions sparingly and thoughtfully to maintain effective communication.

Additionally, it's often unnecessary to mention admins or moderators directly, as they are usually subscribed to relevant issues or pull requests and will receive notifications automatically.

@rafaelhdr
Copy link
Contributor Author

I apologize about the mention :(

@aryoda
Copy link
Contributor

aryoda commented Jul 13, 2024

@aryoda could you review this Pull Request, pls 🙏 . I am very new to the project and your eyes on it would be appreciated.

I had no time for longer than expected but I plan to do the review tomorrow (sorry for not informing you earlier!).
I really appreciate your commitment 👍

Copy link
Contributor

@aryoda aryoda left a comment

Choose a reason for hiding this comment

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

@rafaelhdr I have done the code review with some (more or less cosmetic) findings only. Could you please check my review findings and pull the changes (or discuss different solutions here)? THX a lot :-)

PS: I will do some manual tests on my own then using my personal testing profiles...

common/backintime.py Outdated Show resolved Hide resolved
qt/app.py Show resolved Hide resolved
common/snapshots.py Outdated Show resolved Hide resolved
common/snapshots.py Outdated Show resolved Hide resolved
common/snapshots.py Show resolved Hide resolved
common/snapshots.py Outdated Show resolved Hide resolved
common/snapshots.py Outdated Show resolved Hide resolved
common/snapshots.py Show resolved Hide resolved
qt/app.py Show resolved Hide resolved
@buhtz buhtz added Feedback needs user response, may be closed after timeout without a response PR: Modifications requested Maintenance team requested modifications and waiting for their implementation and removed PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. labels Jul 22, 2024
Copy link
Contributor Author

@rafaelhdr rafaelhdr 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 very much for the review. I made the improvements suggested and answered/tested per requests.

common/snapshots.py Show resolved Hide resolved
qt/app.py Show resolved Hide resolved
common/snapshots.py Show resolved Hide resolved
@buhtz buhtz changed the title Check if Include folders/files do exists (in case they are removed) feat: Check if Include folders/files do exists (in case they are removed) Nov 19, 2024
@buhtz
Copy link
Member

buhtz commented Nov 23, 2024

Hello,
Just for your information. I do plan the next release (1.6.0) before Christmas.

How is your schedule? Can I plan your PR for this release (1.6.0) or for the release after it (1.6.1)?

Regards,
Christian

@rafaelhdr
Copy link
Contributor Author

Hello

I think it would be great :)

But I am very new here (this is my second Pull Request in the project). It would be great to have someone with more experience and I am available to do any fix.

Copy link
Member

@buhtz buhtz left a comment

Choose a reason for hiding this comment

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

OK, I checked the old review comments.
Now you should see only four pending/open review comments added by me.
You can use the "Commit suggestion" button if you want.

About aryoda's review: I would say all comments from him are solved. But I am not able to "accept" the the changes to his review on the GitHub interface. I can only click "dismiss review", which I don't want to. ;) So just treat his comments as solved.

I also updated your branch to the latest dev version. So make sure you also update your local branch at your working machine.

I would like to do some more manual tests before merging.

Let me know if you have questions or if I can be of assistance.

Comment on lines +697 to +702
Check if files and/or folders in the include list exist on the source.

If a file or folder does not exist, a warning message is logged.

Args:
cfg (config.Config): config that should be used
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Check if files and/or folders in the include list exist on the source.
If a file or folder does not exist, a warning message is logged.
Args:
cfg (config.Config): config that should be used
Check if files and/or directories in the include list exist on the source.
If a file or directory does not exist, a warning message is logged.
Args:
cfg (config.Config): Config that should be used.

Comment on lines +1264 to +1265
msg = _('The following folders are missing: {folders} Do you want to proceed?'.format(
folders=f'\n{msg_missing}\n\n'))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msg = _('The following folders are missing: {folders} Do you want to proceed?'.format(
folders=f'\n{msg_missing}\n\n'))
msg = _('The following directories are missing: {dirs} Do you want to proceed?'.format(
dirs=f'\n{msg_missing}\n\n'))


if missing:
msg = ', '.join(missing)
msg = f'The following **files/**folders are missing: {msg}'
Copy link
Member

Choose a reason for hiding this comment

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

Why are these ** in the message? I would suggest "The following files/directories are missing: {msg}"

btw: We decided to use the technical more precise term "directory" instead of "folder".

describing the missing files or folders
"""
not_found = []
for path, info in included:
Copy link
Member

Choose a reason for hiding this comment

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

The linter failes because "info" is not used anymore.

snapshots.py:3170:14: W0612: Unused variable 'info' (unused-variable)

@buhtz buhtz removed Discussion decision or consensus needed Feedback needs user response, may be closed after timeout without a response labels Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Modifications requested Maintenance team requested modifications and waiting for their implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants