-
Notifications
You must be signed in to change notification settings - Fork 287
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
Use XDG directories instead of HOME to store plugins data and recent files cache #352
Conversation
I agree with your commit, however it must fallback to previous directory just in case anyone use still use it. But may be a good idea to do this in this on the 3.0 release not doing any any fallback. |
Looks good. Will test later this week. @pslacerda @TstewDev , any further comments? |
Any updates? |
Sorry; other reviewers might've been busy. I'll just go ahead and merge. Thanks for the PR! |
Hi, I'm also assuming this feature is alright, but want to test anyway. I did a
|
Did you specify a prefix ( |
I just did the |
Just tested and this PR doesn't work in the following case: cmd.plugins.pref_set('a', 1) It still save in |
Not sure if I'm right about this error, but I couldn't find any error on your code. EDIT: I didn't see any |
That's the specified behavior, I use |
Can you provide this file? I think the Edit: I'll try testing later this week since I have a lot of work to do using pymol and cannot break it in any way before then lol |
Just |
@JarrettSJohnson, I suggest to revert this PR for a while until testings are done. @jrom99 maybe to write unit tests for this feature is a good idea. |
@jrom99 you can use virtualenvs in order to not to break your current PyMOL installation. Is it useful? |
ping @jrom99 |
Sorry for the late reply, I forgot lol. I'll test it today! |
I agree that the PR should be reverted for the time being. That said, I'm unable to replicate the bug, are you sure that However, I've found another bug: since |
Are you Brazillian also? Junior is a common surname here. And you use the prompt just like I used to, and a hidden virtualenv?! in my opinion, if You're right, I tested the standard PyMOL, hadn't check-out your branch. Sorry, my bad... |
Sim, também sou brasileiro (no meu caso Junior é nome mesmo lol). Since I've deleted my fork, I'll recreate the edits and fix the mentioned bug (as well as improve handling if |
We're missing Windows directories structure like Junior é seu primeiro nome? |
I'm using (platformdirs)[https://pypi.org/project/platformdirs/] as a dependency since it's better maintained nowadays. That said, since pymol only has pyQT5 mentioned as a 3rd party dependency, I was not sure if I could/should just add one more. I noticed that biopython, PIL and numpy are listed on the workflow build.yml, shouldn't they be added as install dependencies as well?
É sim! |
Maybe Qt has a standard way to handle this... and has: https://doc.qt.io/qt-6/qstandardpaths.html Curioso primeiro nome =) |
i don't know about others, but PIL is used for testing if generated images are equal to standard. EDIT: please correct me if I'm wrong... |
I would rather not add an additional dependency for something this small in scope. |
Platformdirs is pretty established for cross-platform directories handling and it's really lightweight compared to other dependencies. I'm not sure what would be the downsides, since the installation script automatically deals with downloading it. Is there a specific reason to make pymol have so few dependencies? I thought it was due to having to support older python versions, but the install script specifies python3.9, so this feels like unnecessarily reinventing the wheel. |
QStandardPaths is the best option here. |
I've updated it to use QStandardPaths, and from my testing it seems to be working as expected. I'm not sure if I can edit this pull request to use the new fork, though: master...jrom99:pymol-open-source:master Edit: I'm sure this is the wrong place to ask, but is it possible to enable fractional scaling or increase font size on pymol's interface? I've installed it on a hi-dpi device and while 1x is too small, 2x seems too big (for the seq_view, internal gui and the bottom command line). It is not listening to the "large text" accessibility option in Ubuntu. |
|
May you create tests? |
I've read how to create tests, but I'm not sure how to write them (I don't usually write tests for the apps I write) or where to place them (would Some questions:
I'm not sure about what to name them, since this is their explicit purpose on linux, do you have any suggestion? |
I don't know very well, but you can create a file named e.g.
You can create multiple functions starting with You can always encapsulate your changes in a class (e.g. @JarrettSJohnson what do you think? And I don't know how to test for the PyMOL initialization. Now the questions:
You can test with
I'd rather not set OS specific environment variables because the testing is done in other OSes also. Use
Maybel Here some examples of tests:
|
If you don't want to create tests, it's ok, I guess. I may just being annoying. This part of PyMOL seems to receive only manual tests. |
I'll try creating them! |
Just a tip that may help, try to move the Testable code is better. |
No description provided.