-
Notifications
You must be signed in to change notification settings - Fork 28
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
inventory: use standard AppDataLocation for model files #142
Conversation
I like this, a lot! One thing that's unclear to me is what happens with the models people have already downloaded? Will they still show up? (The scanning code seems to purely be an addition, so yes?) Or should they be moved on first run? (Sounds tricky to make fault tolerant) |
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.
I don't think we should try to move anything, that could potentially get tricky. Scanning one additional directory for models on startup is not a big deal.
Quoting Jelmer (2023-08-25 09:58:47)
One thing that's unclear to me is what happens with the models people
have already downloaded?
Will they still show up? (The scanning code seems to purely be an
addition, so yes?)
In the current state of this pull request, they won't show up anymore.
But I can add the previously used configuration directory as scanned path.
Or should they be moved on first run? (Sounds tricky to make fault tolerant)
This should be fine since the target directory is a fresh one for now.
Except if I'm missing something?
|
Yes, please add scanning the config dir as well. I think it was here.
|
0c0bc18
to
d861cc5
Compare
Quoting Nikolay Bogoychev (2023-08-25 13:41:26)
Yes, please add scanning the config dir as well. I think it was here.
https://github.com/XapaJIaMnu/translateLocally/blob/0c0bc1858623f44553791606f4382d12a9c00c74/src/inventory/ModelManager.cpp#L503
Done, and also rebased to resolve conflict.
|
Because we're putting app data in it in this class.
This puts the models in $XDG_DATA_DIR/translateLocally on Linux, or equivalent user data directories on other platforms. This avoids putting relatively large files in the config directory, which may be versioned for user dotfiles. Github: closes XapaJIaMnu#139
d861cc5
to
fda0d72
Compare
I added a commit which moves the model directories and tarballs from the config I'll let you decide whteher to pick this latest commit or not. |
@pacien sorry for the late reply. It seems the automatic builds fail. QT5 vs QT6 issue? |
Quoting Nikolay Bogoychev (2023-09-07 11:20:14)
It seems the automatic builds fail. QT5 vs QT6 issue?
Indeed, that's now fixed.
The Ubuntu jobs are now passing.
The Windows and MacOS jobs seem to be failing due to dependency issues which
are not related to the current changes.
|
Hmm, the windows build is suddenly broken. I need to investigate to see if something changed in the github runner or inadvertently this broke something (Last week it was passing). The Mac runner had some brew changes that happened that I need to fix as well... Putting on hold until then. |
inventory: use standard AppDataLocation for model files
This puts the models in $XDG_DATA_DIR/translateLocally on Linux,
or equivalent user data directories on other platforms.
This avoids putting relatively large files in the config directory,
which may be versioned for user dotfiles.
Github: closes #139